Function at 0x18003b664
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
mov ebx, r8d
mov rsi, rdx
mov rdi, rcx
test rcx, rcx
je 0x18003b8d7
test rdx, rdx
je 0x18003b900
test r8d, r8d
je 0x18003b929
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov edx, ebx
mov ebp, ebx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18003b7b2
sub ebx, 1
je 0x18003b786
sub ebx, 1
je 0x18003b74e
sub ebx, 2
je 0x18003b718
cmp ebx, 4
je 0x18003b6e0
mov r8d, ebp
mov rdx, rsi
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18003b78a
test dil, 7
je 0x18003b710
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov al, 0x43
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp al, 0x5c
je 0x18003b6fe
cmp al, 0x2f
jne 0x18003b701
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b7db
jmp 0x18003b6f6
mov rax, qword [rsi]
mov qword [rdi], rax
jmp 0x18003b78a
test dil, 3
je 0x18003b748
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov al, 0x43
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp al, 0x5c
je 0x18003b736
cmp al, 0x2f
jne 0x18003b739
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b82f
jmp 0x18003b72e
mov eax, dword [rsi]
mov dword [rdi], eax
jmp 0x18003b78a
test dil, 1
je 0x18003b77e
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov al, 0x43
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp al, 0x5c
je 0x18003b76c
cmp al, 0x2f
jne 0x18003b76f
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b883
jmp 0x18003b764
movzx eax, word [rsi]
mov word [rdi], ax
jmp 0x18003b78a
mov al, byte [rsi]
mov byte [rdi], al
mov r8d, dword [rsp + 0x50]
lea r9, [rsp + 0x68]
mov rdx, rbp
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rbx, qword [rsp + 0x58]
test eax, eax
setne al
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._false___virtualprotect_failed_
mov r8d, 0x35
call fcn.18003d4bc
int3
lea rcx, [rdx + 1]
mov qword [rsp + 0x28], rdi
lea rdx, str.VolatileWrite
mov qword [rsp + 0x20], 8
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov r8d, 0x25
call fcn.18003d2ec
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x26
call fcn.18003d4bc
int3
lea rcx, [rdx + 1]
mov qword [rsp + 0x28], rdi
lea rdx, str.VolatileWrite
mov qword [rsp + 0x20], 4
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov r8d, 0x25
call fcn.18003d2ec
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x26
call fcn.18003d4bc
int3
lea rcx, [rdx + 1]
mov qword [rsp + 0x28], rdi
lea rdx, str.VolatileWrite
mov qword [rsp + 0x20], 2
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov r8d, 0x25
call fcn.18003d2ec
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x26
call fcn.18003d4bc
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._dest___NULL
mov r8d, 0x30
call fcn.18003d4bc
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._src___NULL
mov r8d, 0x31
call fcn.18003d4bc
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a31c
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._length___0
mov r8d, 0x32
call fcn.18003d4bc
int3