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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
sub esp, 0x2c
cmp word [edx], 0x5a4d
push ebx
push edi
je 0x401347
xor eax, eax
jmp 0x4014a1
push esi
mov esi, dword [edx + 0x3c]
add esi, edx
cmp dword [esi], 0x4550
lea eax, [esi + 0x18]
jne 0x40149e
cmp word [esi + 0x14], 0xe0
jne 0x40149e
cmp dword [eax + 0x68], 0
je 0x40149e
cmp word [eax], 0x10b
jne 0x40149e
movzx eax, word [esi + 6]
cmp ax, 1
jb 0x40149e
movzx ecx, word [esi + 0x14]
movzx eax, ax
mov edi, eax
imul edi, edi, 0x28
lea ecx, [ecx + esi + 0x18]
sub edi, edx
add edi, ecx
test eax, eax
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edi
jbe 0x4013c1
add ecx, 0xc
mov edx, dword [ecx + 4]
mov ebx, dword [ecx]
add edx, ebx
cmp dword [ebp - 4], edx
jae 0x4013bb
mov dword [ebp - 4], edx
add ecx, 0x28
dec eax
jne 0x4013ac
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
lea eax, [ecx + eax - 1]
xor edx, edx
div ecx
mov ebx, 0x422fff
and ebx, 0xfffff000
imul eax, ecx
mov ecx, 0xb22000
sub ecx, ebx
cmp eax, ecx
ja 0x40149e
test ebx, ebx
je 0x40149e
push edi
push dword [ebp + 8]
push ebx
call fcn.004132d0
and dword [ebp - 4], 0
add esp, 0xc
cmp word [esi + 6], 0
jbe 0x401442
mov edi, dword [ebp - 8]
add edi, 0x14
mov eax, dword [edi]
add eax, dword [ebp + 8]
push dword [edi - 4]
push eax
mov eax, dword [edi - 8]
add eax, ebx
push eax
call fcn.004132d0
movzx eax, word [esi + 6]
add esp, 0xc
inc dword [ebp - 4]
add edi, 0x28
cmp dword [ebp - 4], eax
jb 0x40141c
mov eax, dword [ebx + 0x3c]
lea edx, [eax + ebx + 0x18]
mov edi, dword [edx + 0x68]
add edi, ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], edi
mov eax, dword [edi + 0xc]
test eax, eax
jne 0x401460
cmp dword [edi + 4], eax
je 0x4014cd
lea esi, [eax + ebx]
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 8], eax
jne 0x40147f
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp + 8], eax
je 0x40149e
mov esi, dword [edi]
mov edi, dword [edi + 0x10]
add esi, ebx
add edi, ebx
jmp 0x4014bb
js 0x4014a7
lea eax, [eax + ebx + 2]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4014b3
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret 8
movzx eax, ax
push eax
push dword [ebp + 8]
call fcn.004012e7
mov dword [edi], eax
add esi, 4
add edi, 4
mov eax, dword [esi]
test eax, eax
jne 0x40148a
add dword [ebp - 4], 0x14
mov edx, dword [ebp - 8]
mov edi, dword [ebp - 4]
jmp 0x401454
mov ecx, dword [edx + 0x88]
test ecx, ecx
je 0x40151c
add ecx, ebx
jmp 0x401517
lea edi, [ecx + 8]
jmp 0x40150b
movzx eax, word [edi]
mov esi, eax
and esi, 0xf000
cmp esi, 0x3000
jne 0x401505
and eax, 0xfff
add eax, ebx
add eax, dword [ecx]
mov esi, ebx
sub esi, dword [edx + 0x1c]
add dword [eax], esi
jmp 0x401509
test esi, esi
jne 0x40149e
inc edi
inc edi
mov eax, dword [ecx + 4]
add eax, ecx
cmp edi, eax
jb 0x4014e0
add ecx, dword [ecx + 4]
cmp dword [ecx], 0
jne 0x4014db
mov edx, dword [edx + 0x10]
test edx, edx
je 0x401531
lea eax, [edx + ebx]
test eax, eax
je 0x401531
push 0
push 1
push ebx
call eax
mov eax, ebx
jmp 0x4014a0