Function at 0x1400399e4
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp - 1], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov r14, rdx
mov rbx, rcx
lea r12, [rcx + 0x40]
mov rcx, r12
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov qword [rbp + 7], r12
xor r13b, r13b
mov sil, 1
xor r15d, r15d
lock inc dword [rbx + 0x30]
lea rdi, [rbx + 0x38]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov rcx, rbx
call fcn.140039ec8
mov r9, qword [rbx + 0x20]
mov eax, dword [r9]
lea ecx, [rax*2 - 2]
xor ecx, eax
and ecx, 2
xor ecx, eax
mov dword [r9], ecx
mov r8, qword [rbx + 0x48]
mov rcx, qword [r8]
cmp rcx, r8
je 0x140039af3
mov r10, qword [rcx + 0x40]
mov edx, dword [r10]
mov eax, edx
shr eax, 1
xor eax, dword [r9]
test al, 1
je 0x140039a7e
int 0x2c
mov eax, edx
lock cmpxchg dword [r10], edx
cmp edx, eax
jne 0x140039a6e
mov eax, dword [r9]
shr eax, 1
xor eax, edx
test al, 1
jne 0x140039aa7
test edx, 0xfffffffc
movzx esi, sil
mov r10, r15
cmova esi, r15d
jmp 0x140039aaa
xor r10d, r10d
cmp byte [rcx + 0x19], r10b
jne 0x140039ae4
mov rax, qword [rcx + 0x10]
cmp byte [rax + 0x19], r10b
jne 0x140039ac8
mov rcx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r10b
je 0x140039aba
jmp 0x140039ae4
mov rax, qword [rcx + 8]
jmp 0x140039adb
cmp rcx, qword [rax + 0x10]
jne 0x140039ae1
mov rcx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r10b
je 0x140039ace
mov rcx, rax
cmp rcx, r8
jne 0x140039a6a
test sil, sil
jne 0x140039af6
inc dword [rbx + 0x5c]
jmp 0x140039b21
xor r10d, r10d
mov eax, dword [r9]
shr rax, 1
and eax, 1
imul rdx, rax, 0x1400038
mov rcx, qword [rbx + 0x20]
lea r15, [rcx + 0x10]
add r15, rdx
mov eax, dword [rbx + 0x30]
mov dword [rdx + rcx + 8], eax
lock or dword [rsp], r10d
or dword [r9], 4
test rdi, rdi
je 0x140039b2f
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
test sil, sil
je 0x140039d34
call fcn.14001ade8
mov rcx, qword [rax + 8]
xor esi, esi
test rcx, rcx
je 0x140039b56
cmp dword [rcx], esi
jbe 0x140039b56
call fcn.14001ade8
call fcn.14003ad78
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xf], xmm0
mov qword [rbp + 0x1f], rsi
test byte [0x1400e2748], 0x30
jne 0x140039b70
call fcn.1400396b0
mov dword [rbp - 0x49], esi
mov byte [rbp - 0x45], sil
mov eax, esi
mov dword [rbp - 0x39], eax
movzx eax, word [rbp - 0x45]
mov word [rbp - 0x35], ax
mov r13d, 3
mov dword [rsp + 0x20], r13d
xor r9d, r9d
lea r8, [rbp - 0x39]
mov edx, 0x74e2af
lea rcx, [0x1400e2748]
call fcn.140034094
mov rax, qword [r14]
mov rcx, qword [rax + 0x80]
mov r9, qword [rax + 0x60]
mov rax, qword [rcx]
mov r8d, 0x1400000
mov rdx, r15
mov rax, qword [rax + 0x18]
call qword [0x1400aa8c0]
mov rcx, qword [r14 + 0x10]
mov dword [rcx], eax
mov rax, qword [r14 + 0x18]
cmp byte [rax], sil
je 0x140039c01
mov rcx, qword [r14]
mov rcx, qword [rcx + 0x68]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ResetEvent]
mov rcx, qword [rbp + 0x5f]
test eax, eax
jne 0x140039c01
lea r8, [0x1400ac1d0]
mov edx, 0x873
call fcn.14000377c
int3
test byte [0x1400e2748], 0x30
jne 0x140039c0f
call fcn.1400396b0
mov dword [rbp - 0x41], esi
mov byte [rbp - 0x3d], sil
mov eax, esi
mov dword [rbp - 0x31], eax
movzx eax, word [rbp - 0x3d]
mov word [rbp - 0x2d], ax
mov dword [rsp + 0x20], r13d
xor r9d, r9d
lea r8, [rbp - 0x31]
mov edx, 0x74e2af
lea rcx, [0x1400e2748]
call fcn.140034094
mov rcx, qword [r14 + 0x20]
mov eax, dword [r15 + 0x14]
mov dword [rcx], eax
call fcn.14001ade8
mov rcx, qword [rax + 8]
xor r14d, r14d
test rcx, rcx
je 0x140039c6b
cmp dword [rcx], r14d
jbe 0x140039c6b
call fcn.14001ade8
call fcn.14003acf4
nop
lea rcx, [rbp + 0xf]
call fcn.140007554
mov r13b, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov r11, qword [rbx + 0x20]
mov ecx, dword [r11]
and ecx, 0xfffffffb
mov dword [r11], ecx
shr rcx, 1
and ecx, 1
imul rdx, rcx, 0x1400038
mov rcx, qword [rbx + 0x20]
mov eax, dword [rbx + 0x30]
mov dword [rdx + rcx + 0xc], eax
mov eax, dword [r11]
shr eax, 1
xor eax, dword [r11]
and eax, 1
xor dword [r11], eax
mov dword [rbx + 0x5c], r14d
lea rsi, [rbx + 0x48]
mov r9, qword [rsi]
mov r8, qword [r9]
jmp 0x140039d1f
mov r10, qword [r8 + 0x40]
prefetchw byte [r10]
mov edx, dword [r10]
mov ecx, dword [r11]
add ecx, ecx
xor ecx, edx
and ecx, 2
xor ecx, edx
mov eax, edx
lock cmpxchg dword [r10], ecx
cmp edx, eax
jne 0x140039ccb
cmp byte [r8 + 0x19], r14b
jne 0x140039d1f
mov rax, qword [r8 + 0x10]
cmp byte [rax + 0x19], r14b
jne 0x140039d03
mov r8, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r14b
je 0x140039cf5
jmp 0x140039d1f
mov rax, qword [r8 + 8]
jmp 0x140039d16
cmp r8, qword [rax + 0x10]
jne 0x140039d1c
mov r8, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r14b
je 0x140039d09
mov r8, rax
cmp r8, r9
jne 0x140039cc3
test rdi, rdi
je 0x140039d3b
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
jmp 0x140039d3b
lea rsi, [rbx + 0x48]
xor r14d, r14d
mov eax, dword [rbx + 0x58]
test eax, eax
je 0x140039e9a
cmp dword [rbx + 0x5c], eax
jl 0x140039e9a
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov rcx, rsi
call fcn.140022a48
mov edx, 0x2800078
lea rcx, [rbp - 0x29]
call fcn.1400671dc
mov rsi, qword [rbp - 0x11]
mov rcx, rsi
mov rax, qword [rbx + 0x20]
mov edx, 0x50000
mov r8d, 0x80
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x60], xmm0
add rcx, r8
movups xmm1, xmmword [rax + 0x70]
movups xmmword [rcx - 0x10], xmm1
add rax, r8
sub rdx, 1
jne 0x140039d84
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rcx + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rcx + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rcx + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rcx + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rcx + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rcx + 0x60], xmm0
mov rax, qword [rax + 0x70]
mov qword [rcx + 0x70], rax
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x140039e3d
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x140039e39
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
int3
mov qword [rbx + 0x18], r14
mov rax, qword [rbp - 0x19]
mov qword [rbx + 0x18], rax
mov qword [rbp - 0x19], r14
mov qword [rbx + 0x20], rsi
mov eax, dword [rbp - 9]
mov dword [rbx + 0x28], eax
mov qword [rbp - 0x11], r14
mov dword [rbp - 9], 0x8000ffff
mov dword [rbx + 0x5c], r14d
lea rcx, [rbp - 0x29]
call fcn.1400670d8
test rdi, rdi
je 0x140039e79
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rbx + 0x98]
test rcx, rcx
jne 0x140039e8c
call qword [sym.imp.msvcp_win.dll_void___cdecl_std::_Xbad_function_call_void_]
int3
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [0x1400aa8c0]
nop
test r12, r12
je 0x140039ea8
mov rcx, r12
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
mov al, r13b
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret