Function at 0x18003b468
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 0x18003b6db
test rdx, rdx
je 0x18003b704
test r8d, r8d
je 0x18003b72d
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov edx, ebx
mov ebp, ebx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18003b5b6
sub ebx, 1
je 0x18003b58a
sub ebx, 1
je 0x18003b552
sub ebx, 2
je 0x18003b51c
cmp ebx, 4
je 0x18003b4e4
mov r8d, ebp
mov rdx, rsi
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18003b58e
test dil, 7
je 0x18003b514
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 0x18003b502
cmp al, 0x2f
jne 0x18003b505
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b5df
jmp 0x18003b4fa
mov rax, qword [rsi]
mov qword [rdi], rax
jmp 0x18003b58e
test dil, 3
je 0x18003b54c
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 0x18003b53a
cmp al, 0x2f
jne 0x18003b53d
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b633
jmp 0x18003b532
mov eax, dword [rsi]
mov dword [rdi], eax
jmp 0x18003b58e
test dil, 1
je 0x18003b582
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 0x18003b570
cmp al, 0x2f
jne 0x18003b573
mov rdx, rcx
inc rcx
mov al, byte [rcx]
test al, al
je 0x18003b687
jmp 0x18003b568
movzx eax, word [rsi]
mov word [rdi], ax
jmp 0x18003b58e
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.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._false___virtualprotect_failed_
mov r8d, 0x34
call fcn.18003d2a0
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, 0x24
call fcn.18003d0d0
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x25
call fcn.18003d2a0
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, 0x24
call fcn.18003d0d0
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x25
call fcn.18003d2a0
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, 0x24
call fcn.18003d0d0
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
mov r8d, 0x25
call fcn.18003d2a0
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._dest___NULL
mov r8d, 0x2f
call fcn.18003d2a0
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._src___NULL
mov r8d, 0x30
call fcn.18003d2a0
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
lea r9, str._length___0
mov r8d, 0x31
call fcn.18003d2a0
int3