Function at 0x180172ce0
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x80
movzx esi, cl
xor r14d, r14d
mov edx, dword [0x180a562e4]
mov rax, qword gs:[0x58]
mov ecx, 0x1c
mov rax, qword [rax + rdx*8]
mov eax, dword [rcx + rax]
cmp dword [0x180a5a4a0], eax
jg 0x180172fd8
mov rdi, qword [0x180a572a8]
add rdi, 2
jne 0x180172d99
mov qword [rbp + 0x28], r14
lea rax, str.Failed_to_patch__at_0x:X__Invalid_address_
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 0x2e
call fcn.1801ea340
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x30], r14
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
movups xmm1, xmmword [rbp - 0x40]
movaps xmmword [rbp - 0x20], xmm1
movsd xmm0, qword [rbp - 0x30]
movsd qword [rbp - 0x10], xmm0
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x28], rcx
lea r9, [rbp - 0x50]
mov r8d, 4
lea rdx, [rbp - 0x20]
mov rcx, rax
call fcn.180177fb0
jmp 0x180172fba
test sil, sil
je 0x180172eef
cmp byte [0x180a57ea0], 0
jne 0x180172fba
mov ecx, 0x18
call fcn.180337400
mov rbx, rax
lea rsi, [rax + 0x18]
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbx], xmm0
mov qword [rbx + 0x10], rax
lea r9, [rbp + 0x28]
mov edx, 0x18
mov r8d, 0x40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movups xmm0, xmmword [rdi]
movups xmmword [rbx], xmm0
movsd xmm1, qword [rdi + 0x10]
movsd qword [rbx + 0x10], xmm1
lea r9, [rbp + 0x28]
mov r8d, dword [rbp + 0x28]
mov edx, 0x18
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rcx, qword [0x180a5a4a8]
test rcx, rcx
je 0x180172e4a
mov rdx, qword [0x180a5a4b8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180172e45
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180172fd2
call fcn.180337884
mov qword [0x180a5a4a8], rbx
mov qword [0x180a5a4b0], rsi
mov qword [0x180a5a4b8], rsi
mov rcx, qword [0x180a572a8]
add rcx, 2
lea rdx, [0x180a57c58]
call fcn.18017fdb0
mov rax, qword [0x180a572a8]
add rax, 2
mov qword [rbp + 0x28], rax
lea rax, str.Patched__at_0x:X
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 0x14
call fcn.1801ea340
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x30], r14
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
movups xmm1, xmmword [rbp - 0x40]
movaps xmmword [rbp - 0x20], xmm1
movsd xmm0, qword [rbp - 0x30]
movsd qword [rbp - 0x10], xmm0
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x28], rcx
lea r9, [rbp - 0x50]
mov r8d, 2
lea rdx, [rbp - 0x20]
mov rcx, rax
call fcn.180177fb0
mov byte [0x180a57ea0], 1
jmp 0x180172fba
cmp byte [0x180a57ea0], 0
je 0x180172fba
mov rbx, qword [0x180a5a4b0]
sub rbx, qword [0x180a5a4a8]
lea r9, [rbp + 0x28]
mov r8d, 0x40
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8, rbx
mov rdx, qword [0x180a5a4a8]
mov rcx, rdi
call fcn.1803752c0
lea r9, [rbp + 0x28]
mov r8d, dword [rbp + 0x28]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [0x180a572a8]
add rax, 2
mov qword [rbp + 0x28], rax
lea rax, str.Unpatched__at_0x:X
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 0x16
call fcn.1801ea340
mov qword [rbp - 0x38], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x30], r14
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
movups xmm1, xmmword [rbp - 0x40]
movaps xmmword [rbp - 0x20], xmm1
movsd xmm0, qword [rbp - 0x30]
movsd qword [rbp - 0x10], xmm0
lea rcx, [rbp + 0x28]
mov qword [rsp + 0x28], rcx
lea r9, [rbp - 0x50]
mov r8d, 2
lea rdx, [rbp - 0x20]
mov rcx, rax
call fcn.180177fb0
mov byte [0x180a57ea0], 0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
call fcn.1803459e4
int3
lea rcx, [0x180a5a4a0]
call fcn.180337960
cmp dword [0x180a5a4a0], 0xffffffff
jne 0x180172d25
mov rbx, qword [0x180a57c60]
sub rbx, qword [0x180a57c58]
je 0x18017309b
movabs rax, 0x7fffffffffffffff
cmp rbx, rax
jbe 0x18017301a
call fcn.180016cc0
int3
cmp rbx, 0x1000
jb 0x180173050
lea rcx, [rbx + 0x27]
cmp rcx, rbx
ja 0x180173032
call fcn.18000c6c0
int3
call fcn.180337400
test rax, rax
je 0x18017304a
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x18017305b
call fcn.1803459e4
int3
mov rcx, rbx
call fcn.180337400
mov rdi, rax
mov qword [0x180a5a4a8], rdi
mov qword [0x180a5a4b0], rdi
lea rcx, [rdi + rbx]
mov qword [0x180a5a4b8], rcx
mov rbx, qword [0x180a57c60]
mov rdx, qword [0x180a57c58]
sub rbx, rdx
mov r8, rbx
mov rcx, rdi
call fcn.1803752c0
lea rax, [rbx + rdi]
mov qword [0x180a5a4b0], rax
lea rcx, [0x180389e90]
call fcn.180337864
nop
lea rcx, [0x180a5a4a0]
call fcn.1803378f4
jmp 0x180172d25