Function at 0x180012410
Capabilities:
Allocate or change rwx memory

Disassembly:
mov r11, rsp
push rbp
push r14
push r15
sub rsp, 0x230
mov rax, qword [0x18006e168]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
xor eax, eax
mov dword [rsp + 0x30], r9d
mov qword [rsp + 0x58], r8
mov qword [r11 - 0x98], rax
mov qword [r11 - 0x90], rax
mov qword [r11 - 0x88], rax
mov qword [r11 - 0x80], rax
mov qword [r11 - 0x78], rax
mov qword [r11 - 0x70], rax
mov qword [r11 - 0x68], rax
mov qword [r11 - 0x60], rax
lea rax, [rsp + 0x38]
xor ebp, ebp
lea r8, [r11 - 0x98]
mov r14, rdx
lea r9d, [rbp + 0x40]
mov qword [rsp + 0x20], rax
mov r15, rcx
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180012a42
cmp qword [rsp + 0x38], 0x40
jb 0x180012a42
lea rcx, [rsp + 0x70]
xor edx, edx
mov r8d, 0x108
call sub.MSVCR80.dll_memset
movsxd rdx, dword [rsp + 0x1ec]
lea rax, [rsp + 0x38]
lea r8, [rsp + 0x70]
add rdx, r14
mov r9d, 0x108
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180012a42
cmp qword [rsp + 0x38], 0x108
jb 0x180012a42
cmp word [rsp + 0x88], 0x20b
je 0x180012509
lea ecx, [rbp + 9]
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x180012a42
movzx ecx, word [rsp + 0x84]
mov eax, dword [rsp + 0x1ec]
mov qword [rsp + 0x228], rbx
mov qword [rsp + 0x218], rdi
mov edi, ebp
mov dword [rsp + 0x150], ebp
cmp word [rsp + 0x76], di
lea edx, [rcx + rax + 0x18]
mov dword [rsp + 0x154], ebp
jbe 0x1800125ef
mov ebx, edx
nop
nop
xor edx, edx
lea rcx, [rsp + 0x180]
lea r8d, [rdx + 0x28]
call sub.MSVCR80.dll_memset
mov edx, edi
lea r8, [rsp + 0x180]
lea rax, [rdx + rdx*4]
mov r9d, 0x28
mov rcx, r15
lea rdx, [rbx + rax*8]
lea rax, [rsp + 0x38]
add rdx, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180012a32
cmp qword [rsp + 0x38], 0x28
jb 0x180012a32
cmp dword [rsp + 0x158], ebp
jne 0x1800125df
mov edx, dword [rsp + 0x100]
mov ecx, dword [rsp + 0x18c]
cmp edx, ecx
jb 0x1800125df
mov r8d, dword [rsp + 0x190]
lea eax, [r8 + rcx]
cmp edx, eax
jae 0x1800125df
mov dword [rsp + 0x158], ecx
mov dword [rsp + 0x15c], r8d
movzx eax, word [rsp + 0x76]
add edi, 1
cmp edi, eax
jb 0x180012550
mov edi, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x104]
mov qword [rsp + 0x220], rsi
mov qword [rsp + 0x210], r12
mov qword [rsp + 0x208], r13
movabs rax, 0xcccccccccccccccd
mov r13d, edi
mul rcx
shl r13d, 5
mov rsi, rdx
shr rsi, 4
lea eax, [rdi + rsi]
lea ecx, [rax + rax*4]
lea ebx, [rcx*4 + 7]
and ebx, 0xfffffff8
add r13d, ebx
test edi, edi
mov r12d, r13d
je 0x180012671
mov rdx, qword [rsp + 0x58]
mov r8, rdi
nop
mov rdi, qword [rdx]
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
add rdx, 8
not rcx
add ecx, 3
and ecx, 0xfffffffc
add r12d, ecx
sub r8, 1
jne 0x180012650
mov ecx, r12d
mov edi, r12d
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
test rax, rax
mov qword [rsp + 0x48], rax
je 0x180012a1a
mov r8, rdi
xor edx, edx
mov rcx, rax
call sub.MSVCR80.dll_memset
mov ecx, dword [rsp + 0x90]
mov edx, dword [rsp + 0x94]
mov eax, dword [rsp + 0x9c]
add rdx, rcx
mov ecx, dword [rsp + 0x8c]
add rcx, r14
mov r8d, r12d
add rcx, rdx
mov rdx, r14
add rax, rcx
mov rcx, r15
cmp r14, rax
cmovb rdx, rax
call fcn.180012130
test rax, rax
mov qword [rsp + 0x68], rax
je 0x180012a0d
mov edx, dword [rsp + 0x100]
mov ecx, eax
mov dword [rsp + 0x40], ebp
sub ecx, r14d
test edx, edx
mov dword [rsp + 0x44], ecx
je 0x1800127c2
mov eax, dword [rsp + 0x30]
mov ecx, esi
mov rsi, qword [rsp + 0x48]
lea rdi, [rcx + rcx*4]
lea rcx, [rax + rax*4]
lea rax, [rsp + 0x38]
lea r8, [rsi + rcx*4]
shl rdi, 2
add rdx, r14
mov r9, rdi
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x180012a12
cmp qword [rsp + 0x38], rdi
jb 0x180012a12
mov ecx, dword [rsp + 0x44]
cmp dword [rsp + 0x30], ebp
mov dword [rsp + 0x50], ebp
movsxd rax, ebx
jbe 0x1800128a9
lea edx, [rcx + rbx]
mov ebx, dword [rsp + 0x44]
lea rcx, [rax + rsi + 8]
mov qword [rsp + 0x60], rcx
lea r11, [rsi + 4]
mov dword [rsp + 0x48], edx
mov edx, r12d
sub edx, r13d
cmp rdx, 0x7fffffff
ja 0x180012a12
mov rax, qword [rsp + 0x58]
mov ecx, r13d
mov r9, rdx
mov rdi, qword [rax]
add rcx, rsi
test rdx, rdx
mov rax, rcx
mov r10d, ebp
je 0x180012a12
movzx r8d, byte [rdi]
test r8b, r8b
je 0x1800127cc
mov byte [rax], r8b
add rax, 1
add rdi, 1
sub r9, 1
jne 0x1800127a6
jmp 0x1800127d1
mov rsi, qword [rsp + 0x48]
jmp 0x180012749
test r9, r9
jne 0x1800127db
sub rax, 1
mov r10d, 0x8007007a
test r10d, r10d
mov byte [rax], bpl
js 0x180012a12
test rdx, rdx
je 0x180012819
test rcx, rcx
je 0x180012819
cmp rdx, 2
jb 0x180012819
cmp byte [rcx], 0x3f
jne 0x180012802
cmp byte [rcx + 1], 0x3f
je 0x180012812
sub rdx, 1
add rcx, 1
cmp rdx, 2
jae 0x1800127f7
jmp 0x180012819
mov byte [rcx], 0x36
mov byte [rcx + 1], 0x34
mov r8, qword [rsp + 0x60]
mov r9d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
mov dword [r11 - 4], r9d
mov qword [r8], rbp
or rcx, 0xffffffffffffffff
lea eax, [r9 + 0x10]
movabs r10, 0x8000000000000001
add r8, 0x20
mov qword [r8 - 0x28], r10
mov dword [r11 + 0xc], eax
mov qword [r8 - 0x18], r10
mov qword [r8 - 0x10], rbp
lea eax, [rbx + r13]
mov dword [r11], ebp
mov dword [r11 + 8], eax
mov dword [r11 + 4], ebp
mov rdi, qword [rdx]
xor eax, eax
add r9d, 0x20
add rdx, 8
repne scasb al, byte [rdi]
mov edi, dword [rsp + 0x50]
add r11, 0x14
not rcx
add edi, 1
mov dword [rsp + 0x48], r9d
add ecx, 3
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x58], rdx
and ecx, 0xfffffffc
mov dword [rsp + 0x50], edi
add r13d, ecx
cmp edi, dword [rsp + 0x30]
jb 0x180012773
jmp 0x1800128ad
mov ebx, dword [rsp + 0x44]
mov rdx, qword [rsp + 0x68]
mov r9d, r13d
mov r8, rsi
mov rcx, r15
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180012a12
cmp dword [rsp + 0x158], ebp
jne 0x1800128e6
mov dword [rsp + 0x158], ebx
mov dword [rsp + 0x15c], r12d
mov edi, dword [rsp + 0xc4]
xor eax, eax
lea r8, [rsp + 0x180]
lea r9d, [rax + 0x30]
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0x100], ebx
mov dword [rsp + 0x104], r12d
mov qword [rsp + 0x180], rax
mov qword [rsp + 0x188], rax
mov qword [rsp + 0x190], rax
mov qword [rsp + 0x198], rax
mov qword [rsp + 0x1a0], rax
mov qword [rsp + 0x1a8], rax
call qword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test rax, rax
je 0x180012a12
test byte [rsp + 0x1a4], 0xf0
mov ecx, 4
mov r9d, 0x40
setne al
mov r8, rdi
mov rdx, r14
test al, al
lea rax, [rsp + 0x40]
cmove r9d, ecx
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x180012a12
lea r8, [rsp + 0x1b0]
mov r9d, 0x40
mov rdx, r14
mov rcx, r15
mov dword [rsp + 0xc8], ebp
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180012a12
movsxd rdx, dword [rsp + 0x1ec]
lea r8, [rsp + 0x70]
mov r9d, 0x108
mov rcx, r15
add rdx, r14
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x180012a12
mov r8d, dword [rsp + 0xc4]
mov r9d, dword [rsp + 0x40]
lea rax, [rsp + 0x40]
mov rdx, r14
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov ecx, 1
test eax, eax
cmovne ebp, ecx
jmp 0x180012a12
mov rsi, qword [rsp + 0x48]
mov rcx, rsi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void____ptr64_
mov r12, qword [rsp + 0x210]
mov rsi, qword [rsp + 0x220]
mov r13, qword [rsp + 0x208]
mov rbx, qword [rsp + 0x228]
mov rdi, qword [rsp + 0x218]
mov eax, ebp
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.18003f5f0
add rsp, 0x230
pop r15
pop r14
pop rbp
ret