Function at 0x1007bdb0
Capabilities:
Allocate or change rwx memory

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 [0x100e716c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
push esi
xor esi, esi
mov dword [ebp - 0x3f0], eax
push edi
mov eax, dword [eax]
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x3d8], eax
cmp dword [0x1011e470], esi
jne 0x1007be0b
push 0x1011e474
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1011e470], 1
push 0x1011e474
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 0x3d8]
call fcn.1007c3b0
push edi
mov dword [ebp - 0x3d4], eax
call fcn.1007c3b0
mov dword [ebp - 0x3dc], eax
xor edi, edi
lea eax, [ebp - 0x3d0]
push 1
push eax
call fcn.1007cdc0
add esp, 0x10
test eax, eax
je 0x1007c1ad
mov esi, dword [ebp - 0x3d4]
push 0x26
push esi
push 0
lea eax, [ebp - 0x3d0]
push esi
push eax
call fcn.1007cca0
mov ecx, eax
add esp, 0x14
test ecx, ecx
je 0x1007bea7
mov eax, dword [ecx + 0x11c]
cmp eax, 0x105
je 0x1007bea7
cmp eax, 0x101
je 0x1007bea7
cmp eax, 0x102
je 0x1007bea7
cmp eax, 0x103
je 0x1007bea7
cmp eax, 0x104
je 0x1007bea7
mov eax, dword [ecx + 0x128]
add edi, eax
add esi, eax
cmp edi, 5
jb 0x1007be54
lea eax, [ebp - 0x3d0]
push eax
call fcn.1007cc80
add esp, 4
mov esi, 0
cmp edi, 5
jb 0x1007c1ad
mov esi, dword [ebp - 0x3d4]
push edi
push esi
call fcn.1007c420
add esp, 8
mov ecx, 1
cmp esi, 0x80000000
jb 0x1007bee7
lea ecx, [esi - 0x7fff0000]
mov dword [ebp - 8], ecx
lea eax, [esi + 0x7ff80000]
jb 0x1007bef7
mov eax, 0xfff80000
push eax
push ecx
mov dword [ebp - 0xc], eax
call fcn.1007bd40
mov esi, eax
mov dword [ebp - 0x3d8], eax
add esp, 8
test esi, esi
jne 0x1007bf43
mov esi, dword [ebp - 0xc]
push esi
push dword [ebp - 8]
push dword [ebp - 0x3d4]
call fcn.1007ba30
push esi
push dword [ebp - 8]
mov dword [0x1011e490], eax
call fcn.1007bd40
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x3d8], esi
test esi, esi
je 0x1007c1a8
mov dword [esi + 0x6c], 0
mov eax, dword [0x1011e48c]
mov dword [esi + 0x70], eax
mov eax, dword [0x1011e48c]
test eax, eax
je 0x1007bf5e
mov dword [eax + 0x6c], esi
mov dword [0x1011e48c], esi
test esi, esi
je 0x1007c1a8
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x40
push edi
push dword [ebp - 0x3d4]
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1007c13c
lea eax, [ebp - 8]
push eax
push 0x40
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1007c114
lea eax, [esi + 0x2c]
xor ecx, ecx
mov dword [ebp - 0x3ec], eax
test edi, edi
je 0x1007c019
mov dword [ebp - 0x3e4], eax
lea edx, [esi + 0x2c]
mov eax, dword [ebp - 0x3d4]
sub eax, edx
mov edx, dword [ebp - 0x3e4]
mov dword [ebp - 0x3e0], eax
lea eax, [esi + 0x4c]
mov esi, dword [ebp - 0x3e0]
mov dword [ebp - 0x3e8], eax
nop word [eax + eax]
mov al, byte [esi + edx]
lea edx, [edx + 1]
mov esi, dword [ebp - 0x3e8]
mov byte [edx - 1], al
mov byte [esi + ecx], al
inc ecx
mov esi, dword [ebp - 0x3e0]
cmp ecx, edi
jb 0x1007bff0
mov esi, dword [ebp - 0x3d8]
mov eax, dword [ebp - 0x3ec]
mov edx, dword [ebp - 0x3d4]
lea ecx, [edi + edx]
mov dword [ebp - 0x3d8], ecx
lea ecx, [eax + 5]
add ecx, edi
lea eax, [edi + edx]
sub eax, ecx
mov dword [ebp - 0x3e0], eax
mov eax, ecx
sub eax, dword [ebp - 0x3d8]
cmp ecx, dword [ebp - 0x3d8]
cmovbe eax, dword [ebp - 0x3e0]
cmp eax, 0x7fff0000
ja 0x1007c065
mov ecx, dword [ebp - 0x3e0]
mov byte [esi + edi + 0x2c], 0xe9
mov dword [esi + edi + 0x2d], ecx
jmp 0x1007c07a
lea ecx, [esi + 0x2c]
add ecx, edi
lea eax, [ecx + 6]
mov word [ecx], 0x25ff
mov dword [ecx + 2], eax
lea ecx, [edi + edx]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x3dc]
mov eax, edx
sub eax, dword [ebp - 0x3dc]
sub ecx, edx
cmp dword [ebp - 0x3dc], edx
cmovae eax, ecx
cmp eax, 0x7fff0000
jbe 0x1007c0ce
push dword [ebp - 0x3dc]
lea eax, [esi + 0xc]
push eax
call fcn.1007bcf0
add esp, 8
sub eax, esi
sub eax, 0xc
push eax
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 0x3d4]
lea eax, [esi + 0xc]
jmp 0x1007c0d4
mov eax, dword [ebp - 0x3dc]
push eax
push edx
call fcn.1007bcf0
mov eax, dword [ebp - 0x3d4]
add esp, 8
mov dword [esi], eax
mov eax, dword [ebp - 0x3dc]
mov dword [esi + 8], eax
lea eax, [esi + 0x2c]
push edi
push eax
mov dword [esi + 4], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x74
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edi
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push edi
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi], 0
je 0x1007c14e
mov ecx, dword [ebp - 0x3f0]
lea eax, [esi + 0x2c]
mov dword [ecx], eax
jmp 0x1007c1a8
mov ecx, dword [esi + 0x6c]
test ecx, ecx
je 0x1007c15b
mov eax, dword [esi + 0x70]
mov dword [ecx + 0x70], eax
mov ecx, dword [esi + 0x70]
test ecx, ecx
je 0x1007c168
mov eax, dword [esi + 0x6c]
mov dword [ecx + 0x6c], eax
cmp dword [0x1011e48c], esi
jne 0x1007c178
mov eax, dword [esi + 0x70]
mov dword [0x1011e48c], eax
mov dword [esi + 0x70], 0
mov dword [esi + 0x6c], 0
mov eax, dword [0x1011e490]
mov dword [esi + 0x70], eax
mov eax, dword [0x1011e490]
test eax, eax
je 0x1007c19a
mov dword [eax + 0x6c], esi
dec dword [0x1011e494]
mov dword [0x1011e490], esi
xor esi, esi
call fcn.1007c320
push 0x1011e474
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop edi
setne al
xor ecx, ebp
pop esi
call fcn.1007a7c6
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret