Function at 0x18001e830
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 [0x180277058]
test rcx, rcx
je 0x18001eaee
mov edi, r9d
mov esi, r8d
mov ebx, edx
movzx r15d, byte [rbp + 0x78]
mov r13d, dword [rbp + 0x70]
call fcn.180157ac0
mov byte [rsp + 0x28], r15b
mov dword [rsp + 0x20], r13d
mov rcx, r14
mov edx, ebx
mov r8d, esi
mov r9d, edi
call rax
test r15b, 1
je 0x18001ea63
sub r13d, esi
inc r13d
xor eax, eax
test r13d, r13d
cmovle r13d, eax
sub edi, ebx
inc edi
test edi, edi
cmovle edi, eax
mov rax, qword [0x180277178]
movzx eax, byte [rax]
mov ecx, 0x20000001
test al, al
je 0x18001e8e9
mov eax, 1
lock cmpxchg dword [0x18028e770], ecx
mov r12d, 1
lea r14, [0x18028e770]
jne 0x18001e91a
mov r15d, 1
jmp 0x18001e997
mov eax, 1
lock cmpxchg dword [0x18028e770], ecx
mov r15d, 1
lea r14, [0x18028e770]
jne 0x18001e962
mov r12d, 1
test r12b, 1
jne 0x18001e997
jmp 0x18001eab0
mov r15d, eax
cmp eax, 0x100
jae 0x18001e93d
mov ecx, r15d
or ecx, 0x20000000
mov eax, r15d
lock cmpxchg dword [0x18028e770], ecx
mov r12d, r15d
je 0x18001e997
lea rdx, [0x18028e770]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov r14, qword [rbp - 0x18]
mov r15d, dword [rbp - 0x10]
mov r12d, dword [rbp - 0xc]
jmp 0x18001e997
mov r12d, eax
cmp eax, 0x100
jae 0x18001ea83
mov ecx, r12d
or ecx, 0x20000000
mov eax, r12d
lock cmpxchg dword [0x18028e770], ecx
mov r15d, r12d
jne 0x18001ea83
test r12b, 1
je 0x18001eab0
lea rax, [0x18028e700]
shl esi, 4
shl ebx, 3
shl r13d, 4
shl edi, 3
cmp esi, 0xc0000001
mov edx, 0xc0000000
cmovl esi, edx
cmp esi, 0x3fffffff
mov r8d, 0x3fffffff
cmovge esi, r8d
lea ecx, [rbx + rbx*2]
cmp ecx, 0xc0000001
cmovge edx, ecx
cmp edx, 0x3fffffff
cmovge edx, r8d
cmp r13d, 0x3fffffff
mov r9d, 0x3fffffff
cmovb r9d, r13d
test r13d, r13d
mov r10d, 1
cmove r9d, r10d
lea r11d, [rdi + rdi*2]
cmp r11d, 0x3fffffff
cmovb r8d, r11d
mov rcx, qword [rax + 0x68]
test r11d, r11d
cmove r8d, r10d
mov dword [rbp - 0x20], esi
mov dword [rbp - 0x1c], edx
mov dword [rbp - 0x18], r9d
mov dword [rbp - 0x14], r8d
lea rdx, [rbp - 0x20]
xor r8d, r8d
call sub.SDL2.dll_SDL_FillRect
mov eax, r15d
or eax, 0x20000000
lock cmpxchg dword [r14], r12d
je 0x18001ea63
xor r15d, r12d
or r15d, 0x20000000
mov eax, dword [r14]
nop dword [rax]
mov ecx, eax
xor ecx, r15d
lock cmpxchg dword [r14], ecx
jne 0x18001ea50
cmp eax, 0x40000000
jae 0x18001ea74
add rsp, 0x78
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor eax, r15d
mov rcx, r14
mov edx, eax
call fcn.18018b3e0
jmp 0x18001ea63
lea rdx, [0x18028e770]
lea rcx, [rbp - 0x20]
lea r8, [rbp - 1]
mov r9, r8
call fcn.180184750
mov r14, qword [rbp - 0x18]
mov r15d, dword [rbp - 0x10]
mov r12d, dword [rbp - 0xc]
test r12b, 1
jne 0x18001e997
lea rax, [0x18028e700]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], r14
mov dword [rbp - 0x10], r15d
mov dword [rbp - 0xc], r12d
lea rcx, [rbp - 0x38]
lea rdx, [rbp - 0x20]
call fcn.18018be00
mov rax, qword [rbp - 0x38]
mov r14, qword [rbp - 0x30]
test rax, rax
je 0x18001eb26
mov r15d, dword [rbp - 0x28]
mov r12d, dword [rbp - 0x24]
jmp 0x18001e99e
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], r14d
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