Function at 0x401be6
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x42a040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov eax, edx
mov ebx, ecx
push 0x40
pop edx
mov ecx, eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], ebx
xor esi, esi
call fcn.004016ae
test eax, eax
je 0x401e24
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x401e24
mov edi, dword [ebx + 0x3c]
lea edx, [edi + 0xf8]
call fcn.004016ae
test eax, eax
je 0x401e24
add ebx, edi
cmp dword [ebx], 0x4550
jne 0x401e24
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x401e24
test byte [ebx + 0x38], 1
jne 0x401e24
movzx eax, word [ebx + 0x14]
movzx edx, word [ebx + 6]
add eax, 0x24
test edx, edx
je 0x401c90
lea ecx, [eax + ebx]
cmp dword [ecx + 4], 0
mov eax, dword [ebx + 0x38]
cmovne eax, dword [ecx + 4]
add eax, dword [ecx]
lea ecx, [ecx + 0x28]
cmp eax, esi
cmovbe eax, esi
mov esi, eax
sub edx, 1
jne 0x401c74
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebx + 0x50]
call fcn.004016a0
mov edx, dword [ebp - 0x24]
mov ecx, esi
mov edi, eax
call fcn.004016a0
cmp edi, eax
jne 0x401e24
push 0
push 4
push 0x3000
push edi
push dword [ebx + 0x34]
call fcn.00401b82
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x401cf6
push eax
push 4
push 0x3000
push edi
push eax
call fcn.00401b82
mov esi, eax
mov dword [ebp - 0x34], eax
add esp, 0x14
test esi, esi
je 0x401e24
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
jne 0x401d22
push eax
push 0x8000
push eax
push esi
call fcn.00401b99
add esp, 0x10
jmp 0x401e24
mov ecx, dword [ebp - 0x2c]
mov dword [edi + 4], esi
movzx eax, word [ebx + 0x16]
and dword [edi + 0x34], 0
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], fcn.00401b82
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], fcn.00401b99
mov dword [edi + 0x24], 0x401bad
mov dword [edi + 0x28], 0x401bbb
mov dword [edi + 0x2c], 0x401bcc
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x3c], eax
mov edx, dword [ebx + 0x54]
call fcn.004016ae
test eax, eax
je 0x401e1d
push 0
push 4
push 0x1000
push edx
push esi
call fcn.00401b82
push dword [ebx + 0x54]
mov esi, eax
push dword [ebp - 0x30]
push esi
call fcn.00407530
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
push edi
push ebx
mov eax, dword [ecx + 0x3c]
add eax, esi
mov esi, dword [ebp - 0x34]
mov dword [edi], eax
mov dword [eax + 0x34], esi
call fcn.004016b4
add esp, 0x28
test eax, eax
je 0x401e1d
mov eax, dword [edi]
mov edx, dword [eax + 0x34]
sub edx, dword [ebx + 0x34]
je 0x401dc4
mov ecx, edi
call fcn.004019a9
jmp 0x401dc7
xor eax, eax
inc eax
mov ecx, edi
mov dword [edi + 0x18], eax
call fcn.00401a4a
test eax, eax
je 0x401e1d
mov ecx, edi
call fcn.00401861
test eax, eax
je 0x401e1d
mov ecx, edi
call fcn.00401978
test eax, eax
je 0x401e1d
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x401e15
add eax, esi
cmp dword [edi + 0x14], 0
je 0x401e10
push 0
push 1
push esi
call eax
test eax, eax
je 0x401e1d
mov dword [edi + 0x10], 1
jmp 0x401e19
mov dword [edi + 0x38], eax
jmp 0x401e19
and dword [edi + 0x38], 0
mov eax, edi
jmp 0x401e26
mov ecx, edi
call fcn.00401e35
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406768
leave
ret