Function at 0x1800018b0
Capabilities:
Allocate or change rwx memory

Disassembly:
sub rsp, 0x68
mov rax, qword [0x180005010]
xor rax, rsp
mov qword [rsp + 0x58], rax
cmp qword [0x180007688], 0
je 0x180001b98
cmp qword [0x180007680], 0
je 0x180001b98
mov qword [rsp + 0x70], rbx
xor ecx, ecx
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x60], rdi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
xor ebp, ebp
cmp rax, 0x78000000
lea rdi, [rax - 0x78000000]
cmovb rdi, rbp
lea rbx, [rax - 1]
cmp qword [0x1800076d8], rbp
jne 0x1800019e2
nop word [rax + rax]
mov r8d, 0x30
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x180001b67
cmp dword [rsp + 0x40], 0x10000
jne 0x1800019bc
mov rcx, qword [rsp + 0x38]
cmp rcx, 0x400
jb 0x1800019bc
mov rbx, qword [rsp + 0x20]
add rcx, 0xfffffffffffffc00
add rbx, rcx
mov edx, 0x400
mov rcx, rbx
mov r9d, 0x40
mov r8d, 0x3000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [0x1800076d8], rax
test rax, rax
je 0x18000199e
mov qword [0x1800076e0], 0x400
mov qword [0x1800076e8], rbp
jmp 0x1800019c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x400
lea rcx, str.trampoline_alloc__016I64Xx_016I64X_failed___08X_
mov r9d, eax
mov rdx, rbx
call fcn.180001060
mov rax, qword [0x1800076d8]
test rax, rax
jne 0x1800019d0
mov rbx, qword [rsp + 0x20]
dec rbx
cmp rbx, rdi
jb 0x180001b59
test rax, rax
je 0x180001920
mov rbx, qword [0x180007678]
lea r9, [rsp + 0x50]
add rbx, qword [0x180007688]
mov edx, 3
mov rcx, rbx
mov qword [rsp + 0x80], rsi
lea r8d, [rdx + 0x3d]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movzx eax, word [0x18000503c]
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x50]
mov edx, 3
mov word [rbx], ax
mov rcx, rbx
movzx eax, byte [0x18000503e]
mov byte [rbx + 2], al
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rcx, str.Hook_installed_
call fcn.180001060
mov rbx, qword [0x180007678]
add rbx, qword [0x180007680]
mov rax, qword [0x1800076d8]
movsxd rsi, dword [rbx + 1]
test rax, rax
je 0x180001bd1
cmp qword [0x1800076f0], rbp
jne 0x180001bea
mov rcx, qword [0x1800076e8]
lea rdi, [rcx + rax]
mov qword [0x1800076f0], rdi
test rdi, rdi
je 0x180001c03
mov rax, qword [0x1800076e0]
sub rax, rcx
cmp rax, 0xc
jb 0x180001bb8
add rcx, 0xc
mov qword [0x1800076f0], rbp
mov edx, 7
mov qword [0x1800076e8], rcx
lea r9, [rsp + 0x50]
mov rcx, rdi
lea r8d, [rdx + 0x39]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [0x180005034]
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x50]
mov edx, 7
mov dword [rdi], eax
mov rcx, rdi
movzx eax, word [0x180005038]
mov word [rdi + 4], ax
movzx eax, byte [0x18000503a]
mov byte [rdi + 6], al
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rdx, [rbx + 5]
mov r8b, 0xe9
add rdx, rsi
lea rcx, [rdi + 7]
call fcn.180001520
mov r8b, 0xe8
mov rdx, rdi
mov rcx, rbx
call fcn.180001520
lea rcx, str.Hook_installed_
call fcn.180001060
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.180001ea0
add rsp, 0x68
ret
lea rcx, str.couldnt_allocate_trampoline__no_free_space_before_image
call fcn.180001060
jmp 0x180001b7b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.VirtualQuery_failed:__08X
call fcn.180001060
cmp qword [0x1800076d8], rbp
jne 0x1800019e2
lea rcx, str.couldnt_create_codegen_buffer._this_is_fatal._skipping_remainder_of_init_process.
call fcn.180001060
xor eax, eax
jmp 0x180001b38
lea rcx, str.Hook_addr_not_set_
call fcn.180001060
xor eax, eax
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.180001ea0
add rsp, 0x68
ret
lea r8, str.len___Remain__
mov edx, 0x6e
lea rcx, str.C:GamesVSStarFieldCommonBranchTrampoline.cpp
call fcn.1800014a0
int3
lea r8, str.m_base
mov edx, 0x60
lea rcx, str.C:GamesVSStarFieldCommonBranchTrampoline.cpp
call fcn.1800014a0
int3
lea r8, str._m_curAlloc
mov edx, 0x61
lea rcx, str.C:GamesVSStarFieldCommonBranchTrampoline.cpp
call fcn.1800014a0
int3
lea r8, str.m_curAlloc
mov edx, 0x6b
lea rcx, str.C:GamesVSStarFieldCommonBranchTrampoline.cpp
call fcn.1800014a0
int3