Function at 0x49dbdb
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 0x49dbf3
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x5a4d
je 0x49dbfa
xor eax, eax
jmp 0x49de42
push esi
mov esi, dword [ecx + 0x3c]
lea eax, [esi + 0xf8]
cmp dword [ebp + 0x10], eax
jl 0x49de3f
add esi, ecx
cmp dword [esi], 0x4550
jne 0x49de3f
mov ax, word [esi + 0x16]
test ah, 0x20
jne 0x49de3f
test al, 2
je 0x49de3f
mov ax, word [esi + 0x14]
cmp ax, 0xe0
je 0x49dc4a
cmp ax, 0xf0
jne 0x49de3f
cmp ax, 0xe0
jne 0x49dc72
mov al, byte [0x4db83a]
mov byte [0x4db83e], al
mov al, byte [0x4db83c]
mov byte [0x4db835], 4
mov word [0x4db838], 0xf8
mov byte [0x4db834], 0
jmp 0x49dc98
mov al, byte [0x4db83b]
mov byte [0x4db83e], al
mov al, byte [0x4db83d]
mov byte [0x4db835], 8
mov word [0x4db838], 0x108
mov byte [0x4db834], 0x30
movsx ebx, word [0x4db838]
add ebx, esi
push ebx
push esi
push dword [ebp + 0x10]
mov byte [0x4db83f], al
push ecx
call fcn.0049a056
mov edi, dword [ebp + 0x20]
add esp, 0x10
mov dword [edi], eax
or eax, edx
mov dword [edi + 4], edx
je 0x49de3f
mov eax, dword [esi + 0x54]
mov dl, byte [0x4db835]
mov dword [ebp + 0x10], eax
movzx eax, word [esi + 6]
test eax, eax
jle 0x49dcef
add ebx, 0x14
mov ecx, dword [ebx]
test ecx, ecx
je 0x49dce9
cmp ecx, dword [ebp + 0x10]
jae 0x49dce9
mov dword [ebp + 0x10], ecx
add ebx, 0x28
dec eax
jne 0x49dcdb
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dl, 4
jne 0x49dd05
mov ecx, dword [eax + 0x34]
and dword [ebp - 0xc], 0
jmp 0x49dd0e
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 0x49dd48
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 0x49de3f
push dword [ebp + 0x10]
push dword [ebp + 8]
push dword [esi]
call fcn.0041457b
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 [0x4db838]
add ecx, eax
mov dword [ebp - 8], ecx
mov dword [edi], ecx
mov cl, byte [0x4db835]
add esp, 0xc
cmp cl, 4
jne 0x49dd85
mov edi, dword [eax + 0x38]
jmp 0x49dd8a
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 0x49dda1
mov eax, dword [eax + 0x54]
jmp 0x49dda4
mov eax, dword [edx + 0x54]
push dword [ebp + 0x10]
push 0
push eax
call fcn.0049a027
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 0x49de3a
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 0x49dde8
xor edi, edi
add ecx, dword [esi]
adc edi, dword [esi + 4]
mov ebx, ecx
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x49de1d
mov eax, dword [eax + 0x14]
add eax, dword [ebp + 8]
push ecx
push eax
push ebx
call fcn.0041457b
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 0x49de1d
push dword [ebp + 0x10]
push 0
push ecx
jmp 0x49de25
push dword [ebp + 0x10]
push 0
push dword [eax + 8]
call fcn.0049a027
add esp, 0xc
add ebx, eax
adc edi, edx
add dword [ebp - 4], 0x28
dec dword [ebp - 0xc]
jne 0x49ddd0
xor eax, eax
inc eax
jmp 0x49de41
xor eax, eax
pop esi
pop edi
pop ebx
leave
ret