Function at 0x4049ad
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x18]
push ebx
sub esp, 0xcc
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x74], sym.___gxx_personality_sj0
mov dword [ebp - 0x70], 0x492298
mov dword [ebp - 0x68], 0x404d75
mov dword [ebp - 0x64], esp
mov dword [esp], eax
call dbg._Unwind_SjLj_Register
cmp dword [ebp + 0xc], 0x3f
jbe 0x404a06
mov eax, dword [ebp + 8]
cmp word [eax], 0x5a4d
jne 0x404a06
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
lea edx, [eax + 0xf8]
cmp dword [ebp + 0xc], edx
jae 0x404a15
mov dword [ebp - 0x90], 0
jmp 0x405470
add eax, dword [ebp + 8]
cmp dword [eax], 0x4550
mov dword [ebp - 0x94], eax
jne 0x404a06
mov eax, dword [ebp - 0x94]
cmp word [eax + 4], 0x14c
jne 0x404a06
mov ebx, dword [eax + 0x38]
test bl, 1
jne 0x404a06
movzx eax, word [eax + 0x14]
mov esi, dword [ebp - 0x94]
xor ecx, ecx
mov dword [ebp - 0x90], 0
lea edx, [esi + eax + 0x18]
movzx esi, word [esi + 6]
cmp ecx, esi
jae 0x404a87
mov eax, dword [edx + 0xc]
lea edi, [ebx + eax]
add eax, dword [edx + 0x10]
cmp dword [edx + 0x10], 0
cmove eax, edi
cmp dword [ebp - 0x90], eax
cmovae eax, dword [ebp - 0x90]
inc ecx
add edx, 0x28
mov dword [ebp - 0x90], eax
jmp 0x404a5a
mov eax, dword [0x4a60a8]
mov eax, dword [eax]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edx
mov dword [ebp - 0x98], eax
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call sym.GetGetSystemInfoStr__
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 1
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x3c]
push esi
push esi
mov dword [ebp - 0x9c], eax
call fcn.00465d20
lea eax, [ebp - 0x3c]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp - 0x9c]
push edi
mov ebx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x38]
mov ecx, dword [ebx + 0x50]
mov ebx, dword [ebp - 0x90]
mov eax, edx
neg eax
add ecx, edx
lea edx, [ebx + edx - 1]
dec ecx
and ecx, eax
and eax, edx
cmp ecx, eax
mov dword [ebp - 0xa0], ecx
jne 0x404a06
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x9c], eax
jne 0x404b9c
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [ebp + 0x10]
test eax, eax
mov dword [ebp - 0x9c], eax
je 0x404a06
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call sym.GetHeapAllocStr__
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 2
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x50]
push ebx
push ebx
mov dword [ebp - 0x90], eax
call fcn.00465d20
lea eax, [ebp - 0x50]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call sym.GetGetProcessHeapStr__
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov dword [ebp - 0x88], 3
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push ecx
push ecx
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x98], eax
call fcn.00465d20
mov dword [ebp - 0x88], 0xffffffff
mov eax, dword [ebp - 0x98]
call eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [ebp - 0x90]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x90], eax
jne 0x404c86
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
call dword [ebp + 0x14]
jmp 0x404a06
mov eax, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x9c]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0x24]
mov dword [eax + 4], ebx
mov eax, dword [ebp - 0x94]
mov ebx, dword [ebp - 0x90]
mov ax, word [eax + 0x16]
mov dword [ebx + 0x1c], esi
mov esi, dword [ebp - 0x90]
mov word [ebp - 0x98], ax
shr ax, 0xd
and eax, 1
mov dword [ebx + 0x14], eax
mov eax, ebx
mov ebx, dword [ebp + 0x14]
mov dword [eax + 0x20], ebx
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x34], edi
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x54]
cmp dword [ebp + 0xc], eax
jb 0x404d58
jmp 0x404dbb
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x38]
test eax, eax
mov dword [ebp - 0xa4], eax
jg 0x404e39
inc dword [ebp - 0xa8]
add dword [ebp - 0x98], 0x28
mov eax, dword [ebp - 0x90]
mov edx, dword [eax]
movzx eax, word [edx + 6]
cmp dword [ebp - 0xa8], eax
jge 0x404eb2
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x404cfb
mov edi, dword [ebp - 0x98]
mov edx, dword [edi + 0x14]
add edx, eax
cmp dword [ebp + 0xc], edx
jae 0x405269
mov eax, dword [ebp - 0x90]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call sym.MemoryFreeLibrary_void_
jmp 0x404a06
mov ebx, dword [ebp + 0x24]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x9c]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp + 0x10]
mov esi, dword [ebp - 0x94]
mov edi, eax
mov ebx, dword [ebp - 0x90]
mov dword [ebp - 0xa8], 0
mov ecx, dword [esi + 0x54]
mov esi, dword [ebp + 8]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x9c]
add eax, dword [edi + 0x3c]
movzx edx, word [eax + 0x14]
mov dword [ebx], eax
mov ebx, dword [ebx + 4]
mov dword [eax + 0x34], esi
lea eax, [eax + edx + 0x18]
mov dword [ebp - 0xa0], ebx
mov dword [ebp - 0x98], eax
jmp 0x404d1f
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0xa4]
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
add eax, dword [esi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
je 0x404d58
mov eax, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0xa4]
add edx, dword [eax + 0xc]
mov dword [eax + 8], edx
mov edi, edx
xor eax, eax
rep stosb byte es:[edi], al
jmp 0x404d12
mov edi, dword [ebp - 0x94]
mov eax, dword [edx + 0x34]
sub eax, dword [edi + 0x34]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x90]
je 0x404f33
mov esi, dword [eax + 4]
xor eax, eax
cmp dword [edx + 0xa4], 0
je 0x404f28
mov ecx, dword [edx + 0xa0]
add ecx, esi
mov eax, dword [ecx]
test eax, eax
mov dword [ebp - 0x94], eax
je 0x404f26
xor ebx, ebx
mov edi, dword [ecx + 4]
lea eax, [edi - 8]
shr eax, 1
cmp ebx, eax
jae 0x404f22
movzx edi, word [ecx + ebx*2 + 8]
mov eax, edi
sar edi, 0xc
cmp edi, 3
jne 0x404f1f
and eax, 0xfff
add eax, dword [ebp - 0x94]
mov edi, dword [ebp - 0x98]
add dword [esi + eax], edi
inc ebx
jmp 0x404ef0
add ecx, edi
jmp 0x404ee2
mov al, 1
mov ebx, dword [ebp - 0x90]
mov dword [ebx + 0x18], eax
jmp 0x404f3a
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x90]
cmp dword [edx + 0x84], 0
mov eax, dword [eax + 4]
mov dword [ebp - 0x94], eax
jne 0x404f89
mov eax, dword [ebp - 0x90]
mov esi, dword [ebp - 0x90]
mov eax, dword [eax]
mov ebx, dword [esi + 0x3c]
movzx edx, word [eax + 0x14]
mov ecx, ebx
mov dword [ebp - 0x94], ebx
neg ecx
lea eax, [eax + edx + 0x18]
mov edx, dword [eax + 8]
mov dword [ebp - 0x50], edx
and edx, ecx
mov dword [ebp - 0x4c], edx
mov edx, dword [eax + 0x10]
test edx, edx
je 0x404fe3
jmp 0x405008
mov eax, dword [ebp - 0x94]
add eax, dword [edx + 0x80]
mov dword [ebp - 0xa4], eax
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
mov dword [ebp - 0xac], eax
mov dword [esp + 4], 0x14
mov eax, dword [ebp - 0xa4]
mov dword [esp], eax
mov dword [ebp - 0x88], 0xffffffff
call dword [ebp - 0xac]
test eax, eax
push edx
push edx
jne 0x404f52
mov eax, dword [ebp - 0xa4]
mov eax, dword [eax + 0xc]
test eax, eax
jne 0x4052dd
jmp 0x404f52
mov ecx, dword [eax + 0x24]
test cl, 0x40
je 0x404ff8
mov esi, dword [ebp - 0x90]
mov edx, dword [esi]
mov edx, dword [edx + 0x20]
jmp 0x405008
and cl, 0x80
je 0x405008
mov edi, dword [ebp - 0x90]
mov edx, dword [edi]
mov edx, dword [edx + 0x24]
mov dword [ebp - 0x48], edx
mov edx, dword [eax + 0x24]
add eax, 0x28
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x94], eax
mov dword [ebp - 0xa8], 1
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
movzx edx, word [eax + 6]
cmp dword [ebp - 0xa8], edx
jge 0x405145
mov ebx, dword [ebp - 0x94]
mov edi, dword [ebp - 0x90]
mov esi, dword [ebx + 8]
mov ebx, dword [edi + 0x3c]
mov edi, dword [ebp - 0x94]
mov edx, ebx
mov dword [ebp - 0xa0], esi
mov ebx, dword [edi + 0x10]
neg edx
and edx, esi
mov dword [ebp - 0xa4], edx
test ebx, ebx
mov dword [ebp - 0x98], ebx
jne 0x405095
mov edx, dword [edi + 0x24]
test dl, 0x40
je 0x405087
mov eax, dword [eax + 0x20]
jmp 0x40508f
and dl, 0x80
je 0x405095
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0xa4]
cmp dword [ebp - 0x4c], eax
je 0x4050ae
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0xa4]
jbe 0x4050ec
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x24]
test eax, 0x2000000
je 0x4050c9
mov edx, dword [ebp - 0x44]
test edx, 0x2000000
jne 0x4050d3
or eax, dword [ebp - 0x44]
and eax, 0xfdffffff
jmp 0x4050d5
or eax, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xa0]
sub eax, dword [ebp - 0x50]
add eax, dword [ebp - 0x98]
mov dword [ebp - 0x48], eax
jmp 0x405133
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x88], 0xffffffff
call sym.FinalizeSection_MEMORYMODULE__SECTIONFINALIZEDATA_
test eax, eax
je 0x404d58
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x94]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x44], eax
inc dword [ebp - 0xa8]
add dword [ebp - 0x94], 0x28
jmp 0x40502b
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x88], 0xffffffff
mov dword [ebp - 0x40], 1
call sym.FinalizeSection_MEMORYMODULE__SECTIONFINALIZEDATA_
test eax, eax
je 0x404d58
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 4]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
mov eax, dword [eax + 0xc0]
test eax, eax
jne 0x4051a1
mov eax, dword [ebp - 0x90]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x4051f2
jmp 0x405257
mov ebx, dword [ebp - 0x98]
mov eax, dword [ebx + eax + 0xc]
test eax, eax
mov dword [ebp - 0x94], eax
je 0x40518d
mov eax, dword [ebp - 0x94]
mov eax, dword [eax]
test eax, eax
je 0x40518d
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov esi, dword [ebp - 0x98]
mov dword [esp], esi
mov dword [ebp - 0x88], 0xffffffff
call eax
add dword [ebp - 0x94], 4
sub esp, 0xc
jmp 0x4051b5
mov edi, dword [ebp - 0x90]
mov ebx, dword [ebp - 0x9c]
cmp dword [edi + 0x14], 0
lea eax, [ebx + eax]
je 0x405249
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov esi, dword [ebp - 0x9c]
mov dword [esp], esi
mov dword [ebp - 0x88], 0xffffffff
call eax
sub esp, 0xc
test eax, eax
je 0x404d58
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x10], 1
jmp 0x405470
mov edi, dword [ebp - 0x90]
mov dword [edi + 0x38], eax
jmp 0x405470
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x38], 0
jmp 0x405470
mov esi, dword [ebp - 0x90]
mov edx, dword [esi + 0x34]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp + 0x10], edx
mov edi, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
add eax, dword [edi + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
je 0x404d58
mov ebx, dword [ebp - 0x98]
mov eax, dword [ebp - 0xa0]
mov esi, dword [ebp + 8]
add eax, dword [ebx + 0xc]
add esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], eax
jmp 0x404d12
mov ecx, dword [ebp - 0x90]
mov edx, dword [ecx + 0x34]
mov dword [esp + 4], edx
add eax, dword [ebp - 0x94]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x88], 0xffffffff
call eax
test eax, eax
mov dword [ebp - 0x98], eax
je 0x404d58
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._realloc
test eax, eax
je 0x405440
mov esi, dword [ebp - 0x90]
mov edi, dword [ebp - 0x98]
mov edx, dword [esi + 0xc]
mov dword [esi + 8], eax
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
mov dword [eax + edx*4], edi
mov eax, dword [ebp - 0xa4]
mov edx, dword [eax]
mov eax, dword [eax + 0x10]
test edx, edx
je 0x405387
add edx, dword [ebp - 0x94]
add eax, dword [ebp - 0x94]
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0xa0], eax
jmp 0x4053f0
add eax, dword [ebp - 0x94]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa8], eax
jmp 0x4053f0
mov ebx, dword [ebp - 0x90]
mov edx, dword [ebx + 0x34]
mov dword [esp + 8], edx
jns 0x4053fe
movzx eax, ax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x88], 0xffffffff
call eax
mov esi, dword [ebp - 0xa0]
mov dword [esi], eax
mov eax, dword [ebp - 0xa0]
cmp dword [eax], 0
je 0x405440
add dword [ebp - 0xa8], 4
add dword [ebp - 0xa0], 4
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax]
test eax, eax
jne 0x40539b
jmp 0x405434
mov edi, dword [ebp - 0x94]
lea eax, [edi + eax + 2]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x28]
mov dword [ebp - 0x88], 0xffffffff
call eax
mov ebx, dword [ebp - 0xa0]
mov dword [ebx], eax
jmp 0x4053d7
add dword [ebp - 0xa4], 0x14
jmp 0x404fa6
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x98]
mov dword [esp], eax
mov eax, dword [ebp - 0x90]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x88], 0xffffffff
call eax
jmp 0x404d58
lea eax, [ebp - 0x8c]
mov dword [esp], eax
call sym.__Unwind_SjLj_Unregister
mov eax, dword [ebp - 0x90]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret