Function at 0x40243c
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 fcn.00401a30
test eax, eax
jne 0x402474
mov eax, 0
jmp 0x40293d
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x4024a1
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
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 fcn.00401a30
test eax, eax
jne 0x4024c9
mov eax, 0
jmp 0x40293d
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 0x402500
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 4]
cmp ax, 0x14c
je 0x402528
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x38]
and eax, 1
test eax, eax
je 0x402550
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
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 0x4025b8
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x402591
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x4025a2
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 0x4025b0
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 0x402577
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 fcn.00401a07
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 fcn.00401a07
cmp eax, dword [ebp - 0x30]
je 0x402621
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
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 0x4026a4
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 0x4026a4
mov dword [esp], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x40293d
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 0x40270e
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 0x40293d
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 fcn.00401a30
test eax, eax
jne 0x402791
jmp 0x40292d
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 fcn.00401a5d
test eax, eax
jne 0x402822
jmp 0x40292d
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 0x402857
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401fe3
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], eax
jmp 0x402861
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.004020e6
test eax, eax
jne 0x402875
jmp 0x40292d
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401dbf
test eax, eax
jne 0x402889
jmp 0x40292d
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401f65
test eax, eax
jne 0x40289d
jmp 0x40292d
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x40291e
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x402909
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 0x4028fd
mov dword [esp], 0x45a
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
jmp 0x40292d
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 1
jmp 0x402928
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 0x402928
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x38], 0
mov eax, dword [ebp - 0x20]
jmp 0x40293d
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00402bfa
mov eax, 0
leave
ret