Function at 0x49982a
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 0x499842
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x499849
xor eax, eax
jmp 0x499a91
push esi
mov esi, dword [ecx + 0x3c]
lea eax, [esi + 0xf8]
cmp dword [ebp + 0x10], eax
jl 0x499a8e
add esi, ecx
cmp dword [esi], 0x4550
jne 0x499a8e
mov ax, word [esi + 0x16]
test ah, 0x20
jne 0x499a8e
test al, 2
je 0x499a8e
mov ax, word [esi + 0x14]
cmp ax, 0xe0
je 0x499899
cmp ax, 0xf0
jne 0x499a8e
cmp ax, 0xe0
jne 0x4998c1
mov al, byte [0x4d683a]
mov byte [0x4d683e], al
mov al, byte [0x4d683c]
mov byte [0x4d6835], 4
mov word [0x4d6838], 0xf8
mov byte [0x4d6834], 0
jmp 0x4998e7
mov al, byte [0x4d683b]
mov byte [0x4d683e], al
mov al, byte [0x4d683d]
mov byte [0x4d6835], 8
mov word [0x4d6838], 0x108
mov byte [0x4d6834], 0x30
movsx ebx, word [0x4d6838]
add ebx, esi
push ebx
push esi
push dword [ebp + 0x10]
mov byte [0x4d683f], al
push ecx
call fcn.00495cb1
mov edi, dword [ebp + 0x20]
add esp, 0x10
mov dword [edi], eax
or eax, edx
mov dword [edi + 4], edx
je 0x499a8e
mov eax, dword [esi + 0x54]
mov dl, byte [0x4d6835]
mov dword [ebp + 0x10], eax
movzx eax, word [esi + 6]
test eax, eax
jle 0x49993e
add ebx, 0x14
mov ecx, dword [ebx]
test ecx, ecx
je 0x499938
cmp ecx, dword [ebp + 0x10]
jae 0x499938
mov dword [ebp + 0x10], ecx
add ebx, 0x28
dec eax
jne 0x49992a
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dl, 4
jne 0x499954
mov ecx, dword [eax + 0x34]
and dword [ebp - 0xc], 0
jmp 0x49995d
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 0x499997
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 0x499a8e
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [esi]
call fcn.00413f99
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 [0x4d6838]
add ecx, eax
mov dword [ebp - 8], ecx
mov dword [edi], ecx
mov cl, byte [0x4d6835]
add esp, 0xc
cmp cl, 4
jne 0x4999d4
mov edi, dword [eax + 0x38]
jmp 0x4999d9
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 0x4999f0
mov eax, dword [eax + 0x54]
jmp 0x4999f3
mov eax, dword [edx + 0x54]
push dword [ebp + 0x10]
push 0
push eax
call fcn.00495c82
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 0x499a89
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 0x499a37
xor edi, edi
add ecx, dword [esi]
adc edi, dword [esi + 4]
mov ebx, ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x499a6c
mov eax, dword [eax + 0x14]
add eax, dword [ebp + 8]
push ecx
push eax
push ebx
call fcn.00413f99
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 0x499a6c
push dword [ebp + 0x10]
push 0
push ecx
jmp 0x499a74
push dword [ebp + 0x10]
push 0
push dword [eax + 8]
call fcn.00495c82
add esp, 0xc
add ebx, eax
adc edi, edx
add dword [ebp - 4], 0x28
dec dword [ebp - 0xc]
jne 0x499a1f
xor eax, eax
inc eax
jmp 0x499a90
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret