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

Disassembly:
mov eax, 0x41bc84
call fcn.00409f6c
sub esp, 0x50
and dword [ebp - 0x10], 0
push ebx
push esi
push edi
push 0x40
push dword [ebp + 0xc]
call fcn.00406690
pop ecx
test eax, eax
pop ecx
je 0x40665a
mov edi, dword [ebp + 8]
cmp word [edi], 0x5a4d
jne 0x40665a
mov eax, dword [edi + 0x3c]
add eax, 0xf8
push eax
push dword [ebp + 0xc]
call fcn.00406690
pop ecx
test eax, eax
pop ecx
je 0x40665a
add edi, dword [edi + 0x3c]
cmp dword [edi], 0x4550
jne 0x40665a
cmp word [edi + 4], 0x14c
jne 0x40665a
mov edx, dword [edi + 0x38]
test dl, 1
jne 0x40665a
movzx eax, word [edi + 0x14]
movzx ecx, word [edi + 6]
test ecx, ecx
lea eax, [eax + edi + 0x18]
jbe 0x406436
add eax, 0xc
mov esi, ecx
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x406426
mov ecx, edx
add ecx, dword [eax]
cmp ecx, dword [ebp - 0x10]
jbe 0x406430
mov dword [ebp - 0x10], ecx
add eax, 0x28
dec esi
jne 0x40641d
push 0
mov ecx, 0x4269c8
call fcn.00408ff0
mov ecx, eax
call fcn.00408dd6
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
push eax
call fcn.00404f28
pop ecx
and dword [ebp - 4], 0
mov ecx, eax
call fcn.00408dd6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
push dword [ebp - 0x18]
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
mov ebx, eax
call fcn.00408d61
lea eax, [ebp - 0x5c]
push eax
call ebx
push dword [ebp - 0x58]
push dword [edi + 0x50]
call fcn.0040667e
push dword [ebp - 0x58]
mov dword [ebp - 0x14], eax
push dword [ebp - 0x10]
call fcn.0040667e
add esp, 0x10
cmp dword [ebp - 0x14], eax
jne 0x40665a
push dword [ebp + 0x24]
push 4
push 0x3000
push dword [ebp - 0x14]
push dword [edi + 0x34]
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x4064e7
push dword [ebp + 0x24]
push 4
push 0x3000
push dword [ebp - 0x14]
push eax
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40665a
lea eax, [ebp - 0x28]
push eax
call fcn.004054e8
pop ecx
mov ecx, eax
mov dword [ebp - 4], 1
call fcn.00408dd6
push eax
push dword [ebp - 0x18]
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], eax
call fcn.00408d61
lea eax, [ebp - 0x38]
push eax
call fcn.004058c5
pop ecx
mov ecx, eax
mov dword [ebp - 4], 2
call fcn.00408dd6
push eax
push dword [ebp - 0x18]
call esi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
mov esi, eax
call fcn.00408d61
push 0x40
push 8
call esi
push eax
call dword [ebp - 0x14]
mov esi, eax
test esi, esi
jne 0x406565
push dword [ebp + 0x24]
push 0x8000
push eax
push ebx
call dword [ebp + 0x14]
add esp, 0x10
jmp 0x40665a
mov dword [esi + 4], ebx
mov ax, word [edi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0x18]
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 + 0x24]
mov dword [esi + 0x34], eax
mov eax, dword [ebp - 0x58]
mov dword [esi + 0x3c], eax
push dword [edi + 0x54]
push dword [ebp + 0xc]
call fcn.00406690
pop ecx
test eax, eax
pop ecx
je 0x406653
push dword [ebp + 0x24]
push 4
push 0x1000
push dword [edi + 0x54]
push ebx
call dword [ebp + 0x10]
push dword [edi + 0x54]
mov dword [ebp + 0x24], eax
push dword [ebp + 8]
push eax
call fcn.0040a010
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
push esi
push edi
mov eax, dword [ecx + 0x3c]
push dword [ebp + 0xc]
add eax, edx
mov dword [esi], eax
push ecx
mov dword [eax + 0x34], ebx
call fcn.0040669c
add esp, 0x30
test eax, eax
je 0x406653
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
sub eax, dword [edi + 0x34]
je 0x406611
push eax
push esi
call fcn.004069fd
pop ecx
mov dword [esi + 0x18], eax
pop ecx
push 1
pop edi
jmp 0x406617
push 1
pop edi
mov dword [esi + 0x18], edi
push esi
call fcn.00406aa1
test eax, eax
pop ecx
je 0x406653
push esi
call fcn.00406777
test eax, eax
pop ecx
je 0x406653
push esi
call fcn.004069c2
test eax, eax
pop ecx
je 0x406653
mov eax, dword [esi]
xor ecx, ecx
mov eax, dword [eax + 0x28]
cmp eax, ecx
je 0x40666a
cmp dword [esi + 0x14], ecx
je 0x406663
push ecx
push edi
add eax, ebx
push ebx
call eax
test eax, eax
jne 0x40665e
push esi
call fcn.00406cdd
pop ecx
xor eax, eax
jmp 0x40666f
mov dword [esi + 0x10], edi
jmp 0x40666d
add eax, ebx
mov dword [esi + 0x38], eax
jmp 0x40666d
mov dword [esi + 0x38], ecx
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret