Function at 0x18009ce50
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x78
mov rax, qword [0x1801548a8]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov r12, qword [rsp + 0xd0]
xor r13d, r13d
mov qword [rsp + 0x38], r8
mov rdi, r9
mov qword [rsp + 0x30], rcx
mov rbp, rdx
mov r14, rcx
mov esi, r13d
test r8, r8
je 0x18009ce96
mov qword [r8], r13
test rdi, rdi
je 0x18009ce9e
mov qword [r9], r13
test r12, r12
je 0x18009cea7
mov qword [r12], r13
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x180165fc0], eax
je 0x18009cebf
mov eax, 0x10dd
jmp 0x18009d255
mov eax, dword [0x180165fc4]
test eax, eax
jne 0x18009d255
test r14, r14
jne 0x18009cedb
lea eax, [r14 + 6]
jmp 0x18009d255
mov qword [rsp + 0x70], rbx
mov rbx, qword [r14]
test rbx, rbx
jne 0x18009cf01
mov esi, 6
mov qword [0x180165fc8], r14
mov dword [0x180165fc4], esi
mov eax, esi
jmp 0x18009d250
cmp byte [rbx], 0xff
mov r14, r13
mov qword [rsp + 0x68], r15
mov r15, r13
jne 0x18009cf36
cmp byte [rbx + 1], 0x25
jne 0x18009cf36
movsxd r13, dword [rbx + 2]
lea rdx, [rbx + 6]
add rdx, r13
mov rcx, rbx
call fcn.18009cd20
test al, al
je 0x18009cf33
mov rbx, qword [r13 + rbx + 6]
xor r13d, r13d
cmp byte [rbx], 0xeb
jne 0x18009cf57
movsx rax, byte [rbx + 1]
add rbx, 2
add rbx, rax
cmp byte [rbx], 0xe9
jne 0x18009cf57
movsxd rax, dword [rbx + 1]
add rbx, 5
add rbx, rax
test rbp, rbp
jne 0x18009cf61
mov rbp, r13
jmp 0x18009cfac
cmp byte [rbp], 0xff
jne 0x18009cf89
cmp byte [rbp + 1], 0x25
jne 0x18009cf89
movsxd r13, dword [rbp + 2]
lea rdx, [rbp + 6]
add rdx, r13
mov rcx, rbp
call fcn.18009cd20
test al, al
je 0x18009cf89
mov rbp, qword [r13 + rbp + 6]
cmp byte [rbp], 0xeb
jne 0x18009cfac
movsx rax, byte [rbp + 1]
add rbp, 2
add rbp, rax
cmp byte [rbp], 0xe9
jne 0x18009cfac
movsxd rax, dword [rbp + 1]
add rbp, 5
add rbp, rax
cmp rbp, rbx
jne 0x18009cfc7
cmp dword [0x180165fb8], esi
jne 0x18009d20b
mov r13, qword [rsp + 0x38]
jmp 0x18009d1bf
test rdi, rdi
je 0x18009cfcf
mov qword [rdi], rbx
test r12, r12
je 0x18009cfd8
mov qword [r12], rbp
mov ecx, 0x30
call fcn.1800969c8
mov r15, rax
test rax, rax
jne 0x18009cff7
mov r13, qword [rsp + 0x38]
lea esi, [rax + 8]
jmp 0x18009d1bf
mov rcx, rbx
call fcn.18009cb30
mov r13, qword [rsp + 0x38]
mov r14, rax
test rax, rax
jne 0x18009d014
lea esi, [rax + 8]
jmp 0x18009d1bf
test r13, r13
je 0x18009d01d
mov qword [r13], r14
xor eax, eax
mov rdi, rbx
mov qword [r14 + 0x40], rax
mov r12, r14
lea rax, [r14 + 0x1e]
mov qword [rsp + 0x40], rax
nop dword [rax]
nop word [rax + rax]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x38], 0
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8, rdi
lea rdx, [rsp + 0x40]
mov rcx, r12
mov rsi, rdi
call fcn.18009df20
mov rdi, rax
movsxd rax, dword [rsp + 0x38]
sub rax, rsi
mov edx, edi
add rax, rdi
sub edx, ebx
add r12, rax
movzx eax, dl
and al, 7
movzx ecx, r12b
sub cl, r14b
shl cl, 3
or cl, al
mov byte [r14 + 0x40], cl
movzx ecx, byte [rsi]
lea eax, [rcx + 0x3e]
cmp al, 0x29
ja 0x18009d0af
movzx eax, al
movabs r8, 0x28040000403
bt r8, rax
jb 0x18009d11f
cmp cl, 0xff
jne 0x18009d0ba
cmp byte [rsi + 1], 0x25
jmp 0x18009d0e0
lea eax, [rcx - 0x26]
cmp al, 0x3f
ja 0x18009d0d1
movabs r8, 0xc000000000010101
bt r8, rax
jb 0x18009d0d6
cmp cl, 0xe3
jne 0x18009d0e2
cmp byte [rsi + 1], 0xff
jne 0x18009d0e2
cmp byte [rsi + 2], 0x25
je 0x18009d11f
cmp edx, 5
jb 0x18009d040
cmp r12, qword [rsp + 0x40]
jbe 0x18009d0f3
int3
mov byte [r14 + 0x3e], dl
lea rcx, [r14 + 0x20]
mov esi, edx
sub r12b, r14b
mov r8d, edx
mov rdx, rbx
mov byte [r14 + 0x1e], r12b
call fcn.1800c5d60
cmp rsi, 0x19
jbe 0x18009d14d
mov esi, 6
jmp 0x18009d1bf
cmp edx, 5
jae 0x18009d0eb
cmp byte [rdi], 0x90
jne 0x18009d138
inc rdi
mov rdx, rdi
sub edx, ebx
cmp edx, 5
jb 0x18009d124
jmp 0x18009d0eb
cmp edx, 5
jae 0x18009d0eb
cmp dword [0x180165fb8], 0
mov esi, 9
jne 0x18009d1c5
jmp 0x18009d1bf
movzx edx, byte [r14 + 0x1e]
lea rax, [rsi + rbx]
mov qword [r14 + 0x48], rax
add rdx, r14
mov qword [r14 + 0x50], rbp
mov eax, r14d
xor ebp, ebp
mov word [rdx], 0x25ff
lea rcx, [rdx + 6]
sub eax, ecx
lea rdi, [rdx + 6]
add eax, 0x48
mov dword [rdx + 2], eax
mov rcx, qword [rsp + 0x40]
sub rcx, rdi
cmp rdi, qword [rsp + 0x40]
cmova rcx, rbp
test rcx, rcx
je 0x18009d198
mov eax, 0xcc
rep stosb byte [rdi], al
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], ebp
mov r8d, 0x40
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18009d21b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [0x180165fc4], esi
test r14, r14
je 0x18009d1f9
xor edx, edx
mov rdi, r14
mov rcx, r14
and rdi, 0xffffffffffff0000
lea r8d, [rdx + 0x60]
call fcn.1800c61d0
mov rax, qword [rdi + 0x10]
mov qword [r14 + 0x48], rax
mov qword [rdi + 0x10], r14
test r13, r13
je 0x18009d1f9
xor eax, eax
mov qword [r13], rax
test r15, r15
je 0x18009d20b
mov edx, 0x30
mov rcx, r15
call fcn.1800965cc
mov rax, qword [rsp + 0x30]
mov qword [0x180165fc8], rax
mov eax, esi
jmp 0x18009d24b
mov rax, qword [rsp + 0x30]
mov qword [r15 + 0x10], rax
mov dword [r15 + 8], ebp
mov qword [r15 + 0x20], r14
mov qword [r15 + 0x18], rbx
mov eax, dword [rsp + 0x48]
mov dword [r15 + 0x28], eax
mov rax, qword [0x180165fd8]
mov qword [r15], rax
xor eax, eax
mov qword [0x180165fd8], r15
mov r15, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180096b80
add rsp, 0x78
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret