Function at 0x180108380
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov r14, rdx
mov rsi, rcx
cmp byte [rdx + 8], 0
mov r13, qword [rdx]
je 0x18010861d
mov rcx, 0xffffffffffffffff
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.kernel32.dll_CreateIoCompletionPort]
test rax, rax
je 0x18010869c
mov rdi, rax
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x1801083f3
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108b0e
mov rcx, rax
mov qword [0x1801fa958], rax
mov r8d, 0x18
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180108b0e
mov rbx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], rdi
lock inc qword [rax]
jle 0x180108af9
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x180108456
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108ae3
mov rcx, rax
mov qword [0x1801fa958], rax
mov r8d, 0x80
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180108ae3
mov rdi, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], 0
mov byte [rax + 0x28], 0
mov qword [rax + 0x30], 8
xorps xmm0, xmm0
movups xmmword [rax + 0x38], xmm0
movups xmmword [rax + 0x41], xmm0
mov qword [rax + 0x58], 8
movups xmmword [rax + 0x60], xmm0
movups xmmword [rax + 0x69], xmm0
lock inc qword [rbx]
jle 0x180108af9
mov rbp, qword [rdi + 0x10]
lock inc qword [rdi]
jle 0x180108af9
test r13, r13
je 0x1801086b9
xor r15d, r15d
mov rax, r13
shr rax, 0x3a
sete al
jne 0x180108af9
mov r12, r13
shl r12, 5
mov r15b, al
shl r15, 3
test r12, r12
je 0x180108ad2
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x18010852d
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108ade
mov rcx, rax
mov qword [0x1801fa958], rax
xor edx, edx
mov r8, r12
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov rbx, rax
test rbx, rbx
je 0x180108ade
cmp r13, 2
jb 0x1801086ca
lea rdx, [r13 - 1]
lea r8, [r13 - 2]
mov eax, edx
and eax, 7
mov rcx, rbx
cmp r8, 7
jb 0x1801085d4
and rdx, 0xfffffffffffffff8
xorps xmm0, xmm0
mov rcx, rbx
nop
movups xmmword [rcx + 0xc], xmm0
movups xmmword [rcx], xmm0
movups xmmword [rcx + 0x20], xmm0
movups xmmword [rcx + 0x2c], xmm0
movups xmmword [rcx + 0x40], xmm0
movups xmmword [rcx + 0x4c], xmm0
movups xmmword [rcx + 0x60], xmm0
movups xmmword [rcx + 0x6c], xmm0
movups xmmword [rcx + 0x80], xmm0
movups xmmword [rcx + 0x8c], xmm0
movups xmmword [rcx + 0xa0], xmm0
movups xmmword [rcx + 0xac], xmm0
movups xmmword [rcx + 0xc0], xmm0
movups xmmword [rcx + 0xcc], xmm0
movups xmmword [rcx + 0xec], xmm0
movups xmmword [rcx + 0xe0], xmm0
add rcx, 0x100
add rdx, 0xfffffffffffffff8
jne 0x180108570
test rax, rax
je 0x1801085f0
xorps xmm0, xmm0
nop dword [rax]
movups xmmword [rcx + 0xc], xmm0
movups xmmword [rcx], xmm0
add rcx, 0x20
dec rax
jne 0x1801085e0
xorps xmm0, xmm0
movups xmmword [rcx + 0xc], xmm0
movups xmmword [rcx], xmm0
mov r12, r13
shl r12, 4
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x180108706
jmp 0x1801086ed
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x180108649
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108b1f
mov rcx, rax
mov qword [0x1801fa958], rax
mov r8d, 0x30
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180108b1f
mov rbx, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov qword [rax + 0x10], 0
mov byte [rax + 0x18], 0
xorps xmm0, xmm0
movups xmmword [rax + 0x20], xmm0
lock inc qword [rax]
jle 0x180108af9
xor edi, edi
mov r8b, 2
mov rbp, rbx
jmp 0x18010877f
call sub.kernel32.dll_GetLastError
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov qword [rsi], 2
jmp 0x180108abe
mov ebx, 8
mov eax, 8
mov qword [rsp + 0x58], rax
jmp 0x18010871f
xorps xmm0, xmm0
movups xmmword [rbx + 0xc], xmm0
movups xmmword [rbx], xmm0
mov r12d, 0x10
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x180108706
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108b30
mov rcx, rax
mov qword [0x1801fa958], rax
xor edx, edx
mov r8, r12
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x180108b30
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x18010874b
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108ae3
mov rcx, rax
mov qword [0x1801fa958], rax
mov r8d, 0x80
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180108ae3
mov rdx, rax
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
mov byte [rsp + 0x70], 0
movaps xmmword [rsp + 0x30], xmm0
mov byte [rsp + 0x40], 0
xor r8d, r8d
movzx eax, byte [rsp + 0x70]
mov byte [rsp + 0xa0], al
movaps xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0x90], xmm0
movaps xmm0, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0xb0], xmm0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc0], rax
cmp byte [r14 + 9], 0
mov qword [rsp + 0x88], rbp
je 0x180108846
mov dword [rsp + 0x2c], r8d
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.kernel32.dll_QueryPerformanceCounter]
test eax, eax
je 0x180108af4
mov r14, qword [rsp + 0x30]
mov rcx, qword [0x1801fa970]
test rcx, rcx
jne 0x180108830
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x180108af4
mov rcx, qword [rsp + 0x30]
mov qword [0x1801fa970], rcx
test rcx, rcx
je 0x180108af9
mov rax, r14
or rax, rcx
shr rax, 0x20
je 0x18010885a
mov rax, r14
xor edx, edx
div rcx
jmp 0x180108861
mov r15, r13
mov r12d, 1
mov r14d, 0x3b9aca00
jmp 0x1801089c4
mov eax, r14d
xor edx, edx
div ecx
imul r8, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
mov rdx, rax
or rdx, rcx
mov r15, r13
shr rdx, 0x20
je 0x180108888
xor edx, edx
div rcx
mov r14, rax
jmp 0x18010888f
xor edx, edx
div ecx
mov r14d, eax
add r14, r8
mov rax, r14
shr rax, 9
movabs rcx, 0x44b82fa09b5a53
mul rcx
mov r13, rdx
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x1801088d5
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x180108afd
mov rcx, rax
mov qword [0x1801fa958], rax
mov r8d, 0x1860
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapAlloc]
test rax, rax
je 0x180108afd
mov rbp, rax
shr r13, 0xb
imul eax, r13d, 0x3b9aca00
sub r14d, eax
xor r12d, r12d
mov r8d, 0x810
mov rcx, rbp
xor edx, edx
call fcn.180158b20
mov qword [rbp + 0x810], 1
lea rcx, [rbp + 0x818]
mov r8d, 0x408
xor edx, edx
call fcn.180158b20
mov qword [rbp + 0xc20], 2
lea rcx, [rbp + 0xc28]
mov r8d, 0x408
xor edx, edx
call fcn.180158b20
mov qword [rbp + 0x1030], 3
lea rcx, [rbp + 0x1038]
mov r8d, 0x408
xor edx, edx
call fcn.180158b20
mov qword [rbp + 0x1440], 4
mov rcx, rbp
add rcx, 0x1448
mov r8d, 0x408
xor edx, edx
call fcn.180158b20
mov qword [rbp + 0x1850], 5
mov qword [rbp + 0x1858], 0
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x40], xmm0
mov byte [rsp + 0x50], 0
mov rdx, qword [rsp + 0x80]
mov r8d, dword [rsp + 0x2c]
mov qword [rsi + 0x10], r15
mov rax, qword [rsp + 0x58]
mov qword [rsi + 0x18], rax
mov qword [rsi + 0x20], r15
mov qword [rsi + 0x28], 0
mov eax, dword [rsp + 0x60]
mov ecx, dword [rsp + 0x63]
mov dword [rsi + 0x3c], ecx
mov dword [rsi + 0x39], eax
movzx eax, byte [rsp + 0x50]
mov byte [rsi + 0xe8], al
movaps xmm0, xmmword [rsp + 0x30]
movaps xmm1, xmmword [rsp + 0x40]
movups xmmword [rsi + 0xd8], xmm1
movups xmmword [rsi + 0xc8], xmm0
movzx eax, byte [rsp + 0xa0]
mov byte [rsi + 0x68], al
movaps xmm0, xmmword [rsp + 0x90]
movups xmmword [rsi + 0x58], xmm0
mov rax, qword [rsp + 0xc0]
mov qword [rsi + 0x98], rax
movaps xmm0, xmmword [rsp + 0xb0]
movups xmmword [rsi + 0x88], xmm0
mov qword [rsi], r12
mov qword [rsi + 8], rbx
mov qword [rsi + 0x30], rdi
mov byte [rsi + 0x38], r8b
mov qword [rsi + 0x40], rdi
mov rax, qword [rsp + 0x88]
mov qword [rsi + 0x48], rax
mov qword [rsi + 0x50], 0
mov qword [rsi + 0x70], rdx
mov qword [rsi + 0x78], 0x10
mov qword [rsi + 0x80], 0
mov qword [rsi + 0xa0], 0
mov byte [rsi + 0xa8], 0
mov qword [rsi + 0xb0], rbp
mov qword [rsi + 0xb8], 6
mov qword [rsi + 0xc0], 6
mov qword [rsi + 0xf0], r13
mov dword [rsi + 0xf8], r14d
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, r15
test rbx, rbx
jne 0x180108544
mov rcx, r15
jmp 0x180108b35
mov ecx, 8
mov edx, 0x80
call fcn.180166060
ud2
call sub.kernel32.dll_GetLastError
ud2
mov ecx, 8
mov edx, 0x1860
call fcn.180166060
ud2
mov ecx, 8
mov edx, 0x18
call fcn.180166060
ud2
mov ecx, 8
mov edx, 0x30
call fcn.180166060
ud2
mov ecx, 8
mov rdx, r12
call fcn.180166060
ud2