Function at 0x46b1d0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov rbx, rcx
mov edi, edx
lea rsi, [rcx + 8]
test dl, dl
jne 0x46b330
mov rbp, qword [0x00499e30]
mov r8d, dword [rbp]
test r8d, r8d
jne 0x46b590
cmp byte [0x00489e00], 0
jne 0x46b4a0
lea rbp, [rsp + 0x30]
mov rcx, rbp
mov rbp, qword [dbg.init_rand_s]
call rbp
lea rcx, [rsp + 0x34]
call rbp
lea rcx, [0x00489e20]
mov rax, qword [rsp + 0x30]
movabs r10, 0x9e3779b97f4a7c15
lea r11, [rcx + 0x80]
movabs r9, 0xbf58476d1ce4e5b9
movabs r8, 0x94d049bb133111eb
nop
add rax, r10
add rcx, 8
mov rdx, rax
shr rdx, 0x1e
xor rax, rdx
imul rax, r9
mov rdx, rax
shr rdx, 0x1b
xor rax, rdx
imul rax, r8
mov rdx, rax
shr rax, 0x1f
xor rax, rdx
mov qword [rcx - 8], rax
cmp r11, rcx
jne 0x46b260
movdqu xmm0, xmmword [0x00489e20]
mov byte [0x00489e00], 1
mov dword [0x00489ef0], 1
movups xmmword [rbx + 8], xmm0
movdqu xmm1, xmmword [0x00489e30]
movups xmmword [rsi + 0x10], xmm1
movdqu xmm2, xmmword [0x00489e40]
movups xmmword [rsi + 0x20], xmm2
movdqu xmm3, xmmword [0x00489e50]
movups xmmword [rsi + 0x30], xmm3
movdqu xmm4, xmmword [0x00489e60]
movups xmmword [rsi + 0x40], xmm4
movdqu xmm5, xmmword [0x00489e70]
movups xmmword [rsi + 0x50], xmm5
movdqu xmm0, xmmword [0x00489e80]
movups xmmword [rsi + 0x60], xmm0
movdqu xmm1, xmmword [0x00489e90]
movups xmmword [rsi + 0x70], xmm1
test dil, dil
je 0x46b5c5
mov byte [rbx], 1
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [0x00489e00], 0
je 0x46b215
movdqu xmm2, xmmword [0x00489e20]
mov eax, dword [0x00489ef0]
movups xmmword [rbx + 8], xmm2
movdqu xmm3, xmmword [0x00489e30]
mov dword [rsp + 0x2c], eax
add eax, 1
movups xmmword [rsi + 0x10], xmm3
movdqu xmm4, xmmword [0x00489e40]
mov dword [0x00489ef0], eax
movups xmmword [rsi + 0x20], xmm4
movdqu xmm5, xmmword [0x00489e50]
movups xmmword [rsi + 0x30], xmm5
movdqu xmm0, xmmword [0x00489e60]
movups xmmword [rsi + 0x40], xmm0
movdqu xmm1, xmmword [0x00489e70]
movups xmmword [rsi + 0x50], xmm1
movdqu xmm2, xmmword [0x00489e80]
movups xmmword [rsi + 0x60], xmm2
movdqu xmm3, xmmword [0x00489e90]
movups xmmword [rsi + 0x70], xmm3
mov ecx, dword [rsp + 0x2c]
test ecx, ecx
je 0x46b310
movsxd r10, dword [rbx + 4]
xor r12d, r12d
lea rbp, [rsp + 0x30]
xor eax, eax
lea r13, [rsp + 0xb0]
mov r11, r10
nop dword [rax]
mov ecx, 0x10
mov rdi, rbp
mov rdx, qword [rbx + r10*8 + 8]
movabs r15, 0x84242f96eca9c41d
rep stosq qword [rdi], rax
lea rdi, [0x0049a248]
jmp 0x46b45e
lea r10d, [r11 + 1]
add r9d, 1
mov r11d, r10d
and r10d, 0xf
lea r14, [rbx + r10*8]
and r11d, 0xf
mov r8, qword [r14 + 8]
mov rsi, r8
shl rsi, 0x1f
xor r8, rsi
mov rsi, rdx
shr rsi, 0x1e
xor rsi, r8
shr r8, 0xb
xor rdx, rsi
xor rdx, r8
mov qword [r14 + 8], rdx
mov dword [rbx + 4], r11d
cmp r9d, 0x40
jne 0x46b461
lea rsi, [0x0049a2c0]
cmp rsi, rdi
je 0x46b550
mov r15, qword [rdi]
add rdi, 8
xor r9d, r9d
bt r15, r9
jae 0x46b400
mov r10d, r11d
mov r8, rbp
mov esi, r10d
add r8, 8
add r10d, 1
and esi, 0xf
xor rcx, qword [rbx + rsi*8 + 8]
mov qword [r8 - 8], rcx
cmp r13, r8
jne 0x46b540
mov rcx, qword [rsp + 0x30]
jmp 0x46b400
movdqu xmm2, xmmword [0x00489e20]
mov eax, dword [0x00489ef0]
movups xmmword [rbx + 8], xmm2
movdqu xmm3, xmmword [0x00489e30]
mov edx, dword [rbp]
mov dword [rsp + 0x2c], eax
add eax, 1
movups xmmword [rsi + 0x10], xmm3
movdqu xmm4, xmmword [0x00489e40]
mov dword [0x00489ef0], eax
movups xmmword [rsi + 0x20], xmm4
movdqu xmm5, xmmword [0x00489e50]
movups xmmword [rsi + 0x30], xmm5
movdqu xmm2, xmmword [0x00489e60]
movups xmmword [rsi + 0x40], xmm2
movdqu xmm3, xmmword [0x00489e70]
movups xmmword [rsi + 0x50], xmm3
movdqu xmm4, xmmword [0x00489e80]
movups xmmword [rsi + 0x60], xmm4
movdqu xmm5, xmmword [0x00489e90]
movups xmmword [rsi + 0x70], xmm5
test edx, edx
je 0x46b3b0
mov eax, 0xffffffff
lock xadd dword [0x00489fd0], eax
sub eax, 1
js 0x46b3b0
jmp 0x46b5f4
mov rcx, qword [r8]
jmp 0x46b46d
mov r8d, r11d
mov rdx, rbp
jmp 0x46b563
mov rcx, qword [rdx]
mov r9d, r8d
add rdx, 8
add r8d, 1
and r9d, 0xf
mov qword [rbx + r9*8 + 8], rcx
cmp r13, rdx
jne 0x46b560
add r12d, 1
cmp r12d, dword [rsp + 0x2c]
jne 0x46b3d8
jmp 0x46b310
lock add dword [0x00489fd0], 1
je 0x46b208
mov rcx, qword [0x00489fd8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x46b208
lock sub dword [0x00489fd0], 1
jmp 0x46b208
mov rax, qword [0x00499e30]
mov eax, dword [rax]
test eax, eax
je 0x46b310
mov eax, 0xffffffff
lock xadd dword [0x00489fd0], eax
sub eax, 1
js 0x46b310
mov dword [rsp + 0x2c], 0
mov rcx, qword [0x00489fd8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x46b3b0