【IDA】分析 Windows CE 事件日志服务(一)

笔者在开始使用 Windows CE 事件日志服务时,由于自身条件限制未能获得 Microsoft 的技术支持,故只能使用 IDA Pro 对 eventlog.dll 进行分析。

笔者感觉事件日志服务相关的注册表设置可能对嵌入式系统软件工程师比较有用,所以注重分析 StartAllLoggers、InitFormattersAndOutputters、CLogEventLog::Initialize 和 CLogHandle::AssociateEventLog 等函数/方法。

StartAllLoggers 函数

eventlog.dll 的导出函数 EventLogStart 在 .text:10001B3A 调用函数 EventLogWorkerThread;然后,函数 EventLogWorkerThread 在 .text:100030FA 调用本函数。

.text:10002CC8 ;  int  __cdecl StartAllLoggers( void )
.text:10002CC8 
? StartAllLoggers@@YAHXZ proc near       ; CODE XREF: EventLogWorkerThread( void   * ) + 15
.text:10002CC8
.text:10002CC8 szName          
=  word ptr  - 218h
.text:10002CC8 pReg            
=  dword ptr  - 10h
.text:10002CC8
.text:10002CC8                 push    ebp
.text:10002CC9                 mov     ebp, esp
.text:10002CCB                 sub     esp, 218h
.text:10002CD1                 push    ebx
.text:10002CD2                 push    esi
.text:10002CD3                 push    edi
.text:10002CD4                 push    offset 
?? _C@_1EE@DKEDOPGO@ ? $AAS ? $AAY ? $AAS ? $AAT ? $AAE ? $AAM ? $AA ? 2 ? $AAC ? $AAu ? $AAr ? $AAr ? $AAe ? $AAn ? $AAt ? $AAC ? $AAo ? $AAn ? $AAt ? $AAr ? $AAo@ ;  " SYSTEM/CurrentControlSet/EventLog "
.text:10002CD9                 push    HKEY_LOCAL_MACHINE
.text:10002CDE                 lea     ecx, [ebp
+ pReg]
.text:10002CE1                 call    
?? 0CReg@@QAE@PAUHKEY__@@PBG@Z ; CReg::CReg(HKEY__  * , ushort   const   * )
.text:10002CE6                 xor     ebx, ebx
.text:10002CE8                 cmp     [ebp
+ pReg], ebx
.text:10002CEB                 jz      loc_10002E7A
.text:10002CF1                 push    g_pvAllocData   ; pvData
.text:10002CF7                 push    
20
.text:10002CF9                 pop     esi
.text:10002CFA                 push    esi             ; iSize
.text:10002CFB                 call    g_funcAlloc
.text:10002D01                 cmp     eax, ebx
.text:10002D03                 pop     ecx
.text:10002D04                 pop     ecx
.text:10002D05                 jz      
short  loc_10002D1D
.text:10002D07                 push    esi
.text:10002D08                 push    offset 
? DeleteEntry@CLogEventLog@@SAXPAX@Z ; CLogEventLog::DeleteEntry( void   * )
.text:10002D0D                 push    
52
.text:10002D0F                 mov     ecx, eax
.text:10002D11                 call    
?? 0SVSLinkManager@@QAE@KP6AXPAX@ZK@Z ; SVSLinkManager::SVSLinkManager( ulong , void  ( * )( void
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值