程序比较简单,就两个定时器比较关键,第一个定时器timer1用DeDe分析如下:
timer1
0044FA94 55 push ebp
0044FA95 8BEC mov ebp, esp
0044FA97 81C4A4FCFFFF add esp, $FFFFFCA4
0044FA9D 53 push ebx
0044FA9E 56 push esi
0044FA9F 57 push edi
0044FAA0 33C9 xor ecx, ecx
0044FAA2 898DA4FCFFFF mov [ebp+$FFFFFCA4], ecx
0044FAA8 898DA8FCFFFF mov [ebp+$FFFFFCA8], ecx
0044FAAE 894DFC mov [ebp-$04], ecx
0044FAB1 894DF8 mov [ebp-$08], ecx
0044FAB4 8BD8 mov ebx, eax
0044FAB6 8DBDACFCFFFF lea edi, [ebp+$FFFFFCAC]
0044FABC 33C0 xor eax, eax
0044FABE 55 push ebp
* Possible String Reference to: '楫??脎_^[嬪]?
|
0044FABF 6881FC4400 push $0044FC81
***** TRY
|
0044FAC4 64FF30 push dword ptr fs:[eax]
0044FAC7 648920 mov fs:[eax], esp
* Possible String Reference to: 'QQ2010'
|
0044FACA 6890FC4400 push $0044FC90
* Possible String Reference to: 'TXGuiFoundation'
|
0044FACF 6898FC4400 push $0044FC98
* Reference to: user32.FindWindowA()
|
0044FAD4 E87370FBFF call 00406B4C { 查找QQ登录窗口 }
0044FAD9 A3781C4500 mov dword ptr [$00451C78], eax
0044FADE 833D781C450000 cmp dword ptr [$00451C78], +$00
0044FAE5 0F866B010000 jbe 0044FC56 { FindWindow true }
0044FAEB 33D2 xor edx, edx
0044FAED B802000000 mov eax, $00000002
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FAF2 E8D9FAFFFF call 0044F5D0 { CreateToolhelp32Snapshot() }
0044FAF7 8BF0 mov esi, eax
0044FAF9 89B300030000 mov [ebx+$0300], esi
0044FAFF C785D0FEFFFF28010000 mov dword ptr [ebp+$FFFFFED0], $00000128
0044FB09 8D95D0FEFFFF lea edx, [ebp+$FFFFFED0]
0044FB0F 8BC6 mov eax, esi
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FB11 E8DAFAFFFF call 0044F5F0 { Process32First() }
0044FB16 83F801 cmp eax, +$01
0044FB19 1BC0 sbb eax, eax { eax 清零 }
0044FB1B 40 inc eax { eax 为 1 }
0044FB1C E921010000 jmp 0044FC42 { Big Jmp }
0044FB21 8D85A8FCFFFF lea eax, [ebp+$FFFFFCA8] { 跳回来了,上面的等于没有跳 }
0044FB27 8D95F4FEFFFF lea edx, [ebp+$FFFFFEF4]
0044FB2D B904010000 mov ecx, $00000104
* Reference to: System.@LStrFromArray(String;String;PAnsiChar;Integer);
| or: System.@WStrFromArray(WideString;WideString;PAnsiChar;Integer);
|
0044FB32 E83D49FBFF call 00404474 { 取程序全路径 }
0044FB37 8B85A8FCFFFF mov eax, [ebp+$FFFFFCA8]
0044FB3D 8D55FC lea edx, [ebp-$04]
* Reference to: SysUtils.ExtractFileName(AnsiString):AnsiString;
|
0044FB40 E8438AFBFF call 00408588 { 提取程序名 }
0044FB45 8B45FC mov eax, [ebp-$04]
* Possible String Reference to: 'QQ.exe'
|
0044FB48 BAB0FC4400 mov edx, $0044FCB0
* Reference to: System.@LStrCmp;
|
0044FB4D E8B64AFBFF call 00404608 { 将程序名与 QQ.exe比较 }
0044FB52 0F85D3000000 jnz 0044FC2B { 不相等就跳 }
0044FB58 8B85D8FEFFFF mov eax, [ebp+$FFFFFED8] { 上面找到是QQ的进程,下面就枚举它的模块 }
0044FB5E A3741C4500 mov dword ptr [$00451C74], eax
0044FB63 8B15741C4500 mov edx, [$00451C74]
0044FB69 B808000000 mov eax, $00000008
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FB6E E85DFAFFFF call 0044F5D0 { CreateToolhelp32Snapshot() }
0044FB73 8BF0 mov esi, eax
0044FB75 C70724020000 mov dword ptr [edi], $00000224
0044FB7B 8BD7 mov edx, edi
0044FB7D 8BC6 mov eax, esi
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FB7F E8ACFAFFFF call 0044F630 { Module32First() }
0044FB84 83F801 cmp eax, +$01
0044FB87 1BC0 sbb eax, eax
0044FB89 40 inc eax
0044FB8A E98C000000 jmp 0044FC1B { Big Jmp }
0044FB8F 8D85A4FCFFFF lea eax, [ebp+$FFFFFCA4]
0044FB95 8D9720010000 lea edx, [edi+$0120]
0044FB9B B904010000 mov ecx, $00000104
* Reference to: System.@LStrFromArray(String;String;PAnsiChar;Integer);
| or: System.@WStrFromArray(WideString;WideString;PAnsiChar;Integer);
|
0044FBA0 E8CF48FBFF call 00404474 { 提取模块名 }
0044FBA5 8B85A4FCFFFF mov eax, [ebp+$FFFFFCA4]
0044FBAB 8D55F8 lea edx, [ebp-$08]
* Reference to: SysUtils.ExtractFileName(AnsiString):AnsiString;
|
0044FBAE E8D589FBFF call 00408588
0044FBB3 8B45F8 mov eax, [ebp-$08]
* Possible String Reference to: 'AFUtil.dll'
|
0044FBB6 BAC0FC4400 mov edx, $0044FCC0
* Reference to: System.@LStrCmp;
|
0044FBBB E8484AFBFF call 00404608 { 判断找到的模块是不是 AFUtil.dll }
0044FBC0 754A jnz 0044FC0C { 不是就跳 }
0044FBC2 8B4714 mov eax, [edi+$14]
0044FBC5 A3701C4500 mov dword ptr [$00451C70], eax
|
0044FBCA E8CDFCFFFF call 0044F89C { 暂不明确函数 }
0044FBCF 84C0 test al, al
0044FBD1 7439 jz 0044FC0C
* Possible String Reference to: ' 拦截开始!'
|
0044FBD3 BAD4FC4400 mov edx, $0044FCD4
* Reference to control Label2 : TLabel
|
0044FBD8 8B83FC020000 mov eax, [ebx+$02FC]
* Reference to: Controls.TControl.SetText(TControl;TCaption);
|
0044FBDE E889EBFDFF call 0042E76C
0044FBE3 33D2 xor edx, edx
* Reference to control Edit1 : TEdit
|
0044FBE5 8B83F0020000 mov eax, [ebx+$02F0]
* Reference to: Controls.TControl.SetText(TControl;TCaption);
|
0044FBEB E87CEBFDFF call 0042E76C { 设置编辑框文本,已经得到密码了??? }
0044FBF0 33D2 xor edx, edx
* Reference to control Timer1 : TTimer
|
0044FBF2 8B83F4020000 mov eax, [ebx+$02F4]
* Reference to: ExtCtrls.TTimer.SetEnabled(TTimer;Boolean);
| or: IBDatabase.TIBTimer.SetEnabled(TIBTimer;Boolean);
| or: Menus.TMenu.SetOwnerDraw(TMenu;Boolean);
| or: Psock.TThreadTimer.SetEnabled(TThreadTimer;System.Boolean);
|
0044FBF8 E80784FDFF call 00428004 { 关闭Timer1 }
0044FBFD B201 mov dl, $01
* Reference to control Timer2 : TTimer
|
0044FBFF 8B83F8020000 mov eax, [ebx+$02F8]
* Reference to: ExtCtrls.TTimer.SetEnabled(TTimer;Boolean);
| or: IBDatabase.TIBTimer.SetEnabled(TIBTimer;Boolean);
| or: Menus.TMenu.SetOwnerDraw(TMenu;Boolean);
| or: Psock.TThreadTimer.SetEnabled(TThreadTimer;System.Boolean);
|
0044FC05 E8FA83FDFF call 00428004 { 开启 timer2 }
0044FC0A EB17 jmp 0044FC23 { timer1 任务全部完成,要返回了 }
0044FC0C 8BD7 mov edx, edi
0044FC0E 8BC6 mov eax, esi
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FC10 E83BFAFFFF call 0044F650 { Module32Next() }
0044FC15 83F801 cmp eax, +$01
0044FC18 1BC0 sbb eax, eax
0044FC1A 40 inc eax
0044FC1B 84C0 test al, al
0044FC1D 0F856CFFFFFF jnz 0044FB8F { eax 为 1,肯定跳了 }
0044FC23 56 push esi { ; }
* Reference to: kernel32.CloseHandle()
|
0044FC24 E85B6AFBFF call 00406684 { 关闭 CreateToolhelp32Snapshot 枚举模块的句柄 }
0044FC29 EB1F jmp 0044FC4A
0044FC2B 8D95D0FEFFFF lea edx, [ebp+$FFFFFED0] { jmp from 0044FB52 因为上面找到不是QQ.exe }
0044FC31 8B8300030000 mov eax, [ebx+$0300]
* Reference to: TlHelp32.CreateToolhelp32Snapshot(DWORD;DWORD):Windows.THandle;
| or: TlHelp32.Heap32ListFirst(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Heap32ListNext(Windows.THandle;tagHEAPLIST32;tagHEAPLIST32):BOOL;
| or: TlHelp32.Process32First(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32Next(Windows.THandle;tagPROCESSENTRY32;tagPROCESSENTRY32):BOOL;
| or: TlHelp32.Process32FirstW(Windows.THandle;tagPROCESSENTRY32W;tagPROCESSENTRY32W):BOOL;
|
0044FC37 E8D4F9FFFF call 0044F610 { Process32Next() }
0044FC3C 83F801 cmp eax, +$01
0044FC3F 1BC0 sbb eax, eax
0044FC41 40 inc eax
0044FC42 84C0 test al, al { Jmp from 0044FB1C }
0044FC44 0F85D7FEFFFF jnz 0044FB21 { eax 为 1,肯定跳了 }
0044FC4A 8B8300030000 mov eax, [ebx+$0300]
0044FC50 50 push eax
* Reference to: kernel32.CloseHandle()
|
0044FC51 E82E6AFBFF call 00406684 { 关闭 CreateToolhelp32Snapshot 枚举进程的句柄 }
0044FC56 33C0 xor eax, eax { FindWindow False }
0044FC58 5A pop edx
0044FC59 59 pop ecx
0044FC5A 59 pop ecx
0044FC5B 648910 mov fs:[eax], edx
****** FINALLY
|
* Possible String Reference to: '_^[嬪]?
|
0044FC5E 6888FC4400 push $0044FC88 { 下面是编译器自动释放的部分 }
0044FC63 8D85A4FCFFFF lea eax, [ebp+$FFFFFCA4]
0044FC69 BA02000000 mov edx, $00000002
* Reference to: System.@LStrArrayClr(void;void;Integer);
|
0044FC6E E8BD45FBFF call 00404230
0044FC73 8D45F8 lea eax, [ebp-$08]
0044FC76 BA02000000 mov edx, $00000002
* Reference to: System.@LStrArrayClr(void;void;Integer);
|
0044FC7B E8B045FBFF call 00404230
0044FC80 C3 ret
* Reference to: System.@HandleFinally;
|
0044FC81 E9AE3FFBFF jmp 00403C34
0044FC86 EBDB jmp 0044FC63
****** END
|
0044FC88 5F pop edi
0044FC89 5E pop esi
0044FC8A 5B pop ebx
0044FC8B 8BE5 mov esp, ebp
0044FC8D 5D pop ebp
0044FC8E C3 ret
转换成伪代码:
if (查找QQ窗口 FindWindow())
{
创建进程的快照 CreateToolhelp32Snapshot
查找第一个进程 Process32First
do
{
if (找到进程的是QQ)
{
创建QQ模块的快照 CreateToolhelp32Snapshot
查找第一个模块 Module32First
do
{
if (找到模块的是AFUtil.dll)
{
设置标签和编辑框
调用一个暂不明确作用的函数,这个函数最后调用Timer2的定时函数
关闭 Timer1
开启 Timer2
break;
}
}
while (查找下一个模块 Module32Next());
break;
}
}
while (查找下一个进程 Process32Next());
}
第二定时器让给高手