Function at 0x18003b588
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
mov edi, r8d
mov rsi, rdx
mov rbx, rcx
test rcx, rcx
je 0x18003b7fe
test rdx, rdx
je 0x18003b827
test r8d, r8d
je 0x18003b850
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov edx, edi
mov ebp, edi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18003b6d9
sub edi, 1
je 0x18003b6ad
sub edi, 1
je 0x18003b674
sub edi, 2
je 0x18003b63d
cmp edi, 4
je 0x18003b604
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
jmp 0x18003b6b1
test bl, 7
je 0x18003b635
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov cl, 0x43
lea r8, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp cl, 0x5c
mov rax, rdx
cmovne rax, r8
inc rdx
mov r8, rax
mov cl, byte [rdx]
test cl, cl
je 0x18003b702
jmp 0x18003b619
mov rax, qword [rsi]
mov qword [rbx], rax
jmp 0x18003b6b1
test bl, 3
je 0x18003b66e
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov cl, 0x43
lea r8, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp cl, 0x5c
mov rax, rdx
cmovne rax, r8
inc rdx
mov r8, rax
mov cl, byte [rdx]
test cl, cl
je 0x18003b756
jmp 0x18003b652
mov eax, dword [rsi]
mov dword [rbx], eax
jmp 0x18003b6b1
test bl, 1
je 0x18003b6a5
lea rdx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
mov cl, 0x43
lea r8, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
cmp cl, 0x5c
mov rax, rdx
cmovne rax, r8
inc rdx
mov r8, rax
mov cl, byte [rdx]
test cl, cl
je 0x18003b7aa
jmp 0x18003b689
movzx eax, word [rsi]
mov word [rbx], ax
jmp 0x18003b6b1
mov al, byte [rsi]
mov byte [rbx], al
mov r8d, dword [rsp + 0x50]
lea r9, [rsp + 0x68]
mov rdx, rbp
mov rcx, rbx
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
mov r8d, 0x34
lea r9, str._false___virtualprotect_failed_
call fcn.18003d3c8
int3
lea rcx, [rax + 1]
mov qword [rsp + 0x28], rbx
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov qword [rsp + 0x20], 8
mov r8d, 0x24
lea rdx, str.VolatileWrite
call fcn.18003d1f8
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
mov r8d, 0x25
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
call fcn.18003d3c8
int3
lea rcx, [rax + 1]
mov qword [rsp + 0x28], rbx
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov qword [rsp + 0x20], 4
mov r8d, 0x24
lea rdx, str.VolatileWrite
call fcn.18003d1f8
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
mov r8d, 0x25
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
call fcn.18003d3c8
int3
lea rcx, [rax + 1]
mov qword [rsp + 0x28], rbx
lea r9, str._ERROR:_write__u_bytes_to_address__p_is_not_atomic
mov qword [rsp + 0x20], 2
mov r8d, 0x24
lea rdx, str.VolatileWrite
call fcn.18003d1f8
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.VolatileWrite
mov r8d, 0x25
lea r9, str._false___Unaligned_write_to_atomic_memory_is_not_atomic____
call fcn.18003d3c8
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
mov r8d, 0x2f
lea r9, str._dest___NULL
call fcn.18003d3c8
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
mov r8d, 0x30
lea r9, str._src___NULL
call fcn.18003d3c8
int3
lea rcx, str.C:UsersSethDesktopcodeStarfield_Console_Replacer_srchook_api.cpp
call fcn.18003a360
mov rcx, rax
lea rdx, str.SafeWriteMemory
mov r8d, 0x31
lea r9, str._length___0
call fcn.18003d3c8
int3