Function at 0x18008da30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x1801850b8]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rax, qword [rcx]
xor r13d, r13d
mov qword [rsp + 0x78], r9
mov rbx, rcx
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x68], rdx
mov dword [rax + 8], r13d
mov qword [rsp + 0x58], rcx
call fcn.18008d080
mov rdx, qword [rbx]
mov ecx, dword [rdx + 8]
test eax, eax
jne 0x18008da9b
mov edx, ecx
xor r8d, r8d
mov rcx, rbx
call fcn.18008c8c0
xor eax, eax
jmp 0x18008dfbe
mov edi, 1
lea edx, [rdi + 2]
cmp ecx, edx
jne 0x18008dac8
cmp dword [rbx + 0x4850], edx
je 0x18008dac1
cmp dword [rbx + 0x484c], r13d
jne 0x18008dac8
cmp dword [rbx + 0x4848], r13d
jne 0x18008dac8
mov qword [rsp + 0x30], rdi
jmp 0x18008dad1
mov qword [rsp + 0x30], r13
test ecx, ecx
jle 0x18008da87
mov qword [rsp + 0x48], rcx
xorps xmm0, xmm0
xorps xmm1, xmm1
mov r12, rcx
movdqu xmmword [rbp - 0x80], xmm0
movdqu xmmword [rbp - 0x70], xmm1
test ecx, ecx
je 0x18008dbca
mov r15, r13
lea rsi, [rbp - 0x48]
lea r14, [rbx + 0x46a4]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, edx
call fcn.1800c83e0
mov qword [r14 + 0x44], rax
test rax, rax
je 0x18008dbeb
mov eax, dword [rbx + 0x4688]
cdq
mov dword [rsi + 0x10], r13d
idiv dword [r14]
mov r9d, eax
mov dword [rsi], eax
mov eax, dword [rbx + 0x468c]
cdq
idiv dword [r14 + 4]
xor edx, edx
mov ecx, eax
mov dword [rsi + 4], eax
sar ecx, 1
mov r8d, eax
mov dword [rsi + 0xc], ecx
mov rcx, qword [rbx]
mov eax, dword [rcx]
mov rcx, qword [r14 + 0x2c]
dec eax
add eax, r9d
mov qword [rsi - 8], rcx
div r9d
mov qword [rsi - 0x10], rcx
mov dword [rsi + 8], eax
cmp r9d, edi
jne 0x18008db83
cmp r8d, edi
jne 0x18008db74
lea rax, [0x18008d2cc]
jmp 0x18008dbad
cmp r8d, 2
jne 0x18008dba6
lea rax, [0x18008d2d0]
jmp 0x18008dbad
cmp r9d, 2
jne 0x18008dba6
cmp r8d, edi
jne 0x18008db97
lea rax, [0x18008d318]
jmp 0x18008dbad
cmp r8d, 2
jne 0x18008dba6
mov rax, qword [rbx + 0x4880]
jmp 0x18008dbad
lea rax, [0x18008d668]
mov qword [rsi - 0x18], rax
add r15, rdi
add rsi, 0x30
add r14, 0x60
mov edx, 3
cmp r15, r12
jl 0x18008daff
mov rax, qword [rbx]
mov r9d, edi
mov ecx, 4
mov esi, dword [rax]
mov edx, esi
mov r8d, dword [rax + 4]
call fcn.180089188
test eax, eax
jne 0x18008dc24
mov rcx, qword [rbx]
jmp 0x18008dc42
mov rax, qword [rbx]
mov edx, dword [rax + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18008c8c0
mov edx, dword [0x18018bdb8]
mov rax, qword gs:[0x58]
mov ecx, 0x1b0
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
mov qword [rcx + rax], rdx
jmp 0x18008da94
imul esi, r8d
lea eax, [rsi*4 + 1]
movsxd rcx, eax
call fcn.1800c83e0
mov rcx, qword [rbx]
mov r13, rax
test rax, rax
jne 0x18008dc47
mov edx, dword [rcx + 8]
jmp 0x18008dbf1
xor eax, eax
mov dword [rsp + 0x40], eax
cmp dword [rcx + 4], eax
jbe 0x18008df77
mov r15, qword [rbp - 0x70]
mov rsi, qword [rbp - 0x80]
mov qword [rsp + 0x38], r13
imul eax, dword [rcx]
xor r12d, r12d
shl eax, 2
mov r14d, eax
add r14, r13
mov qword [rsp + 0x60], r14
cmp qword [rsp + 0x48], r12
jbe 0x18008dd5b
mov r14, qword [rsp + 0x48]
lea r15, [rbx + 0x46c0]
mov rbx, qword [rsp + 0x30]
lea rsi, [rbp - 0x3c]
mov eax, dword [rsi - 8]
lea rcx, [rsi - 0x14]
mov r11d, dword [rsi - 0xc]
lea rdx, [rsi - 0x1c]
sar eax, 1
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x30], rdx
cmp dword [rsi], eax
jl 0x18008dcc0
mov r8, qword [rdx]
mov qword [rsp + 0x38], rcx
jmp 0x18008dcd8
mov r8, qword [rcx]
mov rax, rcx
mov qword [rsp + 0x38], rcx
mov rcx, rdx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x30], rdx
mov rdx, qword [rcx]
mov rcx, qword [r15 + 0x28]
mov r9d, dword [rsi - 4]
mov dword [rsp + 0x20], r11d
call qword [rsi - 0x24]
mov qword [rbp + r12*8 - 0x80], rax
mov eax, dword [rsi]
inc eax
mov dword [rsi], eax
cmp eax, dword [rsi - 8]
jl 0x18008dd28
mov rax, qword [rsp + 0x30]
add dword [rsi + 4], edi
mov rcx, qword [rsp + 0x38]
and dword [rsi], 0
mov rcx, qword [rcx]
mov qword [rax], rcx
mov eax, dword [rsi + 4]
cmp eax, dword [r15]
jge 0x18008dd28
movsxd rax, dword [r15 + 4]
add rax, rcx
mov rcx, qword [rsp + 0x50]
mov qword [rcx], rax
add r12, rdi
add rsi, 0x30
add r15, 0x60
cmp r12, r14
jl 0x18008dc97
mov r15, qword [rbp - 0x70]
mov rsi, qword [rbp - 0x80]
mov r14, qword [rsp + 0x60]
mov qword [rsp + 0x30], rbx
mov rbx, qword [rsp + 0x58]
mov qword [rsp + 0x38], r13
mov rcx, qword [rbx]
mov r12d, 3
cmp dword [rcx + 8], r12d
jne 0x18008dddd
cmp qword [rsp + 0x30], 0
je 0x18008ddb7
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x18008df5f
add r14, r12
mov al, byte [r8 + rsi]
xor edx, edx
mov byte [r14 - 3], al
mov rax, qword [rbp + rdx*8 - 0x78]
mov cl, byte [r8 + rax]
mov byte [rdx + r14 - 2], cl
add rdx, rdi
cmp rdx, 2
jl 0x18008dd88
mov byte [r14], 0xff
add r8d, edi
mov rax, qword [rbx]
add r14, 4
cmp r8d, dword [rax]
jb 0x18008dd7e
jmp 0x18008df5f
mov eax, dword [rcx]
mov r9, r15
mov r8, qword [rbp - 0x78]
mov rcx, r14
mov dword [rsp + 0x28], 4
mov rdx, rsi
mov dword [rsp + 0x20], eax
call qword [rbx + 0x4878]
jmp 0x18008df5f
cmp dword [rcx + 8], 4
jne 0x18008df36
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x18008de7d
xor r9d, r9d
cmp dword [rcx], r9d
jbe 0x18008df5f
mov r13, qword [rbp - 0x78]
add r14, 2
movzx ecx, byte [r9 + rsi]
mov rax, qword [rbp - 0x68]
movzx r8d, byte [r9 + rax]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 2], al
movzx ecx, byte [r9 + r13]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 1], al
movzx ecx, byte [r9 + r15]
add r9d, edi
mov byte [r14 + 1], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14], al
lea r14, [r14 + 4]
mov rax, qword [rbx]
cmp r9d, dword [rax]
jb 0x18008de09
mov r13, qword [rsp + 0x38]
jmp 0x18008df5f
mov edx, dword [rcx]
mov r9, r15
mov r10, qword [rbx + 0x4878]
mov rcx, r14
mov r8, qword [rbp - 0x78]
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], edx
mov rdx, rsi
cmp eax, 2
jne 0x18008df31
call r10
mov rax, qword [rbx]
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x18008df5f
mov r15, qword [rbp - 0x68]
add r14, 2
movzx edx, byte [r8 + r15]
add r8d, edi
mov al, byte [r14 - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 2], al
mov al, byte [r14 - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14 - 1], al
mov al, byte [r14]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r14], al
lea r14, [r14 + 4]
mov rax, qword [rbx]
cmp r8d, dword [rax]
jb 0x18008dec2
mov r15, qword [rbp - 0x70]
jmp 0x18008df5f
call r10
jmp 0x18008df5f
xor edx, edx
cmp dword [rcx], edx
jbe 0x18008df5f
inc r14
mov cl, byte [rdx + rsi]
add edx, edi
mov byte [r14 + 1], cl
mov byte [r14], cl
mov byte [r14 - 1], cl
mov byte [r14 + 2], 0xff
lea r14, [r14 + 4]
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x18008df3f
mov eax, dword [rsp + 0x40]
mov rcx, qword [rbx]
add eax, edi
mov dword [rsp + 0x40], eax
cmp eax, dword [rcx + 4]
jb 0x18008dc63
jmp 0x18008df7d
mov r12d, 3
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18008c8c0
mov rax, qword [rbx]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x68]
mov dword [rax], ecx
mov rcx, qword [rbx]
mov rax, qword [rsp + 0x70]
mov edx, dword [rcx + 4]
mov dword [rax], edx
mov rax, qword [rsp + 0x78]
test rax, rax
je 0x18008dfbb
mov rcx, qword [rbx]
cmp dword [rcx + 8], r12d
cmovge edi, r12d
mov dword [rax], edi
mov rax, r13
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1800bbd30
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret