Function at 0x1003bac0
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, 0x408
mov eax, dword [0x1015f1d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 8]
xor ecx, ecx
push esi
mov esi, dword [ebx + 0xc]
mov edx, 0x70
mov dword [ebp - 0x3f8], eax
mov eax, esi
mul edx
push edi
mov dword [ebp - 0x3e0], esi
seto cl
mov dword [ebp - 0x3f0], 0
neg ecx
or ecx, eax
push ecx
call fcn.100e13ce
mov edi, eax
add esp, 4
mov dword [ebp - 0x3e4], edi
test edi, edi
jne 0x1003bb3e
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100476aa
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
cmp dword [0x10164748], 0
jne 0x1003bb5c
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x10164748], 1
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edx, edx
mov dword [ebp - 0x3d4], edx
test esi, esi
jle 0x1003bdc8
lea esi, [edi + 4]
mov dword [ebp - 0x3dc], esi
mov ecx, dword [ebp - 0x3f8]
lea edi, [esi + 0xc]
push 0x58
push 0
push edi
mov eax, dword [ecx + edx*8]
mov eax, dword [eax]
mov dword [esi - 4], eax
mov eax, dword [ecx + edx*8 + 4]
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 4], 0
call fcn.100cede0
push dword [esi - 4]
mov dword [esi + 0x64], 0
mov dword [esi + 0x68], 0
call fcn.1003c5c0
push dword [esi]
mov edi, eax
mov dword [esi - 4], edi
call fcn.1003c5c0
mov edx, dword [ebp - 0x3d4]
add esp, 0x14
xor ecx, ecx
mov dword [esi], eax
test edx, edx
je 0x1003bbf8
mov eax, dword [ebp - 0x3e4]
cmp dword [eax], edi
je 0x1003bd0d
inc ecx
add eax, 0x70
cmp ecx, edx
jl 0x1003bbe8
lea eax, [ebp - 0x3d0]
mov dword [ebp - 0x3d8], 0
push 1
push eax
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x1c], 0
call fcn.1002c140
add esp, 8
test eax, eax
je 0x1003bca0
mov esi, dword [ebp - 0x3d8]
push 0x26
push edi
push 0
lea eax, [ebp - 0x3d0]
push edi
push eax
call fcn.1002c020
mov ecx, eax
add esp, 0x14
test ecx, ecx
je 0x1003bc85
mov eax, dword [ecx + 0x11c]
cmp eax, 0x105
je 0x1003bc85
cmp eax, 0x102
je 0x1003bc85
cmp eax, 0x104
je 0x1003bc85
mov eax, dword [ecx + 0x128]
add esi, eax
add edi, eax
cmp esi, 5
jb 0x1003bc40
lea eax, [ebp - 0x3d0]
mov dword [ebp - 0x3d8], esi
push eax
call fcn.1002c000
mov esi, dword [ebp - 0x3dc]
add esp, 4
mov eax, dword [ebp - 0x3d8]
push 0x102
push dword [esi - 4]
mov dword [esi + 4], eax
call fcn.1003b9c0
push 0x103
push dword [esi - 4]
mov dword [esi + 0x64], eax
call fcn.1003b9c0
add esp, 0x10
mov dword [esi + 0x68], eax
cmp dword [esi + 4], 5
jb 0x1003bd9a
cmp dword [esi + 0x64], 0
je 0x1003bce4
test eax, eax
jne 0x1003bd9a
mov eax, dword [esi + 0x18]
mov edi, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x400], eax
mov eax, dword [esi - 4]
add edi, eax
mov dword [ebp - 0x400], eax
cmp edi, 0x80000000
jae 0x1003bd19
mov edi, 1
jmp 0x1003bd1f
mov dword [esi + 8], 0
jmp 0x1003bda0
sub edi, 0x7fff0000
add eax, ecx
cmp eax, 0x80000000
jae 0x1003bd2f
add eax, 0x7ff80000
jmp 0x1003bd34
mov eax, 0xfff80000
push eax
push edi
mov dword [ebp - 0x3d8], eax
call fcn.1003b890
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x1003bd76
push dword [ebp - 0x3d8]
push edi
push dword [ebp - 0x400]
call fcn.1003b5c0
push dword [ebp - 0x3d8]
mov dword [0x10164768], eax
push edi
call fcn.1003b890
mov ecx, eax
add esp, 0x14
test ecx, ecx
je 0x1003bd97
mov dword [ecx + 0x6c], 0
mov eax, dword [0x10164764]
mov dword [ecx + 0x70], eax
mov eax, dword [0x10164764]
test eax, eax
je 0x1003bd91
mov dword [eax + 0x6c], ecx
mov dword [0x10164764], ecx
mov dword [esi + 8], ecx
mov edx, dword [ebp - 0x3d4]
inc edx
add esi, 0x70
mov dword [ebp - 0x3d4], edx
mov dword [ebp - 0x3dc], esi
cmp edx, dword [ebp - 0x3e0]
jl 0x1003bb80
mov esi, dword [ebp - 0x3e0]
mov edi, dword [ebp - 0x3e4]
lea eax, [ebp - 0x3dc]
mov dword [ebp - 0x400], 0
push eax
lea eax, [ebp - 0x400]
mov dword [ebp - 0x3dc], 0
push eax
call fcn.1003b900
add esp, 8
test eax, eax
je 0x1003c29d
push dword [ebp - 0x3dc]
push esi
push edi
call fcn.1003c630
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edi, edi
mov dword [ebp - 0x3fc], eax
mov dword [ebp - 0x3dc], edi
test esi, esi
jle 0x1003c28a
mov esi, dword [ebp - 0x3e4]
mov eax, dword [ebp - 0x3e0]
add esi, 0xc
mov dword [ebp - 0x3ec], esi
nop dword [eax + eax]
cmp dword [esi], 0
je 0x1003c272
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x40
push dword [esi - 4]
mov dword [ebp - 8], 0
push dword [esi - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1003c205
lea eax, [ebp - 8]
push eax
push 0x40
push 0x74
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1003c1e0
mov edi, dword [esi]
xor edx, edx
mov eax, dword [esi - 4]
add edi, 0x2c
mov dword [ebp - 0x3e8], edi
test eax, eax
je 0x1003beb7
nop dword [eax]
mov eax, dword [esi - 0xc]
mov cl, byte [edx + eax]
mov byte [edx + edi], cl
mov eax, dword [esi]
mov byte [eax + edx + 0x4c], cl
inc edx
mov eax, dword [esi - 4]
cmp edx, eax
jb 0x1003bea0
cmp dword [esi + 0x5c], 0
jne 0x1003beca
cmp dword [esi + 0x60], 0
jne 0x1003beca
add edi, eax
jmp 0x1003bfe6
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x3f4], eax
lea eax, [ebp - 0x3d0]
push 1
push eax
mov dword [ebp - 0x3d8], 0
call fcn.1002c140
add esp, 8
test eax, eax
je 0x1003bfe6
mov ecx, edi
mov dword [ebp - 0x3d4], edi
nop
push 0x26
push ecx
push 0
push ecx
lea eax, [ebp - 0x3d0]
push eax
call fcn.1002c020
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1003bfd1
mov eax, dword [edi + 0x11c]
cmp eax, 0x102
jne 0x1003bf8d
cmp dword [edi + 0x144], 1
jne 0x1003bfa6
mov al, byte [edi + 0x141]
cmp al, 0x74
je 0x1003bf43
cmp al, 0x75
jne 0x1003bfa6
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 - 0x3ec]
sub ecx, edx
add ecx, 0xfffffffe
add ecx, dword [ebp - 0x3f4]
add eax, ecx
lea edi, [edx + 6]
mov dword [edx + 2], eax
jmp 0x1003bfe6
cmp eax, 0x103
jne 0x1003bfa6
cmp dword [edi + 0x144], 1
jne 0x1003bfa6
cmp byte [edi + 0x141], 0xe8
je 0x1003c021
mov edx, dword [ebp - 0x3d8]
mov eax, dword [edi + 0x128]
add edx, eax
mov ecx, dword [ebp - 0x3d4]
add ecx, eax
mov dword [ebp - 0x3d8], edx
mov dword [ebp - 0x3d4], ecx
cmp edx, 5
jb 0x1003bf00
lea eax, [ebp - 0x3d0]
push eax
call fcn.1002c000
mov edi, dword [ebp - 0x3e8]
add esp, 4
mov ecx, dword [esi - 4]
lea edx, [edi + 5]
add ecx, dword [esi - 0xc]
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 0x1003c051
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x1003c064
mov eax, dword [edi + 0x170]
sub eax, dword [edi + 0x120]
sub eax, dword [ebp - 0x3e8]
mov ecx, dword [ebp - 0x3d4]
add eax, ecx
add eax, dword [ebp - 0x3f4]
mov dword [ecx + 1], eax
mov eax, dword [edi + 0x144]
lea edi, [ecx + 4]
add edi, eax
jmp 0x1003bfe6
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 - 8]
mov ecx, edx
mov edi, dword [esi - 0xc]
sub ecx, edi
mov eax, edi
mov dword [ebp - 0x3d4], edx
sub eax, edx
cmp edx, edi
cmovae eax, ecx
cmp eax, 0x7fff0000
jbe 0x1003c140
mov edx, dword [esi]
mov edi, dword [ebp - 0x3d4]
add edx, 0xc
mov dword [ebp - 0x3ec], 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 - 0x3e8], eax
mov eax, dword [ebp - 0x3ec]
lea edx, [eax + 1]
cmp ecx, 0x7fff0000
ja 0x1003c0d4
mov byte [eax], 0xe9
mov eax, dword [ebp - 0x3e8]
mov dword [edx], eax
jmp 0x1003c0e2
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]
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 - 0xc]
mov ecx, dword [esi]
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 0x1003c138
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x1003c188
mov ecx, dword [ebp - 0x3d8]
jmp 0x1003c17b
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 0x1003c175
mov byte [edi], 0xe9
mov dword [edi + 1], eax
jmp 0x1003c188
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]
mov eax, dword [esi - 4]
mov edi, dword [ebp - 0x3dc]
mov dword [ecx + 4], eax
mov ecx, dword [esi]
mov eax, dword [esi - 0xc]
mov dword [ecx], eax
mov ecx, dword [esi]
mov eax, dword [esi - 8]
mov dword [ecx + 8], eax
mov eax, dword [esi]
cmp dword [eax], 0
je 0x1003c1bc
lea ecx, [eax + 0x2c]
mov eax, dword [ebp - 0x3f8]
mov eax, dword [eax + edi*8]
mov dword [eax], ecx
mov eax, dword [esi]
push dword [esi - 4]
add eax, 0x2c
push eax
push dword [ebp - 0x3fc]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x74
push dword [esi]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [esi - 4]
push dword [esi - 0xc]
push dword [ebp - 0x3fc]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push dword [esi - 4]
push dword [esi - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esi]
cmp dword [ecx], 0
je 0x1003c214
inc dword [ebp - 0x3f0]
jmp 0x1003c26c
mov edx, dword [ecx + 0x6c]
test edx, edx
je 0x1003c221
mov eax, dword [ecx + 0x70]
mov dword [edx + 0x70], eax
mov edx, dword [ecx + 0x70]
test edx, edx
je 0x1003c22e
mov eax, dword [ecx + 0x6c]
mov dword [edx + 0x6c], eax
cmp dword [0x10164764], ecx
jne 0x1003c23e
mov eax, dword [ecx + 0x70]
mov dword [0x10164764], eax
mov dword [ecx + 0x70], 0
mov dword [ecx + 0x6c], 0
mov eax, dword [0x10164768]
mov dword [ecx + 0x70], eax
mov eax, dword [0x10164768]
test eax, eax
je 0x1003c260
mov dword [eax + 0x6c], ecx
mov dword [0x10164768], ecx
mov dword [esi], 0
mov eax, dword [ebp - 0x3e0]
inc edi
add esi, 0x70
mov dword [ebp - 0x3dc], edi
mov dword [ebp - 0x3ec], esi
cmp edi, eax
jl 0x1003be40
call fcn.1003c530
push dword [ebp - 0x400]
call fcn.100e13b3
add esp, 4
push dword [ebp - 0x3e4]
call fcn.100e13b3
add esp, 4
push 0x1016474c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3f0]
xor ecx, ebp
pop edi
pop esi
call fcn.100476aa
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret