Function at 0x4a2cd0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
cmp dword [ebp + 0x10], 0x40
push ebx
push edi
jb 0x4a2ce8
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x4a2cef
xor eax, eax
jmp 0x4a2f37
push esi
mov esi, dword [ecx + 0x3c]
lea eax, [esi + 0xf8]
cmp dword [ebp + 0x10], eax
jl 0x4a2f34
add esi, ecx
cmp dword [esi], 0x4550
jne 0x4a2f34
mov ax, word [esi + 0x16]
test ah, 0x20
jne 0x4a2f34
test al, 2
je 0x4a2f34
mov ax, word [esi + 0x14]
cmp ax, 0xe0
je 0x4a2d3f
cmp ax, 0xf0
jne 0x4a2f34
cmp ax, 0xe0
jne 0x4a2d67
mov al, byte [0x4e184a]
mov byte [0x4e184e], al
mov al, byte [0x4e184c]
mov byte [0x4e1845], 4
mov word [0x4e1848], 0xf8
mov byte [0x4e1844], 0
jmp 0x4a2d8d
mov al, byte [0x4e184b]
mov byte [0x4e184e], al
mov al, byte [0x4e184d]
mov byte [0x4e1845], 8
mov word [0x4e1848], 0x108
mov byte [0x4e1844], 0x30
movsx ebx, word [0x4e1848]
add ebx, esi
push ebx
push esi
push dword [ebp + 0x10]
mov byte [0x4e184f], al
push ecx
call fcn.0049eea1
mov edi, dword [ebp + 0x20]
add esp, 0x10
mov dword [edi], eax
or eax, edx
mov dword [edi + 4], edx
je 0x4a2f34
mov eax, dword [esi + 0x54]
mov dl, byte [0x4e1845]
mov dword [ebp + 0x10], eax
movzx eax, word [esi + 6]
test eax, eax
jle 0x4a2de4
add ebx, 0x14
mov ecx, dword [ebx]
test ecx, ecx
je 0x4a2dde
cmp ecx, dword [ebp + 0x10]
jae 0x4a2dde
mov dword [ebp + 0x10], ecx
add ebx, 0x28
dec eax
jne 0x4a2dd0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dl, 4
jne 0x4a2dfa
mov ecx, dword [eax + 0x34]
and dword [ebp - 0xc], 0
jmp 0x4a2e03
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0xc], eax
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x40
push 0x1000
push dword [edi]
push ecx
call ebx
mov esi, dword [ebp + 0x1c]
cdq
mov dword [esi], eax
or eax, edx
mov dword [esi + 4], edx
jne 0x4a2e3d
push 0x40
push 0x1000
push dword [edi]
push 0
call ebx
cdq
mov dword [esi], eax
or eax, edx
mov dword [esi + 4], edx
je 0x4a2f34
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [esi]
call fcn.004147ef
mov eax, dword [esi]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x18]
add eax, ecx
mov dword [edx], eax
movsx ecx, word [0x4e1848]
add ecx, eax
mov dword [ebp - 8], ecx
mov dword [edi], ecx
mov cl, byte [0x4e1845]
add esp, 0xc
cmp cl, 4
jne 0x4a2e7a
mov edi, dword [eax + 0x38]
jmp 0x4a2e7f
mov edi, dword [edx]
mov edi, dword [edi + 0x38]
cmp cl, 4
mov edx, dword [edx]
mov dword [ebp + 0x10], edi
mov di, word [edx + 6]
mov word [ebp - 0xc], di
jne 0x4a2e96
mov eax, dword [eax + 0x54]
jmp 0x4a2e99
mov eax, dword [edx + 0x54]
push dword [ebp + 0x10]
push 0
push eax
call fcn.0049ee72
mov ebx, eax
movzx eax, word [ebp - 0xc]
add esp, 0xc
add ebx, dword [esi]
mov edi, edx
adc edi, dword [esi + 4]
test eax, eax
jle 0x4a2f2f
mov ecx, dword [ebp - 8]
and dword [ebp - 4], 0
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add eax, ecx
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4a2edd
xor edi, edi
add ecx, dword [esi]
adc edi, dword [esi + 4]
mov ebx, ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x4a2f12
mov eax, dword [eax + 0x14]
add eax, dword [ebp + 8]
push ecx
push eax
push ebx
call fcn.004147ef
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], eax
add eax, ecx
mov ecx, dword [eax + 0x10]
add esp, 0xc
cmp dword [eax + 8], ecx
jae 0x4a2f12
push dword [ebp + 0x10]
push 0
push ecx
jmp 0x4a2f1a
push dword [ebp + 0x10]
push 0
push dword [eax + 8]
call fcn.0049ee72
add esp, 0xc
add ebx, eax
adc edi, edx
add dword [ebp - 4], 0x28
dec dword [ebp - 0xc]
jne 0x4a2ec5
xor eax, eax
inc eax
jmp 0x4a2f36
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret