Function at 0x18013c070
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0xa0
movzx ebx, cl
xor r14d, r14d
mov edx, dword [0x180ae5124]
mov rax, qword gs:[0x58]
mov ecx, 0x1c
mov rax, qword [rax + rdx*8]
mov eax, dword [rcx + rax]
cmp dword [0x180ae8fb8], eax
jg 0x18013c3fc
mov rdi, qword [0x180ae5e40]
test rdi, rdi
jne 0x18013c135
lea rax, str.Failed_to_patch__at_0x:X__Invalid_address_
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], 0x2e
call fcn.1801f56e0
mov qword [rbp - 0x11], r14
mov qword [rbp - 0x19], r14
mov qword [rbp - 9], r14
movaps xmm0, xmmword [rbp - 0x29]
movdqa xmmword [rbp - 0x29], xmm0
movups xmm1, xmmword [rbp - 0x19]
movaps xmmword [rbp + 7], xmm1
movsd xmm0, qword [rbp - 9]
movsd qword [rbp + 0x17], xmm0
lea rcx, [0x180ae5e40]
mov qword [rsp + 0x28], rcx
lea rcx, str.patchTranslateRef
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x29]
mov r8d, 4
lea rdx, [rbp + 7]
mov rcx, rax
call fcn.180101570
jmp 0x18013c3de
test bl, bl
je 0x18013c313
cmp byte [0x180ae6c42], r14b
jne 0x18013c3de
mov ecx, 5
call fcn.1803427a0
mov rbx, rax
mov qword [rbp - 0x19], rax
lea rcx, [rax + 5]
mov qword [rbp - 9], rcx
xor eax, eax
mov dword [rbx], eax
mov byte [rbx + 4], al
mov qword [rbp - 0x11], rcx
lea r9, [rbp + 0x6f]
mov edx, 5
mov r8d, 0x40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rdi]
mov dword [rbx], eax
movzx eax, byte [rdi + 4]
mov byte [rbx + 4], al
lea r9, [rbp + 0x6f]
mov r8d, dword [rbp + 0x6f]
mov edx, 5
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rdx, [rbp - 0x19]
lea rcx, [0x180ae6c48]
call fcn.18009ef30
mov rcx, qword [rbp - 0x19]
test rcx, rcx
je 0x18013c1f1
mov rdx, qword [rbp - 9]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x18013c1ec
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18013c3f6
call fcn.180342c24
mov ecx, 5
call fcn.1803427a0
mov rdi, rax
mov qword [rbp + 7], rax
lea rsi, [rax + 5]
mov qword [rbp + 0x17], rsi
movabs rax, 0x9090909090909090
mov dword [rdi], eax
mov byte [rdi + 4], al
mov qword [rbp + 0xf], rsi
mov rbx, qword [0x180ae5e40]
lea r9, [rbp + 0x6f]
mov edx, 5
mov r8d, 0x40
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rdi]
mov dword [rbx], eax
movzx eax, byte [rdi + 4]
mov byte [rbx + 4], al
lea r9, [rbp + 0x6f]
mov r8d, dword [rbp + 0x6f]
mov edx, 5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, str.Patched__at_0x:X
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], 0x14
call fcn.1801f56e0
mov qword [rbp - 0x11], r14
mov qword [rbp - 0x19], r14
mov qword [rbp - 9], r14
movaps xmm0, xmmword [rbp - 0x29]
movdqa xmmword [rbp - 0x29], xmm0
movups xmm1, xmmword [rbp - 0x19]
movaps xmmword [rbp + 0x27], xmm1
movsd xmm0, qword [rbp - 9]
movsd qword [rbp + 0x37], xmm0
lea rcx, [0x180ae5e40]
mov qword [rsp + 0x28], rcx
lea rcx, str.patchTranslateRef
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x29]
mov r8d, 2
lea rdx, [rbp + 0x27]
mov rcx, rax
call fcn.180101570
mov byte [0x180ae6c42], 1
test rdi, rdi
je 0x18013c3de
sub rsi, rdi
cmp rsi, 0x1000
jb 0x18013c303
mov esi, 0x2c
mov rcx, qword [rdi - 8]
sub rdi, rcx
lea rax, [rdi - 8]
cmp rax, 0x1f
ja 0x18013c3f6
mov rdi, rcx
mov rdx, rsi
mov rcx, rdi
call fcn.180342c24
jmp 0x18013c3de
cmp byte [0x180ae6c42], r14b
je 0x18013c3de
mov rbx, qword [0x180ae6c50]
sub rbx, qword [0x180ae6c48]
lea r9, [rbp + 0x6f]
mov r8d, 0x40
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8, rbx
mov rdx, qword [0x180ae6c48]
mov rcx, rdi
call fcn.180381630
lea r9, [rbp + 0x6f]
mov r8d, dword [rbp + 0x6f]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rax, str.Unpatched__at_0x:X
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x21], 0x16
call fcn.1801f56e0
mov qword [rbp - 0x11], r14
mov qword [rbp - 0x19], r14
mov qword [rbp - 9], r14
movaps xmm0, xmmword [rbp - 0x29]
movdqa xmmword [rbp - 0x29], xmm0
movups xmm1, xmmword [rbp - 0x19]
movaps xmmword [rbp + 0x27], xmm1
movsd xmm0, qword [rbp - 9]
movsd qword [rbp + 0x37], xmm0
lea rcx, [0x180ae5e40]
mov qword [rsp + 0x28], rcx
lea rcx, str.patchTranslateRef
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x29]
mov r8d, 2
lea rdx, [rbp + 0x27]
mov rcx, rax
call fcn.180101570
mov byte [0x180ae6c42], r14b
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.180350d84
int3
lea rcx, [0x180ae8fb8]
call fcn.180342d00
cmp dword [0x180ae8fb8], 0xffffffff
jne 0x18013c0b7
lea rcx, [0x180396440]
call fcn.180342c04
lea rcx, [0x180ae8fb8]
call fcn.180342c94
jmp 0x18013c0b7