无聊的我反汇编,MessageBox 函数
1 user32_MessageBoxA:USER32:7754EA11 mov edi, edi
USER32:7754EA13 push ebp
USER32:7754EA14 mov ebp, esp
USER32:7754EA16 cmp dword_77559A74, 0
USER32:7754EA1D jz short loc_7754EA43 分支1
USER32:7754EA1F mov eax, large fs:18h
USER32:7754EA25 push 0
USER32:7754EA27 push dword ptr [eax+24h]
USER32:7754EA2A push offset unk_77559EA4
USER32:7754EA2F call off_774F1434 CALL1 这个地方的函数为interlockedcompareexchage();
USER32:7754EA35 test eax, eax
USER32:7754EA37 jnz short loc_7754EA43 分支2
USER32:7754EA39 mov dword_77559EA0, 1
USER32:7754EA43
USER32:7754EA43 loc_7754EA43: ; CODE XREF: USER32:user32_MessageBoxA+Cj
USER32:7754EA43 ; USER32:user32_MessageBoxA+26j
USER32:7754EA43 push 0
USER32:7754EA45 push dword ptr [ebp+14h]
USER32:7754EA48 push dword ptr [ebp+10h]
USER32:7754EA4B push dword ptr [ebp+0Ch]
USER32:7754EA4E push dword ptr [ebp+8]
USER32:7754EA51 call near ptr user32_MessageBoxExA
USER32:7754EA56 pop ebp
USER32:7754EA57 retn 10h
反汇编C语言复原
令dword_77559A74 用变量a来表示
令 dest=offset unk_77559EA4
令 b=eax+24h
令 c= dword_77559EA0
if(a!=0){
if(!interlockedc0mpareexchage(dest,b,0))
c=1;
}
MessageBoxExA();