Function at 0x3ec09ec
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 0x10]
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x40
jl 0x3ec0be9
mov eax, dword [ebp - 0x14]
cmp word [eax], 0x5a4d
jne 0x3ec0be9
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x3c]
mov edx, eax
add edx, 0xf8
cmp edx, dword [ebp - 8]
jg 0x3ec0be9
mov ebx, eax
add ebx, dword [ebp - 0x14]
cmp dword [ebx], 0x4550
jne 0x3ec0be9
movzx eax, word [ebx + 0x16]
test ah, 0x20
jne 0x3ec0be9
test al, 2
je 0x3ec0be9
movzx eax, word [ebx + 0x14]
cmp eax, 0xe0
jne 0x3ec0be9
mov esi, ebx
add esi, 0xf8
push esi
mov ecx, ebx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
call fcn.03ec091c
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x3ec0be9
push 0x40
push 0x1000
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
je 0x3ec0be9
mov eax, dword [ebx + 0x54]
mov dword [ebp - 0x18], eax
movzx eax, word [ebx + 6]
dec eax
test eax, eax
jl 0x3ec0ae9
inc eax
mov dword [ebp - 0x20], eax
xor ebx, ebx
lea eax, [ebx + ebx*4]
mov eax, dword [esi + eax*8 + 0x14]
test eax, eax
je 0x3ec0ae3
cmp eax, dword [ebp - 0x18]
jae 0x3ec0ae3
mov dword [ebp - 0x18], eax
inc ebx
dec dword [ebp - 0x20]
jne 0x3ec0ad0
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
call fcn.03cb5330
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
add eax, dword [edx + 0x3c]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
add eax, 0xf8
mov dword [edi], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov edx, dword [eax + 0x38]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 0x54]
call fcn.03ec0908
mov edx, dword [ebp + 0xc]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jl 0x3ec0be5
inc eax
mov dword [ebp - 0x20], eax
xor ebx, ebx
lea esi, [ebx + ebx*4]
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 0xc]
test eax, eax
je 0x3ec0b61
mov edx, dword [ebp + 0xc]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 0x10]
test eax, eax
je 0x3ec0bc2
push eax
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 0x14]
add eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
pop ecx
call fcn.03cb5330
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 0x10]
mov edx, dword [edi]
cmp eax, dword [edx + esi*8 + 8]
jbe 0x3ec0ba7
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 0x10]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
mov edx, dword [edx + 0x38]
call fcn.03ec0908
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
jmp 0x3ec0bdb
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 8]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
mov edx, dword [edx + 0x38]
call fcn.03ec0908
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
jmp 0x3ec0bdb
mov eax, dword [edi]
mov eax, dword [eax + esi*8 + 8]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
mov edx, dword [edx + 0x38]
call fcn.03ec0908
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
inc ebx
dec dword [ebp - 0x20]
jne 0x3ec0b4c
mov byte [ebp - 0xd], 1
movzx eax, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc