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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
xor ebx, ebx
push 8
xor eax, eax
pop ecx
lea edi, [ebp - 0x24]
mov dword [ebp - 0x28], ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov edx, 0x5a4d
xor esi, esi
mov dword [ebp - 4], ebx
lea edi, [ecx + eax]
cmp word [eax], dx
jne 0x4045dc
cmp dword [edi], 0x4550
jne 0x4045dc
mov eax, dword [ebp + 0xc]
cmp eax, 0x40
jb 0x4045d5
cmp eax, dword [edi + 0x54]
jb 0x4045d5
add ecx, 0xf8
cmp eax, ecx
jb 0x4045d5
mov eax, 0x14c
cmp word [edi + 4], ax
je 0x404459
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x404610
movzx edx, word [edi + 6]
movzx eax, word [edi + 0x14]
lea eax, [eax + edi + 0x18]
test edx, edx
je 0x40448a
lea ecx, [eax + 0xc]
mov esi, dword [ecx + 4]
test esi, esi
jne 0x40447a
mov eax, dword [edi + 0x38]
add eax, dword [ecx]
jmp 0x40447e
mov eax, dword [ecx]
add eax, esi
cmp eax, ebx
jbe 0x404484
mov ebx, eax
add ecx, 0x28
dec edx
jne 0x40446c
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x24]
mov edx, dword [edi + 0x50]
lea ecx, [eax - 1]
lea esi, [edx + eax - 1]
not ecx
lea eax, [eax + ebx - 1]
and esi, ecx
and eax, ecx
cmp esi, eax
jne 0x404449
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push esi
push dword [edi + 0x34]
call ebx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4044e2
push 4
push 0x3000
push esi
push eax
call ebx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4044e2
push 0xe
jmp 0x40444e
push 0x1c
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 0x404500
push 0xe
jmp 0x4045e1
mov eax, dword [ebp - 4]
push 4
mov dword [esi + 4], eax
mov ecx, dword [ebp - 0x24]
push 0x1000
mov dword [esi + 0x18], ecx
push dword [edi + 0x54]
push eax
call ebx
mov ebx, eax
test ebx, ebx
je 0x4044f9
push dword [edi + 0x54]
push dword [ebp + 8]
push ebx
call fcn.00409420
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
mov edx, dword [ebp - 4]
push esi
push edi
push dword [ebp + 0xc]
add eax, ebx
mov dword [esi], eax
push ecx
mov dword [eax + 0x34], edx
call fcn.00403e55
add esp, 0x1c
test eax, eax
je 0x4045e7
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
sub eax, dword [edi + 0x34]
push 1
pop ebx
je 0x40456c
push eax
mov eax, esi
call fcn.00403f20
pop ecx
mov dword [esi + 0x14], eax
jmp 0x40456f
mov dword [esi + 0x14], ebx
mov ecx, esi
call fcn.00403fa8
test eax, eax
je 0x4045e7
push esi
call fcn.004041ae
pop ecx
test eax, eax
je 0x4045e7
mov eax, dword [esi]
mov eax, dword [eax + 0xc0]
test eax, eax
je 0x4045af
mov ecx, dword [esi + 4]
mov edi, dword [eax + ecx + 0xc]
test edi, edi
je 0x4045af
jmp 0x4045a9
push 0
push ebx
push dword [esi + 4]
call eax
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x40459e
mov eax, dword [esi]
mov ecx, dword [eax + 0x28]
test ecx, ecx
je 0x4045d1
mov eax, dword [esi + 4]
push 0
push ebx
add ecx, eax
push eax
call ecx
test eax, eax
jne 0x4045ce
push 0x45a
jmp 0x4045e1
mov dword [esi + 0x10], ebx
mov eax, esi
jmp 0x404612
push 0xd
jmp 0x40444e
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
cmp dword [ebp - 4], edi
je 0x4045fd
push 0x8000
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp esi, edi
je 0x404610
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret