Function at 0x404f32
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x2c
push edi
push 0x40
xor edi, edi
call fcn.004048b7
pop ecx
test eax, eax
je 0x4051ac
push esi
mov esi, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [esi], ax
je 0x404f69
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x404f7f
mov eax, dword [esi + 0x3c]
add eax, 0xf8
push eax
mov eax, dword [ebp + 0xc]
call fcn.004048b7
pop ecx
test eax, eax
jne 0x404f86
xor eax, eax
jmp 0x4051ab
push ebx
mov ebx, dword [esi + 0x3c]
add ebx, esi
cmp dword [ebx], 0x4550
jne 0x404fff
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x404fff
mov edx, dword [ebx + 0x38]
test dl, 1
jne 0x404fff
movzx ecx, word [ebx + 6]
movzx eax, word [ebx + 0x14]
lea eax, [eax + ebx + 0x18]
test ecx, ecx
jbe 0x404fda
lea esi, [eax + 0xc]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 4]
mov eax, dword [esi]
test ecx, ecx
jne 0x404fca
add eax, edx
jmp 0x404fcc
add eax, ecx
cmp eax, edi
jbe 0x404fd2
mov edi, eax
add esi, 0x28
dec dword [ebp - 4]
jne 0x404fbd
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebx + 0x50]
lea ecx, [eax - 1]
lea esi, [edx + eax - 1]
not ecx
lea eax, [eax + edi - 1]
and esi, ecx
and eax, ecx
cmp esi, eax
je 0x405006
push 0xc1
jmp 0x405067
push dword [ebp + 0x24]
push 4
push 0x3000
push esi
push dword [ebx + 0x34]
call dword [ebp + 0x10]
mov edi, eax
add esp, 0x14
mov dword [ebp - 4], edi
test edi, edi
jne 0x40503e
push dword [ebp + 0x24]
push 4
push 0x3000
push esi
push eax
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
je 0x405065
mov edi, eax
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x405072
push dword [ebp + 0x24]
push 0x8000
push eax
push edi
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x405197
mov dword [esi + 4], edi
movzx eax, word [ebx + 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 - 0x28]
mov dword [esi + 0x3c], eax
push dword [ebx + 0x54]
mov eax, dword [ebp + 0xc]
call fcn.004048b7
pop ecx
test eax, eax
je 0x405190
push dword [ebp + 0x24]
push 4
push 0x1000
push dword [ebx + 0x54]
push edi
call dword [ebp + 0x10]
push dword [ebx + 0x54]
mov dword [ebp - 8], eax
push dword [ebp + 8]
push eax
call fcn.00409060
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
mov edx, dword [ebp - 8]
add eax, edx
push ebx
push dword [ebp + 0xc]
mov dword [esi], eax
mov dword [eax + 0x34], edi
push ecx
mov edi, esi
call fcn.004048cc
add esp, 0x2c
test eax, eax
je 0x405190
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
sub eax, dword [ebx + 0x34]
je 0x40511f
push eax
mov eax, esi
call fcn.00404b64
pop ecx
mov dword [esi + 0x18], eax
jmp 0x405126
mov dword [esi + 0x18], 1
call fcn.00404bea
test eax, eax
je 0x405190
push esi
call fcn.00404a5e
pop ecx
test eax, eax
je 0x405190
mov eax, dword [esi]
mov ebx, dword [esi + 4]
add eax, 0xc0
mov eax, dword [eax]
test eax, eax
je 0x405164
mov edi, dword [eax + ebx + 0xc]
test edi, edi
je 0x405164
jmp 0x40515e
push 0
push 1
push ebx
call eax
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x405154
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
xor edx, edx
cmp eax, edx
je 0x4051a5
mov ecx, dword [ebp - 4]
add eax, ecx
cmp dword [esi + 0x14], edx
je 0x4051a0
push edx
xor edi, edi
inc edi
push edi
push ecx
call eax
test eax, eax
jne 0x40519b
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.00404eaf
pop ecx
xor eax, eax
jmp 0x4051aa
mov dword [esi + 0x10], edi
jmp 0x4051a8
mov dword [esi + 0x38], eax
jmp 0x4051a8
mov dword [esi + 0x38], edx
mov eax, esi
pop ebx
pop esi
pop edi
leave
ret