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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [0x100396ac]
sub esp, 0x14
mov edx, 0x100014d0
lea eax, [ecx + 0xd0f600]
mov dword [0x100391dc], eax
lea eax, [ecx + 0xcb1b90]
mov dword [0x10039200], eax
lea eax, [ecx + 0x3a2e60]
mov ecx, dword [0x100396b0]
push ebx
push esi
mov dword [0x10039204], eax
lea eax, [ecx + 0x3e3890]
add ecx, 0x404600
push edi
push 0x100391f0
mov dword [0x100391fc], eax
mov dword [0x100391ec], ecx
call fcn.1000ae8d
mov ebx, dword [0x100391ec]
xor edi, edi
mov ecx, 1
mov edx, 0x100396a4
xor eax, eax
lock cmpxchg dword [edx], ecx
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x10001862
nop
cmp edi, 0x20
jae 0x10001849
push 0
jmp 0x1000184b
push 1
call esi
inc edi
mov ecx, 1
xor eax, eax
mov edx, 0x100396a4
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x10001840
cmp dword [0x100396a8], 0
je 0x1000194e
test ebx, ebx
jne 0x1000187d
call fcn.1000add7
jmp 0x1000194e
mov ecx, dword [0x10039728]
xor edx, edx
test ecx, ecx
je 0x1000194e
mov eax, dword [0x10039720]
cmp ebx, dword [eax]
je 0x100018a3
inc edx
add eax, 0x2c
cmp edx, ecx
jb 0x10001892
jmp 0x1000194e
cmp edx, 0xffffffff
je 0x1000194e
mov eax, dword [0x10039720]
imul edi, edx, 0x2c
test byte [edi + eax + 0x14], 2
jne 0x1000194e
push 1
lea ecx, [ebp - 0x14]
call fcn.1000ac97
add esp, 4
test eax, eax
jne 0x1000194e
mov ebx, dword [0x10039720]
add ebx, edi
mov eax, dword [ebx]
mov cl, byte [ebx + 0x14]
and cl, 1
lea edi, [eax - 5]
cmove edi, eax
movzx eax, cl
lea ecx, [ebp - 4]
push ecx
push 0x40
lea eax, [eax*2 + 5]
push eax
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001946
mov byte [edi], 0xe9
mov eax, dword [ebx + 4]
sub eax, edi
sub eax, 5
mov dword [edi + 1], eax
test byte [ebx + 0x14], 1
je 0x10001920
mov eax, dword [ebx]
mov word [eax], 0xf9eb
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
or byte [ebx + 0x14], 6
lea ecx, [ebp - 0x14]
call fcn.1000ad08
xor eax, eax
mov ecx, 0x100396a4
xchg dword [ecx], eax
mov ecx, dword [0x100396ac]
mov edx, 0x10001790
add ecx, 0x3a7560
push 0x100391f4
mov dword [0x100391e4], ecx
call fcn.1000ae8d
mov ebx, dword [0x100391e4]
xor edi, edi
mov ecx, 1
xor eax, eax
mov edx, 0x100396a4
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x100019b6
cmp edi, 0x20
jae 0x1000199d
push 0
jmp 0x1000199f
push 1
call esi
inc edi
mov ecx, 1
xor eax, eax
mov edx, 0x100396a4
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x10001994
cmp dword [0x100396a8], 0
je 0x10001a9e
test ebx, ebx
jne 0x100019d1
call fcn.1000add7
jmp 0x10001a9e
mov ecx, dword [0x10039728]
xor edx, edx
test ecx, ecx
je 0x10001a9e
mov esi, dword [0x10039720]
mov eax, esi
nop dword [eax]
cmp ebx, dword [eax]
je 0x10001a01
inc edx
add eax, 0x2c
cmp edx, ecx
jb 0x100019f0
jmp 0x10001a9e
cmp edx, 0xffffffff
je 0x10001a9e
imul edi, edx, 0x2c
test byte [edi + esi + 0x14], 2
jne 0x10001a9e
push 1
lea ecx, [ebp - 0x14]
call fcn.1000ac97
add esp, 4
test eax, eax
jne 0x10001a9e
add edi, dword [0x10039720]
mov eax, dword [edi]
mov cl, byte [edi + 0x14]
and cl, 1
lea esi, [eax - 5]
cmove esi, eax
movzx eax, cl
lea ebx, [eax*2 + 5]
lea eax, [ebp - 8]
push eax
push 0x40
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10001a96
mov byte [esi], 0xe9
mov eax, dword [edi + 4]
sub eax, esi
sub eax, 5
mov dword [esi + 1], eax
test byte [edi + 0x14], 1
je 0x10001a74
mov eax, dword [edi]
mov word [eax], 0xf9eb
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
or byte [edi + 0x14], 6
lea ecx, [ebp - 0x14]
call fcn.1000ad08
xor eax, eax
mov ecx, 0x100396a4
xchg dword [ecx], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret