Function at 0x180103500
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov rax, qword [0x1802a5100]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov rax, qword [rcx + 0x68]
test rax, rax
je 0x180103626
cmp byte [rax], 0
je 0x180103626
cmp qword [rcx + 0x70], 0
je 0x180103626
mov rdi, qword [0x1802c8140]
add rsi, 8
mov rax, qword [rsi + 0x10]
movabs rbx, 0x7fffffffffffffff
sub rbx, rax
cmp rbx, 0x27
jb 0x180103b4a
cmp qword [rsi + 0x18], 0xf
jbe 0x180103584
mov rsi, qword [rsi]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], 0x27
lea r9, str.Patch_already_applied_and_enabled_for:
lea rcx, [rbp - 0x70]
call fcn.180077ed0
nop
lea rax, [rbp - 0x70]
cmp qword [rbp - 0x58], 0xf
cmova rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea r15, str.C:UsersNGxD_TVDesktopGTA_ModdingNGxD_TV___Mod_Menu_srchookinghooking.cpp
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], 0x158
lea r12, str.apply_patch
mov qword [rsp + 0x60], r12
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm1
movsd xmm0, qword [rsp + 0x60]
movsd qword [rbp - 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 1
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.1800b6e20
nop
lea rcx, [rbp - 0x70]
jmp 0x180103b18
lea rdx, [rcx + 0x28]
mov r9, qword [r8]
mov r8, qword [rbx]
lea rcx, [rbp - 0x50]
call fcn.180101080
nop
lea rcx, [rbp - 0x50]
call fcn.180100bf0
lea rcx, [rbp - 0x50]
call fcn.180100bf0
mov rax, qword [rbp + 0x10]
sub rax, qword [rbp + 8]
test rax, 0xfffffffffffffff8
jne 0x18010372e
mov rdi, qword [0x1802c8140]
add rsi, 8
mov rax, qword [rsi + 0x10]
movabs rbx, 0x7fffffffffffffff
sub rbx, rax
cmp rbx, 0x16
jb 0x180103b50
cmp qword [rsi + 0x18], 0xf
jbe 0x180103690
mov rsi, qword [rsi]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], 0x16
lea r9, str.Pattern_not_found_for
lea rcx, [rbp - 0x70]
call fcn.180077ed0
nop
lea rax, [rbp - 0x70]
cmp qword [rbp - 0x58], 0xf
cmova rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea r15, str.C:UsersNGxD_TVDesktopGTA_ModdingNGxD_TV___Mod_Menu_srchookinghooking.cpp
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], 0x15f
lea r12, str.apply_patch
mov qword [rsp + 0x60], r12
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm1
movsd xmm0, qword [rsp + 0x60]
movsd qword [rbp - 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 3
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.1800b6e20
nop
jmp 0x180103ab7
lea rcx, [rbp - 0x50]
call fcn.180100bf0
mov rdx, qword [rbp + 0x10]
mov rax, rdx
sub rax, qword [rbp + 8]
test rax, 0xfffffffffffffff8
jne 0x180103775
mov qword [rsp + 0x40], 0
cmp rdx, qword [rbp + 0x18]
je 0x180103767
mov qword [rdx], 0
add qword [rbp + 0x10], 8
jmp 0x180103775
lea r8, [rsp + 0x40]
lea rcx, [rbp + 8]
call fcn.1800c81f0
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
test rcx, rcx
je 0x180103ac1
movsxd r14, dword [rsi + 0x48]
add r14, rcx
je 0x180103ac1
mov edx, 1
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x180103ac1
movabs rax, 0xfffffffe00000000
add rax, r14
mov qword [rbx], rax
movabs rax, 0x220000000
add rax, r14
mov qword [rdi], rax
mov rdx, qword [rsi + 0x58]
sub rdx, qword [rsi + 0x50]
lea r9, [rsp + 0x68]
mov r8d, 0x40
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1801039ee
mov rbx, qword [rsi + 0x50]
mov rdi, qword [rsi + 0x58]
sub rdi, rbx
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call fcn.18013ad10
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x40]
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rdx, qword [rsi + 0x58]
sub rdx, qword [rsi + 0x50]
lea r9, [rsp + 0x68]
mov r8d, dword [rsp + 0x68]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r13, qword [0x1802c8140]
lea rdi, [rsi + 8]
mov rcx, qword [rdi + 0x10]
movabs rbx, 0x7fffffffffffffff
mov rax, rbx
sub rax, rcx
cmp rax, 0x15
jb 0x180103b56
mov r9, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x180103883
mov r9, qword [rdi]
mov qword [rsp + 0x30], 0x15
lea rax, str._successfully_patched
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x70]
call fcn.180077ed0
nop
lea rax, [rbp - 0x70]
cmp qword [rbp - 0x58], 0xf
cmova rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea r15, str.C:UsersNGxD_TVDesktopGTA_ModdingNGxD_TV___Mod_Menu_srchookinghooking.cpp
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], 0x16f
lea r12, str.apply_patch
mov qword [rsp + 0x60], r12
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm1
movsd xmm0, qword [rsp + 0x60]
movsd qword [rbp - 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 1
lea rdx, [rsp + 0x70]
mov rcx, r13
call fcn.1800b6e20
nop
lea rcx, [rbp - 0x70]
call fcn.1800771b0
mov qword [rsi + 0x70], r14
mov rax, qword [rsi + 0x68]
test rax, rax
je 0x180103ac1
mov byte [rax], 1
mov rsi, qword [0x1802c8140]
mov rax, qword [rdi + 0x10]
sub rbx, rax
cmp rbx, 0x1a
jb 0x180103b5c
cmp qword [rdi + 0x18], 0xf
jbe 0x18010395b
mov rdi, qword [rdi]
mov qword [rsp + 0x30], 0x1a
lea rcx, str._enabled_flag_set_to_true.
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
mov r9, rdi
lea rcx, [rbp - 0x70]
call fcn.180077ed0
nop
lea rax, [rbp - 0x70]
cmp qword [rbp - 0x58], 0xf
cmova rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], 0x174
mov qword [rsp + 0x60], r12
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm1
movsd xmm0, qword [rsp + 0x60]
movsd qword [rbp - 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 1
lea rdx, [rsp + 0x70]
mov rcx, rsi
call fcn.1800b6e20
nop
jmp 0x180103ab7
mov rdi, qword [0x1802c8140]
add rsi, 8
mov rax, qword [rsi + 0x10]
movabs rbx, 0x7fffffffffffffff
sub rbx, rax
cmp rbx, 0x2e
jb 0x180103b62
cmp qword [rsi + 0x18], 0xf
jbe 0x180103a1e
mov rsi, qword [rsi]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], 0x2e
lea r9, str.Failed_to_change_memory_protection_for_patch:
lea rcx, [rbp - 0x70]
call fcn.180077ed0
nop
lea rax, [rbp - 0x70]
cmp qword [rbp - 0x58], 0xf
cmova rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov rax, qword [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea r15, str.C:UsersNGxD_TVDesktopGTA_ModdingNGxD_TV___Mod_Menu_srchookinghooking.cpp
mov qword [rsp + 0x50], r15
mov dword [rsp + 0x58], 0x178
lea r12, str.apply_patch
mov qword [rsp + 0x60], r12
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x70], xmm1
movsd xmm0, qword [rsp + 0x60]
movsd qword [rbp - 0x80], xmm0
lea r9, [rsp + 0x40]
mov r8d, 4
lea rdx, [rsp + 0x70]
mov rcx, rdi
call fcn.1800b6e20
nop
lea rcx, [rbp - 0x70]
call fcn.1800771b0
nop
mov rcx, qword [rbp + 8]
test rcx, rcx
je 0x180103b0b
mov rdx, qword [rbp + 0x18]
sub rdx, rcx
and rdx, 0xfffffffffffffff8
mov rax, rcx
cmp rdx, 0x1000
jb 0x180103af6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180103b44
call fcn.18010ca74
mov qword [rbp + 8], 0
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x10], xmm0
lea rcx, [rbp - 0x30]
call fcn.1800771b0
lea rcx, [rbp - 0x50]
call fcn.1800771b0
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.18010c6a0
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.180112b44
int3
call fcn.180076dc0
nop
call fcn.180076dc0
nop
call fcn.180076dc0
int3
call fcn.180076dc0
int3
call fcn.180076dc0
int3