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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x46900c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x48], 0
push 0x40
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x2c]
call fcn.00408e70
test eax, eax
jne 0x4098b3
xor eax, eax
jmp 0x409cd5
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x4098d8
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx + 0x3c]
add edx, 0xf8
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x2c]
call fcn.00408e70
test eax, eax
jne 0x4098fc
xor eax, eax
jmp 0x409cd5
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0x4550
je 0x409925
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov ecx, dword [ebp - 0x30]
movzx edx, word [ecx + 4]
cmp edx, 0x14c
je 0x409946
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38]
and ecx, 1
je 0x409963
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov edx, dword [ebp - 0x30]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 0x30]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x40], 0
jmp 0x409998
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x38]
add eax, 0x28
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x30]
movzx edx, word [ecx + 6]
cmp dword [ebp - 0x40], edx
jae 0x4099da
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x10], 0
jne 0x4099bb
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x5c]
mov dword [ebp - 0x44], edx
jmp 0x4099ca
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x38]
add ecx, dword [edx + 0x10]
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x48]
jbe 0x4099d8
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x48], ecx
jmp 0x409986
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x50]
push edx
call fcn.00408e40
add esp, 8
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00408e40
add esp, 8
cmp dword [ebp - 0x4c], eax
je 0x409a21
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov edx, dword [ebp + 0x24]
push edx
push 4
push 0x3000
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 0x34]
push edx
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x409a75
mov eax, dword [ebp + 0x24]
push eax
push 4
push 0x3000
mov ecx, dword [ebp - 0x4c]
push ecx
push 0
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x409a75
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, dword [ebp - 0x2c]
mov dword [edx], eax
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
jne 0x409ab7
mov ecx, dword [ebp + 0x24]
push ecx
push 0x8000
push 0
mov edx, dword [ebp - 0x34]
push edx
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x409cd5
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0x30]
movzx ecx, word [eax + 0x16]
and ecx, 0x2000
je 0x409ada
mov dword [ebp - 0x50], 1
jmp 0x409ae1
mov dword [ebp - 0x50], 0
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x50]
mov dword [eax + 0x14], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x1c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x20], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x24], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x1c]
mov dword [eax + 0x28], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x20]
mov dword [eax + 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x24]
mov dword [eax + 0x34], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x3c], ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0x54]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x2c]
call fcn.00408e70
test eax, eax
jne 0x409b5a
jmp 0x409ccb
mov edx, dword [ebp + 0x24]
push edx
push 4
push 0x1000
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x54]
push eax
call fcn.0042c730
add esp, 0xc
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x54]
add edx, dword [ecx + 0x3c]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov dword [ecx], edx
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x34]
mov dword [ecx + 0x34], edx
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x2c]
call fcn.00408ea0
test eax, eax
jne 0x409bcf
jmp 0x409ccb
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x30]
mov ecx, dword [edx + 0x34]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x58], ecx
je 0x409bfa
mov edx, dword [ebp - 0x58]
push edx
mov ecx, dword [ebp - 0x2c]
call fcn.00409420
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
mov dword [edx + 0x18], eax
jmp 0x409c06
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov dword [ecx + 0x18], 1
mov ecx, dword [ebp - 0x2c]
call fcn.00409540
test eax, eax
jne 0x409c1c
jmp 0x409ccb
mov ecx, dword [ebp - 0x2c]
call fcn.00409200
test eax, eax
jne 0x409c32
jmp 0x409ccb
mov ecx, dword [ebp - 0x2c]
call fcn.004093a0
test eax, eax
jne 0x409c48
jmp 0x409ccb
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [eax]
cmp dword [ecx + 0x28], 0
je 0x409cb8
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
cmp dword [eax + 0x14], 0
je 0x409ca1
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x34]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x60], ecx
push 0
push 1
mov edx, dword [ebp - 0x34]
push edx
call dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
jne 0x409c93
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x409ccb
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov dword [ecx + 0x10], 1
jmp 0x409cb6
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x34]
add edx, dword [ecx + 0x28]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax]
mov dword [ecx + 0x38], edx
jmp 0x409cc4
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx]
mov dword [eax + 0x38], 0
mov eax, 1
jmp 0x409cd5
mov ecx, dword [ebp - 0x2c]
call fcn.00409f50
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004291f2
mov esp, ebp
pop ebp
ret 0x20