Function at 0x402230
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.00401824
test eax, eax
jne 0x402268
mov eax, 0
jmp 0x402731
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
movzx eax, word [eax]
cmp ax, 0x5a4d
je 0x402295
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
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.00401824
test eax, eax
jne 0x4022bd
mov eax, 0
jmp 0x402731
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 0x4022f4
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
mov eax, dword [ebp - 0x28]
movzx eax, word [eax + 4]
cmp ax, 0x14c
je 0x40231c
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x38]
and eax, 1
test eax, eax
je 0x402344
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
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 0x4023ac
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x10]
test eax, eax
jne 0x402385
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x402396
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 0x4023a4
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 0x40236b
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.004017fb
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.004017fb
cmp eax, dword [ebp - 0x30]
je 0x402415
mov dword [esp], 0xc1
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
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 0x402498
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 0x402498
mov dword [esp], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x402731
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 0x402502
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 0x402731
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.00401824
test eax, eax
jne 0x402585
jmp 0x402721
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.00401851
test eax, eax
jne 0x402616
jmp 0x402721
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 0x40264b
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401dd7
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], eax
jmp 0x402655
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x18], 1
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401eda
test eax, eax
jne 0x402669
jmp 0x402721
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401bb3
test eax, eax
jne 0x40267d
jmp 0x402721
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00401d59
test eax, eax
jne 0x402691
jmp 0x402721
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x402712
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4026fd
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 0x4026f1
mov dword [esp], 0x45a
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
jmp 0x402721
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x10], 1
jmp 0x40271c
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 0x40271c
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x38], 0
mov eax, dword [ebp - 0x20]
jmp 0x402731
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.004029ee
mov eax, 0
leave
ret