Function at 0x140179420
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 0x140179430
test al, 1
je 0x140179652
test al, 2
jne 0x14017966a
test al, 8
jne 0x14017946b
lea rcx, [rsi + 0x20]
mov qword [rsp + 0x28], 4
lea rdx, [rsp + 0x28]
call fcn.1401553b0
jmp 0x140179483
test al, 0x10
je 0x140179483
mov rax, qword [rsi + 0x60]
test rax, rax
je 0x140179710
mov rcx, qword [rsi + 0x68]
call qword [rax + 0x10]
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x140179564
mov rdi, qword [rsi + 0x20]
mov qword [rsp + 0x60], rax
cmp rax, qword [rdi + 0x90]
jne 0x1401796ee
mov rax, qword [rsi + 0x10]
mov rax, qword [rax + 0x48]
mov rdx, qword [rdi + 0x68]
mov rcx, qword [rdi + 0x88]
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 0x140179606
mov rax, qword [0x14031a2c0]
shl rax, 1
test rax, rax
jne 0x140179624
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 0x14017956b
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 0x140179584
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 + 0x80]
mov ebx, 2
jmp 0x14017958f
mov ebx, 1
jmp 0x1401795ba
mov ebx, 1
cmp qword [rcx + 8], rsi
jne 0x14017958f
mov r8, qword [rsi + rdx + 8]
mov qword [rcx + 8], r8
test r8, r8
jne 0x140179524
mov ebx, 1
cmp qword [rcx + 0x10], rsi
je 0x1401795f9
test al, al
jne 0x1401795ad
movabs rax, 0x7fffffffffffffff
mov rdx, qword [0x14031a2c0]
test rdx, rax
jne 0x140179636
xor eax, eax
xchg byte [rcx], al
cmp al, 2
jne 0x1401795ba
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 0x140179682
jne 0x1401795ed
mov rcx, rsi
add rsp, 0x80
pop rbx
pop rdi
pop rsi
jmp fcn.140179370
nop
add rsp, 0x80
pop rbx
pop rdi
pop rsi
ret
mov r8, qword [rsi + rdx]
mov qword [rcx + 0x10], r8
jmp 0x14017953c
mov rbx, rcx
call fcn.1401b9360
mov rcx, rbx
mov rax, qword [0x14031a2c0]
shl rax, 1
test rax, rax
je 0x1401794e9
mov rbx, rcx
call fcn.1401b9410
mov rcx, rbx
xor al, 1
jmp 0x1401794eb
mov rdi, rcx
call fcn.1401b9410
mov rcx, rdi
test al, al
jne 0x1401795ad
mov byte [rcx + 1], 1
jmp 0x1401795ad
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
add rdi, 0x90
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