Function at 0x10017bf0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov eax, dword [0x1005bbb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, dword [eax]
push edi
xor edi, edi
mov dword [ebp - 0x20], eax
cmp dword [0x1005d570], edi
jne 0x10017c40
push 0x1005d590
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x100
push edi
push 0x1005d5a8
call fcn.1001a5c0
add esp, 0xc
mov dword [0x1005d570], 1
push 0x1005d590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
call fcn.10017ef0
mov ebx, eax
push esi
mov dword [ebp - 0x14], ebx
call fcn.10017ef0
push 0x50
mov dword [ebp - 0x18], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x74]
movlpd qword [ebp - 0x7c], xmm0
push 0
push eax
call fcn.1001a5c0
lea eax, [ebp - 0x7c]
push eax
push 5
push ebx
call fcn.10017ad0
mov esi, eax
add esp, 0x20
mov dword [ebp - 0x24], esi
cmp esi, 5
jb 0x10017e3d
push esi
push ebx
call fcn.10018040
push dword [ebp - 0x70]
push dword [ebp - 0x74]
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
push ebx
call fcn.100181e0
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x10017e38
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [ebp - 8]
mov dword [ebp - 0x10], eax
push ecx
push 0x40
push esi
push ebx
push eax
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x10017df5
lea eax, [ebp - 0xc]
push eax
push 0x40
push 0x6c
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x10017dd8
xor ecx, ecx
lea eax, [edi + 0x2c]
test esi, esi
je 0x10017d28
mov dword [ebp - 0x1c], ebx
mov edx, eax
sub ebx, eax
nop
mov al, byte [ebx + edx]
lea edx, [edx + 1]
mov byte [edx - 1], al
mov byte [edi + ecx + 0x4c], al
inc ecx
cmp ecx, esi
jb 0x10017d10
mov ebx, dword [ebp - 0x14]
lea eax, [edi + 0x2c]
lea ecx, [eax + esi]
lea eax, [ecx + 5]
lea edx, [esi + ebx]
mov dword [ebp - 0x14], eax
cmp eax, edx
jbe 0x10017d3c
sub eax, edx
jmp 0x10017d41
mov eax, edx
sub eax, dword [ebp - 0x14]
cmp eax, 0x7fff0000
ja 0x10017d55
lea eax, [ecx + 5]
mov byte [ecx], 0xe9
sub edx, eax
mov dword [ecx + 1], edx
jmp 0x10017d62
lea eax, [ecx + 6]
mov word [ecx], 0x25ff
mov dword [ecx + 2], eax
mov dword [eax], edx
mov ecx, dword [ebp - 0x18]
cmp ecx, ebx
jae 0x10017d6f
mov eax, ebx
sub eax, ecx
jmp 0x10017d73
mov eax, ecx
sub eax, ebx
push ecx
cmp eax, 0x7fff0000
jbe 0x10017da3
lea esi, [edi + 0xc]
push esi
call fcn.10017ba0
add esp, 8
sub eax, edi
sub eax, 0xc
push eax
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push esi
push ebx
call fcn.10017ba0
mov esi, dword [ebp - 0x24]
jmp 0x10017da9
push ebx
call fcn.10017ba0
mov eax, dword [ebp - 0x18]
add esp, 8
mov dword [edi + 8], eax
lea eax, [edi + 0x2c]
mov dword [edi + 4], esi
mov dword [edi], ebx
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push 0x6c
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [edi], 0
je 0x10017e04
mov ecx, dword [ebp - 0x20]
lea eax, [edi + 0x2c]
mov dword [ecx], eax
jmp 0x10017e38
xor eax, eax
cmp dword [eax*4 + 0x1005d5a8], edi
je 0x10017e17
inc eax
cmp eax, 0x40
jb 0x10017e06
jmp 0x10017e36
push 0x8000
push 0
push edi
mov dword [eax*4 + 0x1005d5a8], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
dec dword [0x1005d574]
xor edi, edi
call fcn.10017e60
push 0x1005d590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
xor eax, eax
test edi, edi
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.10019adf
mov esp, ebp
pop ebp
ret