devsec
July 7th, 2005, 15:17
Hi @,
i found in an target:
when i interpret it right, uExitCode is pushed on the Stack and then
sub_4013C0 is Called with uExitCode as Parameter.
But an push is (decrease Stack and then MOVE Adress on ESP or EBP) ?
Why is no "MOVE" here ? Or how can i interpret this line
.text:00401116 sub esp, 4 ; uExitCode
But how can IDA know that it is uExitCode when the next Procedure (sub_4013C0) is unknown. How can i find what the next Procedure is and
the name of ....
THX
i found in an target:
Code:
.text:00401100 push ebp
.text:00401101 mov ebp, esp
.text:00401103 push ebx
.text:00401104 sub esp, 24h ;lpTopLevelExceptionFilter
.text:00401107 lea ebx, [ebp+var_8]
.text:0040110A mov [esp+28h+var_28], offset sub_401000
.text:00401111 call SetUnhandledExceptionFilter
.text:00401116 sub esp, 4 ; uExitCode
.text:00401119 call sub_4013C0
.text:0040111E mov [ebp+var_8], 0
.text:00401125 mov eax, offset dword_404000
.text:0040112A lea edx, [ebp+var_C]
.text:0040112D mov [esp+28h+var_18], ebx
.text:00401131 mov ecx, dword_402020
.text:00401137 mov [esp+28h+var_24], eax
.text:0040113B mov [esp+28h+var_20], edx
.text:0040113F mov [esp+28h+var_1C], ecx
.text:00401143 mov [esp+28h+var_28], offset dword_404004
.text:0040114A call __getmainargs
when i interpret it right, uExitCode is pushed on the Stack and then
sub_4013C0 is Called with uExitCode as Parameter.
But an push is (decrease Stack and then MOVE Adress on ESP or EBP) ?
Why is no "MOVE" here ? Or how can i interpret this line
.text:00401116 sub esp, 4 ; uExitCode
But how can IDA know that it is uExitCode when the next Procedure (sub_4013C0) is unknown. How can i find what the next Procedure is and
the name of ....
Code:
.text:004013C0 sub_4013C0 proc near ; CODE XREF: sub_401000+C6p
.text:004013C0 ; sub_401100+19p
.text:004013C0 push ebp
.text:004013C1 mov ebp, esp
.text:004013C3 This instruction initializes the FPU by resetting all the registers
.text:004013C3 and flags to their default values
.text:004013C3 fninit
.text:004013C5 pop ebp
.text:004013C6 retn
.text:004013C6 sub_4013C0 endp
THX