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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
and dword [ebp - 4], 0
and dword [ebp - 0x20], 0
push 0x40
push dword [ebp + 0xc]
call fcn.00401036
test eax, eax
jne 0x40164c
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x401671
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x3c]
add eax, 0xf8
push eax
push dword [ebp + 0xc]
call fcn.00401036
test eax, eax
jne 0x401690
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
je 0x4016b9
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 8]
movzx eax, word [eax + 4]
cmp eax, 0x14c
je 0x4016d9
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38]
and eax, 1
je 0x4016f6
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x14]
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax + 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x34], eax
and dword [ebp - 0x18], 0
jmp 0x401726
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
add eax, 0x28
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax + 6]
cmp dword [ebp - 0x18], eax
jae 0x401768
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x10], 0
jne 0x401749
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x1c], eax
jmp 0x401758
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x10]
add eax, dword [ecx + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jbe 0x401766
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
jmp 0x401716
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push dword [ebp - 0x5c]
mov eax, dword [ebp - 8]
push dword [eax + 0x50]
call fcn.00401010
mov dword [ebp - 0x24], eax
push dword [ebp - 0x5c]
push dword [ebp - 0x20]
call fcn.00401010
cmp dword [ebp - 0x24], eax
je 0x4017a5
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
push dword [ebp + 0x24]
push 4
push 0x3000
push dword [ebp - 0x24]
mov eax, dword [ebp - 8]
push dword [eax + 0x34]
call dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4017ee
push dword [ebp + 0x24]
push 4
push 0x3000
push dword [ebp - 0x24]
push 0
call dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4017ee
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x401827
push dword [ebp + 0x24]
push 0x8000
push 0
push dword [ebp - 0xc]
call dword [ebp + 0x14]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4019f3
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x16]
and eax, 0x2000
je 0x401847
mov dword [ebp - 0x28], 1
jmp 0x40184b
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x20], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x24], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 0x28], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x20]
mov dword [eax + 0x2c], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x24]
mov dword [eax + 0x34], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x5c]
mov dword [eax + 0x3c], ecx
mov eax, dword [ebp - 8]
push dword [eax + 0x54]
push dword [ebp + 0xc]
call fcn.00401036
test eax, eax
jne 0x4018af
jmp 0x4019e9
push dword [ebp + 0x24]
push 4
push 0x1000
mov eax, dword [ebp - 8]
push dword [eax + 0x54]
push dword [ebp - 0xc]
call dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 8]
push dword [eax + 0x54]
push dword [ebp - 0x14]
push dword [ebp - 0x2c]
call fcn.0045c440
add esp, 0xc
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
add ecx, dword [eax + 0x3c]
mov eax, dword [ebp - 4]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x34], ecx
push dword [ebp - 4]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00401054
test eax, eax
je 0x401911
jmp 0x4019e9
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov eax, dword [eax + 0x34]
sub eax, dword [ecx + 0x34]
mov dword [ebp - 0x30], eax
je 0x401937
push dword [ebp - 0x30]
push dword [ebp - 4]
call fcn.004012a4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], eax
jmp 0x401941
mov eax, dword [ebp - 4]
mov dword [eax + 0x18], 1
push dword [ebp - 4]
call fcn.0040139c
test eax, eax
jne 0x401957
jmp 0x4019e9
push dword [ebp - 4]
call fcn.004010ff
test eax, eax
je 0x40196a
jmp 0x4019e9
push dword [ebp - 4]
call fcn.00401236
test eax, eax
jne 0x40197a
jmp 0x4019e9
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
je 0x4019dd
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
je 0x4019ca
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x38], ecx
push 0
push 1
push dword [ebp - 0xc]
call dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x4019be
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4019e9
mov eax, dword [ebp - 4]
mov dword [eax + 0x10], 1
jmp 0x4019db
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x28]
mov eax, dword [ebp - 4]
mov dword [eax + 0x38], ecx
jmp 0x4019e4
mov eax, dword [ebp - 4]
and dword [eax + 0x38], 0
mov eax, dword [ebp - 4]
jmp 0x4019f3
push dword [ebp - 4]
call fcn.00401c6b
xor eax, eax
leave
ret 0x20