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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x10031004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [ebp - 0x18], ebx
push edi
mov dword [ebp - 0x1c], esi
cmp dword [esi + 8], 0
jne 0x10001994
mov edi, dword [ebp + 0xc]
cmp edi, 0x40
jb 0x10001994
mov eax, 0x5a4d
mov dword [esi + 0xc], ebx
cmp word [ebx], ax
jne 0x10001994
mov ecx, dword [ebx + 0x3c]
lea eax, [ecx + 0xf8]
cmp edi, eax
jb 0x10001994
add ecx, ebx
mov dword [esi + 0x10], ecx
cmp dword [ecx], 0x4550
jne 0x10001994
test byte [ecx + 0x16], 2
je 0x10001994
mov eax, 0xe0
cmp word [ecx + 0x14], ax
jne 0x10001994
lea eax, [ecx + 0xf8]
xor edx, edx
mov dword [esi + 0x14], eax
movzx edi, word [ecx + 6]
mov dword [ebp - 0xc], edi
test edi, edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
je 0x100017d5
xor ecx, ecx
jmp 0x100017b3
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
mov eax, dword [eax + ecx + 0x14]
add eax, dword [ebx + ecx + 0x10]
mov ebx, dword [ebp - 0x18]
cmp eax, edi
ja 0x10001994
inc edx
add ecx, 0x28
cmp edx, dword [ebp - 0xc]
jl 0x100017b0
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x10001994
mov eax, dword [ecx + 0x54]
mov edi, dword [ecx + 0x38]
dec eax
add eax, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0xc], eax
cdq
idiv edi
movzx eax, word [ecx + 6]
sub dword [ebp - 0xc], edx
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1000183c
mov edi, dword [ebp - 0x10]
mov esi, eax
mov ebx, dword [ebp - 0x20]
add edi, 0x10
mov ecx, dword [edi - 8]
cmp dword [edi], ecx
cmovg ecx, dword [edi]
lea edi, [edi + 0x28]
dec ecx
add ecx, dword [edi - 0x2c]
add ecx, ebx
mov eax, ecx
cdq
idiv ebx
sub ecx, edx
cmp dword [ebp - 0xc], ecx
cmovge ecx, dword [ebp - 0xc]
mov eax, ecx
mov dword [ebp - 0xc], eax
sub esi, 1
jne 0x10001808
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
jmp 0x1000183f
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x10001994
push 0x40
push 0x3000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [ebp - 0xc]
mov edi, eax
push 0
push edi
call fcn.1000a9e0
add esp, 0xc
test edi, edi
je 0x10001994
mov edx, dword [esi + 0x10]
movzx eax, word [edx + 6]
lea ecx, [eax + eax*4]
mov eax, dword [edx + 0x54]
lea eax, [eax + ecx*8]
push eax
push ebx
push edi
call fcn.1000ab40
mov eax, dword [esi + 0x10]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x10], ecx
add esp, 0xc
cmp dx, word [eax + 6]
jae 0x100018e2
xor ebx, ebx
nop dword [eax]
mov eax, dword [esi + 0x14]
mov edx, dword [ebx + eax + 0xc]
mov dword [ebp - 0x14], edx
test edx, edx
je 0x100018d0
mov edx, dword [ebx + eax + 0x10]
test edx, edx
je 0x100018d0
mov eax, dword [ebx + eax + 0x14]
add eax, dword [ebp - 0x18]
push edx
push eax
mov eax, dword [ebp - 0x14]
add eax, edi
push eax
call fcn.1000ab40
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov eax, dword [esi + 0x10]
inc ecx
add ebx, 0x28
mov dword [ebp - 0x10], ecx
movzx eax, word [eax + 6]
cmp ecx, eax
jl 0x100018a0
mov dword [esi + 0xc], edi
mov ecx, dword [edi + 0x3c]
add ecx, edi
mov dword [esi + 0x10], ecx
lea eax, [ecx + 0xf8]
mov dword [esi + 0x14], eax
mov eax, dword [ecx + 0xa0]
test eax, eax
je 0x1000197b
cmp dword [ecx + 0xa4], 0
jbe 0x1000197b
mov ecx, dword [eax + edi + 4]
lea ebx, [eax + edi]
mov eax, dword [ebx]
add eax, ecx
je 0x1000197b
mov edx, 0xa000
mov dword [ebp - 0x14], 0x3000
lea eax, [ecx - 8]
mov esi, 0
shr eax, 1
mov dword [ebp - 0x20], eax
je 0x1000196c
movzx eax, word [ebx + esi*2 + 8]
mov ecx, eax
and ecx, 0xf000
cmp cx, dx
je 0x10001963
cmp cx, word [ebp - 0x14]
jne 0x10001963
mov ecx, dword [ebp - 0x1c]
and eax, 0xfff
add eax, dword [ebx]
mov edx, edi
mov ecx, dword [ecx + 0x10]
sub edx, dword [ecx + 0x34]
add dword [eax + edi], edx
mov edx, 0xa000
inc esi
cmp esi, dword [ebp - 0x20]
jl 0x10001931
mov ecx, dword [ebx + 4]
mov eax, dword [ebx + ecx]
add ebx, ecx
mov ecx, dword [ebx + 4]
add eax, ecx
jne 0x10001922
mov esi, dword [ebp - 0x1c]
push edi
mov ecx, esi
call fcn.10001a20
test eax, eax
jne 0x100019a9
push 0x8000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000822b
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 8]
push eax
push 0x40
push dword [ebp - 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [esi + 0x10]
push 0x270f
push 1
push edi
mov dword [eax + 0x34], edi
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x28]
add eax, edi
mov dword [esi + 4], eax
call eax
test eax, eax
jne 0x100019fb
push 0x270f
push eax
mov eax, dword [esi + 4]
push edi
call eax
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [esi + 4], 0
jmp 0x10001994
mov ecx, dword [ebp - 4]
mov eax, 1
mov dword [esi + 8], edi
xor ecx, ebp
pop edi
mov dword [esi], 1
pop esi
pop ebx
call fcn.1000822b
mov esp, ebp
pop ebp
ret 8