Function at 0x49c2e5
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 0x49c2fd
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x49c304
xor eax, eax
jmp 0x49c54c
push esi
mov esi, dword [ecx + 0x3c]
lea eax, [esi + 0xf8]
cmp dword [ebp + 0x10], eax
jl 0x49c549
add esi, ecx
cmp dword [esi], 0x4550
jne 0x49c549
mov ax, word [esi + 0x16]
test ah, 0x20
jne 0x49c549
test al, 2
je 0x49c549
mov ax, word [esi + 0x14]
cmp ax, 0xe0
je 0x49c354
cmp ax, 0xf0
jne 0x49c549
cmp ax, 0xe0
jne 0x49c37c
mov al, byte [0x4d983a]
mov byte [0x4d983e], al
mov al, byte [0x4d983c]
mov byte [0x4d9835], 4
mov word [0x4d9838], 0xf8
mov byte [0x4d9834], 0
jmp 0x49c3a2
mov al, byte [0x4d983b]
mov byte [0x4d983e], al
mov al, byte [0x4d983d]
mov byte [0x4d9835], 8
mov word [0x4d9838], 0x108
mov byte [0x4d9834], 0x30
movsx ebx, word [0x4d9838]
add ebx, esi
push ebx
push esi
push dword [ebp + 0x10]
mov byte [0x4d983f], al
push ecx
call fcn.00498770
mov edi, dword [ebp + 0x20]
add esp, 0x10
mov dword [edi], eax
or eax, edx
mov dword [edi + 4], edx
je 0x49c549
mov eax, dword [esi + 0x54]
mov dl, byte [0x4d9835]
mov dword [ebp + 0x10], eax
movzx eax, word [esi + 6]
test eax, eax
jle 0x49c3f9
add ebx, 0x14
mov ecx, dword [ebx]
test ecx, ecx
je 0x49c3f3
cmp ecx, dword [ebp + 0x10]
jae 0x49c3f3
mov dword [ebp + 0x10], ecx
add ebx, 0x28
dec eax
jne 0x49c3e5
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dl, 4
jne 0x49c40f
mov ecx, dword [eax + 0x34]
and dword [ebp - 0xc], 0
jmp 0x49c418
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 0x49c452
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 0x49c549
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [esi]
call fcn.00414356
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 [0x4d9838]
add ecx, eax
mov dword [ebp - 8], ecx
mov dword [edi], ecx
mov cl, byte [0x4d9835]
add esp, 0xc
cmp cl, 4
jne 0x49c48f
mov edi, dword [eax + 0x38]
jmp 0x49c494
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 0x49c4ab
mov eax, dword [eax + 0x54]
jmp 0x49c4ae
mov eax, dword [edx + 0x54]
push dword [ebp + 0x10]
push 0
push eax
call fcn.00498741
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 0x49c544
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 0x49c4f2
xor edi, edi
add ecx, dword [esi]
adc edi, dword [esi + 4]
mov ebx, ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x49c527
mov eax, dword [eax + 0x14]
add eax, dword [ebp + 8]
push ecx
push eax
push ebx
call fcn.00414356
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 0x49c527
push dword [ebp + 0x10]
push 0
push ecx
jmp 0x49c52f
push dword [ebp + 0x10]
push 0
push dword [eax + 8]
call fcn.00498741
add esp, 0xc
add ebx, eax
adc edi, edx
add dword [ebp - 4], 0x28
dec dword [ebp - 0xc]
jne 0x49c4da
xor eax, eax
inc eax
jmp 0x49c54b
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret