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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0xc], eax
mov edx, dword [0x479d5c]
mov eax, 0x10
call fcn.0040505c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebp - 0x10]
xor edx, edx
mov dword [eax + 8], edx
push 0
mov eax, dword [ebp - 0x10]
add eax, 0xc
mov ecx, 1
mov edx, dword [0x479d30]
call fcn.00405604
add esp, 4
push ebp
push 0x47a20b
push dword fs:[0]
mov dword fs:[0], esp
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
push 0x40
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x47a078
mov eax, dword [ebp - 0x14]
cmp word [eax], 0x5a4d
je 0x47a082
call fcn.00403b8c
jmp 0x47a212
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 0x3c]
add esi, dword [ebp - 4]
push 0xf8
push esi
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x47a0a2
cmp dword [esi], 0x4550
je 0x47a0ac
call fcn.00403b8c
jmp 0x47a212
xor edx, edx
cmp word [esi + 4], 0x14c
je 0x47a0c0
call fcn.00403b8c
jmp 0x47a212
mov ebx, esi
add ebx, 0xf8
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x47a0d9
call fcn.00403b8c
jmp 0x47a212
push 0x40
push 0x3000
add edx, eax
push edx
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov edi, eax
test edi, edi
jne 0x47a0fa
call fcn.00403b8c
jmp 0x47a212
movzx eax, word [esi + 6]
mov dword [ebp - 0x18], eax
mov ecx, ebx
sub ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
shl eax, 3
lea eax, [eax + eax*4]
add ecx, eax
mov edx, dword [ebp - 0x14]
mov eax, edi
call fcn.004070b0
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x47a142
inc eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
add edx, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
add eax, edi
call fcn.004070b0
add ebx, 0x28
dec dword [ebp - 0x1c]
jne 0x47a127
mov eax, dword [esi + 0xa0]
test eax, eax
je 0x47a161
mov edx, dword [esi + 0xa4]
push edx
mov ecx, eax
add ecx, edi
mov eax, dword [esi + 0x34]
mov edx, edi
call fcn.00479d80
mov al, byte [ebp - 5]
xor al, 1
test al, al
je 0x47a187
mov eax, dword [esi + 0x80]
add eax, edi
push eax
push edi
call fcn.00479e30
test al, al
jne 0x47a187
call fcn.00403b8c
jmp 0x47a212
cmp byte [ebp - 5], 1
cmc
sbb eax, eax
mov edx, dword [ebp - 0x10]
mov dword [edx + 4], eax
mov edx, dword [ebp - 0x10]
mov eax, edi
mov dword [edx], eax
mov ecx, dword [esi + 0x28]
mov edx, ecx
add edx, eax
test ecx, ecx
je 0x47a1df
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 8], edx
mov cl, byte [ebp - 5]
xor cl, 1
test cl, cl
je 0x47a1df
xor ecx, ecx
push ebp
push 0x47a1d5
push dword fs:[ecx]
mov dword fs:[ecx], esp
push 0
push 1
push eax
call edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x47a1df
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47a212
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
jbe 0x47a1fc
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
jmp 0x47a20a
mov edx, dword [0x479d5c]
mov eax, dword [ebp - 0x10]
call fcn.00405070
ret
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret