Function at 0x100186b0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
mov eax, ecx
mov ebx, edx
push esi
xor esi, esi
mov dword [esp + 0x18], eax
push edi
mov edi, dword [eax]
cmp dword [0x1017a230], esi
jne 0x100186f0
push 0x1017c07c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1017a230], 1
push 0x1017c07c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, edi
call fcn.10017e80
mov edi, eax
mov ecx, ebx
mov dword [esp + 0x18], edi
call fcn.10017e80
mov ebx, eax
xorps xmm0, xmm0
push 0x50
lea eax, [esp + 0x2c]
mov dword [esp + 0x18], ebx
push 0
push eax
movlpd qword [esp + 0x2c], xmm0
call fcn.100567e0
add esp, 0xc
lea eax, [esp + 0x20]
mov ecx, edi
push eax
call fcn.100185f0
add esp, 4
mov dword [esp + 0xc], eax
cmp eax, 5
jb 0x100189de
mov edx, eax
mov ecx, edi
call fcn.10018450
push dword [esp + 0x2c]
mov ecx, edi
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.10018230
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100189d9
lea eax, [esp + 0x80]
mov dword [esp + 0x80], 0
push eax
push 0x40
push dword [esp + 0x14]
mov dword [esp + 0x88], 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1001896f
lea eax, [esp + 0x7c]
push eax
push 0x40
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10018945
mov eax, dword [esp + 0xc]
lea edx, [esi + 0x2c]
xor ecx, ecx
test eax, eax
je 0x100187fe
mov ebx, dword [esp + 0xc]
lea eax, [esi + 0x2c]
mov dword [esp + 0x10], edi
sub edi, eax
lea ecx, [ecx]
mov al, byte [edi + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
mov byte [esi + ecx + 0x4c], al
inc ecx
cmp ecx, ebx
jb 0x100187e0
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
lea edx, [eax + edi]
lea ecx, [esi + eax]
lea eax, [ecx + 0x31]
mov dword [esp + 0x14], eax
cmp eax, edx
jbe 0x10018813
sub eax, edx
jmp 0x10018819
mov eax, edx
sub eax, dword [esp + 0x14]
cmp eax, 0x7fff0000
ja 0x1001882e
lea eax, [ecx + 0x31]
mov byte [ecx + 0x2c], 0xe9
sub edx, eax
mov dword [ecx + 0x2d], edx
jmp 0x1001883c
lea eax, [ecx + 0x32]
mov word [ecx + 0x2c], 0x25ff
mov dword [ecx + 0x2e], eax
mov dword [eax], edx
cmp ebx, edi
jae 0x10018846
mov eax, edi
sub eax, ebx
jmp 0x1001884a
mov eax, ebx
sub eax, edi
cmp eax, 0x7fff0000
jbe 0x100188e1
lea edx, [esi + 0xc]
mov ecx, edx
lea eax, [ecx + 5]
mov dword [esp + 0x10], eax
cmp eax, ebx
jbe 0x10018869
sub eax, ebx
jmp 0x1001886f
mov eax, ebx
sub eax, dword [esp + 0x10]
cmp eax, 0x7fff0000
ja 0x10018887
mov eax, ebx
mov byte [ecx], 0xe9
sub eax, dword [esp + 0x10]
mov dword [ecx + 1], eax
add ecx, 5
jmp 0x10018899
mov word [ecx], 0x25ff
lea eax, [ecx + 6]
mov dword [ecx + 2], eax
mov ecx, eax
mov dword [ecx], ebx
add ecx, 4
sub ecx, esi
sub ecx, 0xc
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea edx, [edi + 5]
lea ecx, [esi + 0xc]
cmp edx, ecx
jbe 0x100188bd
mov eax, edx
sub eax, ecx
jmp 0x100188c1
mov eax, ecx
sub eax, edx
cmp eax, 0x7fff0000
ja 0x100188d2
sub ecx, edx
mov byte [edi], 0xe9
mov dword [edi + 1], ecx
jmp 0x10018912
lea eax, [edi + 6]
mov word [edi], 0x25ff
mov dword [edi + 2], eax
mov dword [eax], ecx
jmp 0x10018912
lea ecx, [edi + 5]
cmp ecx, ebx
jbe 0x100188ee
mov eax, ecx
sub eax, ebx
jmp 0x100188f2
mov eax, ebx
sub eax, ecx
cmp eax, 0x7fff0000
ja 0x10018905
mov eax, ebx
mov byte [edi], 0xe9
sub eax, ecx
mov dword [edi + 1], eax
jmp 0x10018912
lea eax, [edi + 6]
mov word [edi], 0x25ff
mov dword [edi + 2], eax
mov dword [eax], ebx
mov eax, dword [esp + 0xc]
push eax
mov dword [esi + 4], eax
lea eax, [esi + 0x2c]
push eax
mov dword [esi], edi
mov dword [esi + 8], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [esp + 0x7c]
push eax
push dword [esp + 0x80]
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, dword [esp + 0xc]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [esp + 0x80]
push eax
push dword [esp + 0x84]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi], 0
je 0x1001897f
mov ecx, dword [esp + 0x1c]
lea eax, [esi + 0x2c]
mov dword [ecx], eax
jmp 0x100189d9
mov ecx, dword [esi + 0x6c]
test ecx, ecx
je 0x1001898c
mov eax, dword [esi + 0x70]
mov dword [ecx + 0x70], eax
mov ecx, dword [esi + 0x70]
test ecx, ecx
je 0x10018999
mov eax, dword [esi + 0x6c]
mov dword [ecx + 0x6c], eax
cmp dword [0x1017a240], esi
jne 0x100189a9
mov eax, dword [esi + 0x70]
mov dword [0x1017a240], eax
mov dword [esi + 0x70], 0
mov dword [esi + 0x6c], 0
mov eax, dword [0x1017a238]
mov dword [esi + 0x70], eax
mov eax, dword [0x1017a238]
test eax, eax
je 0x100189cb
mov dword [eax + 0x6c], esi
dec dword [0x1017a22c]
mov dword [0x1017a238], esi
xor esi, esi
call fcn.100183c0
push 0x1017c07c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x84]
xor eax, eax
test esi, esi
pop edi
pop esi
setne al
pop ebx
xor ecx, esp
call fcn.10056351
mov esp, ebp
pop ebp
ret