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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [esp + 4], 0x40
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.unk_39
test eax, eax
jne 0x4027d8
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x402805
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x3c]
add eax, 0xf8
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.unk_39
test eax, eax
jne 0x40282d
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp + 8]
add eax, edx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
cmp eax, 0x4550
je 0x402864
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 4]
cmp ax, 0x14c
je 0x40288c
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x38]
and eax, 1
test eax, eax
je 0x4028b4
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 0x14]
movzx edx, ax
mov eax, dword [ebp - 0x28]
add eax, edx
add eax, 0x18
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x14], 0
jmp 0x40291c
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x4028f5
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x402906
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jbe 0x402914
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
add dword [ebp - 0x14], 1
add dword [ebp - 0x10], 0x28
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 6]
movzx eax, ax
cmp eax, dword [ebp - 0x14]
ja 0x4028db
lea eax, [ebp - 0x64]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
call eax
sub esp, 4
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x50]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.unk_36
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym.unk_36
cmp eax, dword [ebp - 0x30]
je 0x402985
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp + 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [ebp + 0x10]
call eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x402a08
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [ebp + 0x10]
call eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x402a08
mov dword [esp], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], 8
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call eax
sub esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x402a72
mov eax, dword [ebp + 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [ebp + 0x14]
call eax
mov dword [esp], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402ca1
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 0x16]
movzx eax, ax
and eax, 0x2000
test eax, eax
setne al
movzx edx, al
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x10]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x14]
mov dword [eax + 0x20], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x18]
mov dword [eax + 0x24], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x1c]
mov dword [eax + 0x28], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x20]
mov dword [eax + 0x2c], edx
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp + 0x24]
mov dword [eax + 0x34], edx
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x3c], edx
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x54]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym.unk_39
test eax, eax
jne 0x402af5
jmp 0x402c91
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x54]
mov edx, dword [ebp + 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [ebp + 0x10]
call eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x54]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 0x34]
add edx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax], edx
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.unk_40
test eax, eax
jne 0x402b86
jmp 0x402c91
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x34]
sub edx, eax
mov eax, edx
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x402bbb
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.unk_45
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], eax
jmp 0x402bc5
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.unk_46
test eax, eax
jne 0x402bd9
jmp 0x402c91
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.unk_43
test eax, eax
jne 0x402bed
jmp 0x402c91
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.unk_44
test eax, eax
jne 0x402c01
jmp 0x402c91
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x402c82
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x402c6d
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
add eax, edx
mov dword [ebp - 0x3c], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call eax
sub esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x402c61
mov dword [esp], 0x45a
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
jmp 0x402c91
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 1
jmp 0x402c8c
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
add edx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x38], edx
jmp 0x402c8c
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x38], 0
mov eax, dword [ebp - 0x20]
jmp 0x402ca1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym.unk_57
mov eax, 0
leave
ret