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

Disassembly:
sub esp, 0x44
mov eax, dword [0x42a040]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push ebp
mov ebx, edx
mov edx, ecx
push esi
xor esi, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], edx
push edi
cmp ebx, 0x40
jb 0x402358
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x402358
mov ecx, dword [edx + 0x3c]
lea eax, [ecx + 0xf8]
cmp ebx, eax
jb 0x402358
cmp dword [ecx + edx], 0x4550
lea ebp, [ecx + edx]
jne 0x402358
mov eax, 0x14c
cmp word [ebp + 4], ax
jne 0x402358
mov ebx, dword [ebp + 0x38]
test bl, 1
jne 0x402358
movzx ecx, word [ebp + 0x14]
movzx edi, word [ebp + 6]
add ecx, 0x24
test edi, edi
je 0x401f93
add ecx, ebp
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x401f82
lea eax, [edx + ebx]
jmp 0x401f84
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub edi, 1
jne 0x401f74
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ecx, dword [esp + 0x30]
lea edx, [ecx - 1]
lea edi, [ecx - 1]
not edx
add edi, dword [ebp + 0x50]
lea eax, [ecx - 1]
add eax, esi
and edi, edx
and eax, edx
cmp edi, eax
jne 0x402358
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push edi
push dword [ebp + 0x34]
call esi
mov ebx, eax
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x401ff4
push 4
push 0x3000
push edi
push eax
call esi
mov ebx, eax
mov dword [esp + 0x1c], eax
test ebx, ebx
je 0x402358
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x40
push 8
mov dword [esp + 0x30], eax
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [esp + 0x24], edi
test edi, edi
jne 0x402036
push 0x8000
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00407dd8
add esp, 0x44
ret
mov dword [edi + 4], ebx
movzx eax, word [ebp + 0x16]
shr eax, 0xd
and eax, 1
mov dword [edi + 0x1c], 0x401e80
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0x401ea0
mov dword [edi + 0x24], 0x401ec0
mov dword [edi + 0x28], 0x401ed0
mov dword [edi + 0x2c], 0x401ee0
mov dword [edi + 0x34], 0
mov eax, dword [esp + 0x30]
mov dword [edi + 0x3c], eax
mov eax, dword [ebp + 0x54]
cmp dword [esp + 0x20], eax
jb 0x4022d5
push 4
push 0x1000
push eax
push ebx
call esi
push dword [ebp + 0x54]
mov ebx, dword [esp + 0x18]
mov esi, eax
push ebx
push esi
call fcn.00408e10
mov eax, dword [ebx + 0x3c]
add esp, 0xc
mov ecx, dword [esp + 0x1c]
add eax, esi
mov dword [edi], eax
mov dword [esp + 0x18], 0
mov dword [eax + 0x34], ecx
xor ecx, ecx
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esp + 0x10], edx
movzx ebx, word [eax + 0x14]
add ebx, 0x24
cmp cx, word [eax + 6]
jae 0x402186
add ebx, eax
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x40211c
mov esi, dword [ebp + 0x38]
test esi, esi
jle 0x40216c
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push esi
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x4022d5
mov eax, dword [ebx]
add eax, dword [esp + 0x10]
push esi
push 0
push eax
mov dword [ebx - 4], eax
call fcn.00409390
jmp 0x402165
mov eax, dword [ebx + 8]
add eax, ecx
cmp dword [esp + 0x20], eax
jb 0x4022d5
push dword [edi + 0x34]
mov eax, dword [ebx]
push 4
push 0x1000
add eax, edx
push ecx
push eax
mov eax, dword [edi + 0x1c]
call eax
add esp, 0x14
test eax, eax
je 0x4022d5
push dword [ebx + 4]
mov eax, dword [ebx + 8]
mov esi, dword [ebx]
add eax, dword [esp + 0x18]
add esi, dword [esp + 0x14]
push eax
push esi
call fcn.00408e10
mov dword [ebx - 4], esi
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov eax, dword [edi]
add ebx, 0x28
mov esi, dword [esp + 0x18]
inc esi
mov dword [esp + 0x18], esi
movzx eax, word [eax + 6]
cmp esi, eax
jl 0x4020d6
mov ebx, dword [edi]
mov eax, dword [ebx + 0x34]
sub eax, dword [ebp + 0x34]
mov dword [esp + 0x18], eax
je 0x402211
cmp dword [ebx + 0xa4], 0
jne 0x4021a5
xor eax, eax
jmp 0x402216
mov ecx, dword [edi + 4]
mov ebx, dword [ebx + 0xa0]
add ebx, ecx
mov dword [esp + 0x14], ecx
mov eax, dword [ebx]
test eax, eax
je 0x402211
mov edi, dword [esp + 0x18]
nop
lea ebp, [eax + ecx]
xor esi, esi
mov ecx, dword [ebx + 4]
lea edx, [ebx + 8]
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x402200
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x4021f0
and eax, 0xfff
add dword [eax + ebp], edi
mov ecx, dword [ebx + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x4021d5
mov eax, dword [ebx + ecx]
add ebx, ecx
mov ecx, dword [esp + 0x14]
test eax, eax
jne 0x4021c0
mov edi, dword [esp + 0x24]
mov eax, 1
mov ecx, edi
mov dword [edi + 0x18], eax
call fcn.00401d40
test eax, eax
je 0x4022d5
mov ecx, edi
call fcn.00401bf0
test eax, eax
je 0x4022d5
mov eax, dword [edi]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x402265
mov ebx, dword [edi + 4]
mov esi, dword [esi + ebx + 0xc]
test esi, esi
je 0x402265
mov eax, dword [esi]
test eax, eax
je 0x402265
push 0
push 1
push ebx
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x402254
mov eax, dword [edi]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4022b9
mov ecx, dword [esp + 0x1c]
add eax, ecx
cmp dword [edi + 0x14], 0
je 0x4022a1
push 0
push 1
push ecx
call eax
test eax, eax
je 0x4022d5
mov dword [edi + 0x10], 1
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00407dd8
add esp, 0x44
ret
mov dword [edi + 0x38], eax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00407dd8
add esp, 0x44
ret
mov dword [edi + 0x38], 0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00407dd8
add esp, 0x44
ret
cmp dword [edi + 0x10], 0
je 0x4022ec
mov eax, dword [edi]
mov ecx, dword [edi + 4]
push 0
push 0
mov eax, dword [eax + 0x28]
push ecx
add eax, ecx
call eax
push dword [edi + 0x30]
call fcn.0040d4fd
add esp, 4
cmp dword [edi + 8], 0
je 0x402330
xor ebx, ebx
cmp dword [edi + 0xc], ebx
jle 0x402325
xor esi, esi
mov eax, dword [edi + 8]
mov eax, dword [esi + eax]
test eax, eax
je 0x40231c
push dword [edi + 0x34]
push eax
mov eax, dword [edi + 0x2c]
call eax
add esp, 8
inc ebx
add esi, 4
cmp ebx, dword [edi + 0xc]
jl 0x402306
push dword [edi + 8]
call fcn.0040d4fd
add esp, 4
mov eax, dword [edi + 4]
test eax, eax
je 0x40234a
push dword [edi + 0x34]
push 0x8000
push 0
push eax
mov eax, dword [edi + 0x20]
call eax
add esp, 0x10
push edi
push 0
call dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x50]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407dd8
add esp, 0x44
ret