Function at 0x140179e20
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x80
mov rsi, rcx
mov rax, qword [rcx]
mov rcx, rax
xor rcx, 3
lock cmpxchg qword [rsi], rcx
jne 0x140179e30
test al, 1
je 0x14017a04c
test al, 2
jne 0x14017a064
test al, 8
jne 0x140179e6b
lea rcx, [rsi + 0x20]
mov qword [rsp + 0x28], 4
lea rdx, [rsp + 0x28]
call fcn.1401553b0
jmp 0x140179e83
test al, 0x10
je 0x140179e83
mov rax, qword [rsi + 0x60]
test rax, rax
je 0x14017a107
mov rcx, qword [rsi + 0x68]
call qword [rax + 0x10]
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x140179f5e
mov rdi, qword [rsi + 0x20]
mov qword [rsp + 0x60], rax
cmp rax, qword [rdi + 0x80]
jne 0x14017a0e8
mov rax, qword [rsi + 0x10]
mov rax, qword [rax + 0x48]
mov rdx, qword [rdi + 0x58]
mov rcx, qword [rdi + 0x78]
and rcx, qword [rsi + rax]
lea r8, [rcx + rcx*2]
lea rcx, [rdx + r8*8]
mov r9b, 1
xor eax, eax
lock cmpxchg byte [rdx + r8*8], r9b
jne 0x14017a000
mov rax, qword [0x14031a2c0]
shl rax, 1
test rax, rax
jne 0x14017a01e
xor eax, eax
movzx edx, byte [rcx + 1]
mov rdx, qword [rsi + 0x10]
mov rdx, qword [rdx + 0x38]
mov r8, qword [rsi + rdx]
test r8, r8
je 0x140179f65
mov r9, qword [r8 + 0x10]
mov r9, qword [r9 + 0x38]
mov rdx, qword [rsi + rdx + 8]
mov qword [r8 + r9 + 8], rdx
mov rdx, qword [rsi + 0x10]
mov rdx, qword [rdx + 0x38]
mov r8, qword [rsi + rdx + 8]
test r8, r8
je 0x140179f7e
mov r9, qword [r8 + 0x10]
mov r9, qword [r9 + 0x38]
mov rdx, qword [rsi + rdx]
mov qword [r8 + r9], rdx
mov rdx, qword [rsi + 0x10]
mov rdx, qword [rdx + 0x38]
mov qword [rsi + rdx + 8], 0
mov rdx, qword [rsi + 0x10]
mov rdx, qword [rdx + 0x38]
mov qword [rsi + rdx], 0
lock dec qword [rdi + 0x70]
mov ebx, 2
jmp 0x140179f89
mov ebx, 1
jmp 0x140179fb4
mov ebx, 1
cmp qword [rcx + 8], rsi
jne 0x140179f89
mov r8, qword [rsi + rdx + 8]
mov qword [rcx + 8], r8
test r8, r8
jne 0x140179f21
mov ebx, 1
cmp qword [rcx + 0x10], rsi
je 0x140179ff3
test al, al
jne 0x140179fa7
movabs rax, 0x7fffffffffffffff
mov rdx, qword [0x14031a2c0]
test rdx, rax
jne 0x14017a030
xor eax, eax
xchg byte [rcx], al
cmp al, 2
jne 0x140179fb4
call sub.api_ms_win_core_synch_l1_2_0.dll_WakeByAddressSingle
mov qword [rsp + 0x20], rbx
shl ebx, 6
neg rbx
lock xadd qword [rsi], rbx
shr rbx, 6
cmp rbx, qword [rsp + 0x20]
jb 0x14017a07c
jne 0x140179fe7
mov rcx, rsi
add rsp, 0x80
pop rbx
pop rdi
pop rsi
jmp fcn.140179d70
nop
add rsp, 0x80
pop rbx
pop rdi
pop rsi
ret
mov r8, qword [rsi + rdx]
mov qword [rcx + 0x10], r8
jmp 0x140179f39
mov rbx, rcx
call fcn.1401b9360
mov rcx, rbx
mov rax, qword [0x14031a2c0]
shl rax, 1
test rax, rax
je 0x140179ee6
mov rbx, rcx
call fcn.1401b9410
mov rcx, rbx
xor al, 1
jmp 0x140179ee8
mov rdi, rcx
call fcn.1401b9410
mov rcx, rdi
test al, al
jne 0x140179fa7
mov byte [rcx + 1], 1
jmp 0x140179fa7
lea rcx, [0x1402dd18f]
lea r8, str._redacted_
mov edx, 0x23
call fcn.1400576c0
lea rcx, [0x1402dd1b2]
lea r8, str._redacted_
mov edx, 0x25
call fcn.1400576c0
mov qword [rsp + 0x58], rbx
lea rax, [rsp + 0x58]
mov qword [rsp + 0x60], rax
lea rax, [fcn.1400568d0]
mov qword [rsp + 0x68], rax
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rax
lea rax, [0x1402dd1e8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 2
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], 2
lea rdx, str._redacted_
lea rcx, [rsp + 0x28]
call fcn.1400567b0
mov qword [rsp + 0x28], 0
sub rdi, 0xffffffffffffff80
lea rcx, [rsp + 0x60]
lea r8, [rsp + 0x28]
mov rdx, rdi
call fcn.1401eb380
lea rax, str.waker_missing
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x38], 8
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
lea rdx, str._redacted_
lea rcx, [rsp + 0x28]
call fcn.1400567b0
int3