Function at 0x18001f540
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov qword [rbp], 0xfffffffffffffffe
mov r14, rcx
mov rcx, qword [0x180277088]
test rcx, rcx
je 0x18001f93c
mov ebx, r9d
mov esi, r8d
mov edi, edx
mov r15d, dword [rbp + 0x80]
mov r12d, dword [rbp + 0x78]
mov r13d, dword [rbp + 0x70]
call fcn.180157ac0
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r13d
mov rcx, r14
mov edx, edi
mov r8d, esi
mov r9d, ebx
call rax
mov r12, qword [0x180277178]
movzx eax, byte [r12]
mov ecx, 0x20000001
test al, al
je 0x18001f5e4
mov eax, 1
lock cmpxchg dword [0x18028e770], ecx
mov r15d, 1
lea rbx, [0x18028e770]
jne 0x18001f615
mov r14d, 1
jmp 0x18001f692
mov eax, 1
lock cmpxchg dword [0x18028e770], ecx
mov r14d, 1
lea rbx, [0x18028e770]
jne 0x18001f65d
mov r15d, 1
test r15b, 1
jne 0x18001f692
jmp 0x18001f88f
mov r14d, eax
cmp eax, 0x100
jae 0x18001f638
mov ecx, r14d
or ecx, 0x20000000
mov eax, r14d
lock cmpxchg dword [0x18028e770], ecx
mov r15d, r14d
je 0x18001f692
lea rdx, [0x18028e770]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov rbx, qword [rbp - 0x18]
mov r14d, dword [rbp - 0x10]
mov r15d, dword [rbp - 0xc]
jmp 0x18001f692
mov r15d, eax
cmp eax, 0x100
jae 0x18001f862
mov ecx, r15d
or ecx, 0x20000000
mov eax, r15d
lock cmpxchg dword [0x18028e770], ecx
mov r14d, r15d
jne 0x18001f862
test r15b, 1
je 0x18001f88f
lea rcx, [0x18028e700]
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x10], r14d
mov dword [rbp - 0xc], r15d
mov edx, edi
mov r8d, esi
call fcn.18002a730
mov eax, r14d
or eax, 0x20000000
lock cmpxchg dword [rbx], r15d
je 0x18001f6e6
xor r14d, r15d
or r14d, 0x20000000
mov eax, dword [rbx]
nop
mov ecx, eax
xor ecx, r14d
lock cmpxchg dword [rbx], ecx
jne 0x18001f6d0
cmp eax, 0x40000000
jae 0x18001f76e
movzx eax, byte [r12]
mov ecx, 0x20000001
test al, al
je 0x18001f78d
mov eax, 1
lock cmpxchg dword [0x18028e7f0], ecx
mov r14d, 1
lea rbx, [0x18028e7f0]
jne 0x18001f71f
mov r15d, 1
jmp 0x18001f7ef
mov r15d, eax
cmp eax, 0x100
jae 0x18001f746
mov ecx, r15d
or ecx, 0x20000000
mov eax, r15d
lock cmpxchg dword [0x18028e7f0], ecx
mov r14d, r15d
je 0x18001f7ef
lea rdx, [0x18028e7f0]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov rbx, qword [rbp - 0x18]
mov r15d, dword [rbp - 0x10]
mov r14d, dword [rbp - 0xc]
jmp 0x18001f7ef
xor eax, r14d
mov rcx, rbx
mov edx, eax
call fcn.18018b3e0
movzx eax, byte [r12]
mov ecx, 0x20000001
test al, al
jne 0x18001f6f8
mov eax, 1
lock cmpxchg dword [0x18028e7f0], ecx
mov r15d, 1
lea rbx, [0x18028e7f0]
jne 0x18001f7ba
mov r14d, 1
test r14b, 1
jne 0x18001f7ef
jmp 0x18001f8fe
mov r14d, eax
cmp eax, 0x100
jae 0x18001f8d1
mov ecx, r14d
or ecx, 0x20000000
mov eax, r14d
lock cmpxchg dword [0x18028e7f0], ecx
mov r15d, r14d
jne 0x18001f8d1
test r14b, 1
je 0x18001f8fe
lea rcx, [0x18028e780]
mov qword [rbp - 0x20], rcx
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x10], r15d
mov dword [rbp - 0xc], r14d
mov edx, edi
mov r8d, esi
call fcn.18002a730
mov eax, r15d
or eax, 0x20000000
lock cmpxchg dword [rbx], r14d
je 0x18001f842
xor r14d, r15d
or r14d, 0x20000000
mov eax, dword [rbx]
nop dword [rax + rax]
mov ecx, eax
xor ecx, r14d
lock cmpxchg dword [rbx], ecx
jne 0x18001f830
cmp eax, 0x40000000
jae 0x18001f853
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor eax, r14d
mov rcx, rbx
mov edx, eax
call fcn.18018b3e0
jmp 0x18001f842
lea rdx, [0x18028e770]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov rbx, qword [rbp - 0x18]
mov r14d, dword [rbp - 0x10]
mov r15d, dword [rbp - 0xc]
test r15b, 1
jne 0x18001f692
lea rax, [0x18028e700]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x10], r14d
mov dword [rbp - 0xc], r15d
lea rcx, [rbp - 0x38]
lea rdx, [rbp - 0x20]
call fcn.18018be00
mov rcx, qword [rbp - 0x38]
mov rbx, qword [rbp - 0x30]
test rcx, rcx
je 0x18001f974
mov r14d, dword [rbp - 0x28]
mov r15d, dword [rbp - 0x24]
jmp 0x18001f699
lea rdx, [0x18028e7f0]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov rbx, qword [rbp - 0x18]
mov r15d, dword [rbp - 0x10]
mov r14d, dword [rbp - 0xc]
test r14b, 1
jne 0x18001f7ef
lea rax, [0x18028e780]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x10], r15d
mov dword [rbp - 0xc], r14d
lea rcx, [rbp - 0x38]
lea rdx, [rbp - 0x20]
call fcn.18018be00
mov rcx, qword [rbp - 0x38]
mov rbx, qword [rbp - 0x30]
test rcx, rcx
je 0x18001f974
mov r15d, dword [rbp - 0x28]
mov r14d, dword [rbp - 0x24]
jmp 0x18001f7f6
movabs rax, 0x8000000000000009
mov qword [rbp - 0x20], rax
lea rax, [0x1801a72b8]
mov qword [rsp + 0x20], rax
lea rcx, str.calling_detour_trampolineC:Users_viz.cargo_registry_srcindex.crates.io_6f17d22bba15001f_retour_0.3.1_src_traits.rs
lea r9, fcn.180062470
lea r8, [rbp - 0x20]
mov edx, 0x19
call fcn.18019e500
ud2
mov dword [rbp - 0x20], ebx
lea rax, [0x1801a0c98]
mov qword [rsp + 0x20], rax
lea rcx, [0x1801a0cd0]
lea r9, [0x1801a0cb0]
lea r8, [rbp - 0x20]
mov edx, 0x2b
call fcn.18019e500
int3