Function at 0x180068440
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
mov rbp, rsp
sub rsp, 0x60
mov rax, qword [0x1801a0040]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov eax, dword [rcx]
mov r15, r8
mov rsi, rdx
mov rbx, rcx
test eax, eax
jne 0x180068476
mov rdx, qword [rcx + 8]
call fcn.180068660
mov dword [rbx], eax
mov rcx, qword [rbx + 8]
lea r9, [rbp - 0x18]
movsxd rdx, eax
mov r8d, 0x40
mov dword [rbp - 0x18], 0
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rbx + 8]
mov edx, 0x16
lea r8d, [rdx + 0x2a]
call fcn.180068710
mov qword [rbx + 0x10], rax
test rax, rax
je 0x18006861d
mov qword [rsp + 0x98], r14
xor ecx, ecx
mov dword [rbp - 0x40], 0x448b4850
mov r8d, 0x3000
mov word [rbp - 0x3c], 0xf824
mov dword [rbp - 0x38], 0x24448948
mov word [rbp - 0x34], 0x48f0
lea r9d, [rcx + 0x40]
mov dword [rax], 0x24448948
mov word [rax + 4], 0x48f0
mov byte [rax + 6], 0xb8
mov rax, qword [rbx + 0x10]
movzx r14d, word [rbp - 0x3c]
mov qword [rax + 7], rsi
mov rax, qword [rbx + 0x10]
mov esi, dword [rbp - 0x40]
mov dword [rax + 0xf], esi
mov word [rax + 0x13], r14w
mov byte [rax + 0x15], 0xc3
mov eax, dword [rbx]
add eax, 0x16
movsxd rdx, eax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rbx + 0x18], rax
test rax, rax
je 0x18006863e
mov qword [r15], rax
movsxd r8, dword [rbx]
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
movsxd rdx, dword [rbx]
add rdx, qword [rbx + 0x18]
mov eax, dword [rbp - 0x38]
mov dword [rdx], eax
movzx eax, word [rbp - 0x34]
mov word [rdx + 4], ax
mov byte [rdx + 6], 0xb8
movsxd rdx, dword [rbx]
mov rax, qword [rbx + 0x18]
mov rcx, qword [rbx + 8]
add rcx, rdx
mov qword [rax + rdx + 7], rcx
movsxd rcx, dword [rbx]
mov rax, qword [rbx + 0x18]
mov dword [rcx + rax + 0xf], esi
mov word [rcx + rax + 0x13], r14w
mov byte [rcx + rax + 0x15], 0xc3
mov rax, qword [rbx + 8]
mov ecx, dword [rbx + 0x10]
sub ecx, dword [rbx + 8]
sub ecx, 5
mov byte [rax], 0xe9
mov rax, qword [rbx + 8]
mov dword [rax + 1], ecx
mov eax, dword [rbx]
cmp eax, 5
jle 0x1800685b6
mov rcx, qword [rbx + 8]
add eax, 0xfffffffb
movsxd r8, eax
add rcx, 5
mov edx, 0x90
call sub.VCRUNTIME140.dll_memset
movsxd rdx, dword [rbx]
lea r9, [rbp - 0x18]
mov r8d, dword [rbp - 0x18]
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [rbx + 0x10]
lea r9, [rbp - 0x18]
mov edx, 0x16
lea r8d, [rdx + 0xa]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [rbx]
lea r9, [rbp - 0x18]
mov rcx, qword [rbx + 0x18]
add eax, 0x16
movsxd rdx, eax
mov r8d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r14, qword [rsp + 0x98]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.180090770
add rsp, 0x60
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, str.Failed_to_allocate_memory_for_the_hook
lea rcx, [rbp - 0x30]
call fcn.18005f870
lea rdx, [0x18019db90]
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rdx, str.Failed_to_allocate_memory_for_the_hook
lea rcx, [rbp - 0x30]
call fcn.18005f870
lea rdx, [0x18019db90]
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
int3