Function at 0x10017160
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x3f8
mov eax, dword [0x1004e054]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x3f4], 0
push 0x70
mov dword [ebp - 0x3f8], edi
call fcn.10023004
mov esi, eax
add esp, 4
mov dword [ebp - 0x3dc], esi
test esi, esi
jne 0x100171c3
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10018a16
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp dword [0x1007457c], 0
jne 0x100171e1
push 0x10074588
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1007457c], 1
push 0x10074588
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi]
push 0x58
push 0
mov eax, dword [eax]
mov dword [esi], eax
mov eax, dword [edi + 4]
lea edi, [esi + 0x10]
push edi
mov dword [esi + 4], eax
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
call fcn.1001a930
mov ecx, dword [esi]
add esp, 0xc
mov dword [esi + 0x68], 0
mov dword [esi + 0x6c], 0
call fcn.10016930
mov ecx, dword [esi + 4]
mov edi, eax
mov dword [esi], edi
call fcn.10016930
mov dword [esi + 4], eax
lea ecx, [ebp - 0x3d0]
mov dword [ebp - 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x20], 0
call fcn.10003860
test eax, eax
je 0x100172c3
xor esi, esi
push ecx
push 0
push edi
mov edx, edi
lea ecx, [ebp - 0x3d0]
call fcn.100038f0
add esp, 0xc
test eax, eax
je 0x100172ba
mov ecx, dword [eax + 0x11c]
cmp ecx, 0x105
je 0x100172ba
cmp ecx, 0x102
je 0x100172ba
cmp ecx, 0x104
je 0x100172ba
mov eax, dword [eax + 0x128]
add esi, eax
add edi, eax
cmp esi, 5
jb 0x10017275
mov dword [ebp - 8], esi
mov esi, dword [ebp - 0x3dc]
mov eax, dword [ebp - 8]
mov edx, 0x102
mov ecx, dword [esi]
mov dword [esi + 8], eax
call fcn.100170b0
mov ecx, dword [esi]
mov edx, 0x103
mov dword [esi + 0x68], eax
call fcn.100170b0
cmp dword [esi + 8], 5
mov dword [esi + 0x6c], eax
jb 0x100173a9
cmp dword [esi + 0x68], 0
je 0x100172ff
test eax, eax
jne 0x100173a9
mov eax, dword [esi + 0x1c]
mov edi, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x3ec], eax
mov eax, dword [esi]
add edi, eax
mov dword [ebp - 0x3ec], eax
cmp edi, 0x80000000
jae 0x10017327
mov edi, 1
jmp 0x1001732d
sub edi, 0x7fff0000
add eax, ecx
cmp eax, 0x80000000
jae 0x1001733d
add eax, 0x7ff80000
jmp 0x10017342
mov eax, 0xfff80000
mov edx, eax
mov dword [ebp - 0x3d4], eax
mov ecx, edi
call fcn.10016c70
mov ecx, eax
test ecx, ecx
jne 0x10017385
push dword [ebp - 0x3d4]
mov ecx, dword [ebp - 0x3ec]
mov edx, edi
call fcn.100169a0
mov edx, dword [ebp - 0x3d4]
add esp, 4
mov ecx, edi
mov dword [0x10074584], eax
call fcn.10016c70
mov ecx, eax
test ecx, ecx
je 0x100173a6
mov dword [ecx + 0x6c], 0
mov eax, dword [0x10074574]
mov dword [ecx + 0x70], eax
mov eax, dword [0x10074574]
test eax, eax
je 0x100173a0
mov dword [eax + 0x6c], ecx
mov dword [0x10074574], ecx
mov dword [esi + 0xc], ecx
lea edx, [ebp - 8]
mov dword [ebp - 0x3ec], 0
lea ecx, [ebp - 0x3ec]
mov dword [ebp - 8], 0
call fcn.10016d70
test eax, eax
je 0x1001780f
push dword [ebp - 8]
mov ecx, esi
call fcn.10016e40
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp dword [esi + 0xc], 0
mov dword [ebp - 0x3e8], eax
je 0x100177fc
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 8]
push eax
push 0x40
push dword [esi + 8]
mov dword [ebp - 8], 0
push dword [esi]
mov dword [ebp - 0xc], 0
call edi
test eax, eax
je 0x1001778f
lea eax, [ebp - 0xc]
push eax
push 0x40
push 0x74
push dword [esi + 0xc]
call edi
test eax, eax
je 0x10017770
mov edi, dword [esi + 0xc]
xor edx, edx
mov eax, dword [esi + 8]
add edi, 0x2c
mov dword [ebp - 0x3d8], edi
test eax, eax
je 0x1001745d
mov eax, dword [esi]
mov cl, byte [edx + eax]
mov byte [edx + edi], cl
mov eax, dword [esi + 0xc]
mov byte [edx + eax + 0x4c], cl
inc edx
mov eax, dword [esi + 8]
cmp edx, eax
jb 0x10017446
cmp dword [esi + 0x68], 0
jne 0x10017470
cmp dword [esi + 0x6c], 0
jne 0x10017470
add edi, eax
jmp 0x10017576
mov eax, dword [esi]
lea ecx, [ebp - 0x3d0]
mov dword [ebp - 0x3e0], eax
mov dword [ebp - 0x3e4], 0
call fcn.10003860
test eax, eax
je 0x10017576
mov ecx, edi
mov dword [ebp - 0x3d4], edi
nop dword [eax]
push ecx
push 0
push ecx
mov edx, ecx
lea ecx, [ebp - 0x3d0]
call fcn.100038f0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x10017570
mov eax, dword [edi + 0x11c]
cmp eax, 0x102
jne 0x1001752c
cmp dword [edi + 0x144], 1
jne 0x10017545
mov al, byte [edi + 0x141]
cmp al, 0x74
je 0x100174e2
cmp al, 0x75
jne 0x10017545
mov eax, dword [ebp - 0x3d4]
mov esi, dword [ebp - 0x3d4]
mov dl, byte [eax + 1]
mov byte [eax], 0xf
mov cl, byte [edi + 0x141]
mov eax, dword [edi + 0x144]
add cl, 0x10
mov byte [esi + eax], cl
mov eax, dword [edi + 0x144]
movzx ecx, dl
mov edx, esi
mov esi, dword [ebp - 0x3dc]
sub ecx, edx
add ecx, 0xfffffffe
add ecx, dword [ebp - 0x3e0]
add eax, ecx
lea edi, [edx + 6]
mov dword [edx + 2], eax
jmp 0x10017576
cmp eax, 0x103
jne 0x10017545
cmp dword [edi + 0x144], 1
jne 0x10017545
cmp byte [edi + 0x141], 0xe8
je 0x100175b0
mov edx, dword [ebp - 0x3e4]
mov eax, dword [edi + 0x128]
add edx, eax
mov ecx, dword [ebp - 0x3d4]
add ecx, eax
mov dword [ebp - 0x3e4], edx
mov dword [ebp - 0x3d4], ecx
cmp edx, 5
jb 0x100174a0
mov edi, dword [ebp - 0x3d8]
mov ecx, dword [esi]
lea edx, [edi + 5]
add ecx, dword [esi + 8]
mov eax, edx
sub eax, ecx
mov dword [ebp - 0x3d8], ecx
sub ecx, edx
cmp edx, dword [ebp - 0x3d8]
cmova ecx, eax
mov eax, dword [ebp - 0x3d8]
cmp edx, eax
cmovbe edx, edx
sub eax, edx
cmp ecx, 0x7fff0000
ja 0x100175e0
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x100175f3
mov eax, dword [edi + 0x170]
sub eax, dword [edi + 0x120]
sub eax, dword [ebp - 0x3d8]
mov ecx, dword [ebp - 0x3d4]
add eax, ecx
add eax, dword [ebp - 0x3e0]
mov dword [ecx + 1], eax
mov eax, dword [edi + 0x144]
lea edi, [ecx + 4]
add edi, eax
jmp 0x10017576
mov ecx, dword [ebp - 0x3d8]
lea eax, [edi + 6]
mov word [edi], 0x25ff
mov dword [edi + 2], eax
mov dword [eax], ecx
mov edx, dword [esi + 4]
mov ecx, edx
mov edi, dword [esi]
sub ecx, edi
mov eax, edi
mov dword [ebp - 0x3d4], edx
sub eax, edx
cmp edx, edi
cmovae eax, ecx
cmp eax, 0x7fff0000
jbe 0x100176d0
mov edx, dword [esi + 0xc]
mov edi, dword [ebp - 0x3d4]
add edx, 0xc
mov dword [ebp - 0x3e0], edx
mov ecx, edi
add edx, 5
mov eax, edx
sub ecx, edx
sub eax, edi
cmp edx, edi
cmova ecx, eax
cmovbe edx, edx
mov eax, edi
sub eax, edx
mov dword [ebp - 0x3dc], eax
mov eax, dword [ebp - 0x3e0]
lea edx, [eax + 1]
cmp ecx, 0x7fff0000
ja 0x10017663
mov byte [eax], 0xe9
mov eax, dword [ebp - 0x3dc]
mov dword [edx], eax
jmp 0x10017671
mov byte [edx], 0x25
lea edx, [eax + 6]
mov byte [eax], 0xff
mov dword [eax + 2], edx
mov dword [edx], edi
mov eax, dword [esi + 0xc]
sub edx, eax
sub edx, 8
add eax, 0xc
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edi, dword [esi]
mov ecx, dword [esi + 0xc]
add ecx, 0xc
mov dword [ebp - 0x3d8], ecx
lea edx, [edi + 5]
mov eax, edx
sub eax, ecx
sub ecx, edx
cmp edx, dword [ebp - 0x3d8]
cmova ecx, eax
mov eax, dword [ebp - 0x3d8]
cmp edx, eax
cmovbe edx, edx
sub eax, edx
cmp ecx, 0x7fff0000
ja 0x100176c8
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x10017718
mov ecx, dword [ebp - 0x3d8]
jmp 0x1001770b
mov ecx, dword [ebp - 0x3d4]
lea edx, [edi + 5]
mov eax, edx
sub eax, ecx
sub ecx, edx
cmp edx, dword [ebp - 0x3d4]
cmova ecx, eax
mov eax, dword [ebp - 0x3d4]
cmp edx, eax
cmovbe edx, edx
sub eax, edx
cmp ecx, 0x7fff0000
ja 0x10017705
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x10017718
mov ecx, dword [ebp - 0x3d4]
lea eax, [edi + 6]
mov dword [eax], ecx
mov dword [edi + 2], eax
mov word [edi], 0x25ff
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov dword [ecx + 4], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [esi]
mov dword [ecx], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 4]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
cmp dword [eax], 0
je 0x10017749
lea ecx, [eax + 0x2c]
mov eax, dword [ebp - 0x3f8]
mov eax, dword [eax]
mov dword [eax], ecx
mov eax, dword [esi + 0xc]
push dword [esi + 8]
add eax, 0x2c
push eax
push dword [ebp - 0x3e8]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push 0x74
push dword [esi + 0xc]
call edi
push dword [esi + 8]
push dword [esi]
push dword [ebp - 0x3e8]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [esi + 8]
push dword [esi]
call edi
mov ecx, dword [esi + 0xc]
cmp dword [ecx], 0
je 0x100177a3
mov dword [ebp - 0x3f4], 1
jmp 0x100177fc
mov edx, dword [ecx + 0x6c]
test edx, edx
je 0x100177b0
mov eax, dword [ecx + 0x70]
mov dword [edx + 0x70], eax
mov edx, dword [ecx + 0x70]
test edx, edx
je 0x100177bd
mov eax, dword [ecx + 0x6c]
mov dword [edx + 0x6c], eax
cmp dword [0x10074574], ecx
jne 0x100177cd
mov eax, dword [ecx + 0x70]
mov dword [0x10074574], eax
mov dword [ecx + 0x70], 0
mov dword [ecx + 0x6c], 0
mov eax, dword [0x10074584]
mov dword [ecx + 0x70], eax
mov eax, dword [0x10074584]
test eax, eax
je 0x100177ef
mov dword [eax + 0x6c], ecx
mov dword [0x10074584], ecx
mov dword [esi + 0xc], 0
call fcn.10016ce0
push dword [ebp - 0x3ec]
call fcn.10022ece
add esp, 4
push esi
call fcn.10022ece
add esp, 4
push 0x10074588
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3f4]
xor ecx, ebp
pop edi
pop esi
call fcn.10018a16
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret