Function at 0x180175010
Capabilities:
Encrypt data using rc4 prga
Hash data using djb2

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x30
mov r14, rdx
mov rsi, rcx
mov rdx, qword [rcx + 0x338]
test rdx, rdx
je 0x1801750f8
cmp qword [rcx + 0x348], 0
je 0x1801750f8
cmp qword [rcx + 0x1a0], 0
je 0x1801750f8
mov rcx, qword [rcx + 8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
mov rdi, qword [rsi + 0x338]
mov rcx, r14
mov ebx, eax
add rdi, 8
lea r15, [rdi + rbx*4]
call fcn.180174fd0
mov rcx, qword [rsi + 8]
xor edx, edx
div ebx
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
lea rdx, [rdi + rdx*4]
call qword [case.0x1800a0c66.0]
mov ebx, eax
test eax, eax
je 0x1801750f8
nop word [rax + rax]
mov r8d, 0xffffffff
mov edx, ebx
mov rcx, rsi
call fcn.180177140
mov r9d, ebx
mov rcx, r14
sub rax, r14
nop dword [rax]
movzx r8d, byte [rcx]
movzx edx, byte [rcx + rax]
sub r8d, edx
jne 0x1801750d4
inc rcx
test edx, edx
jne 0x1801750c0
test r8d, r8d
je 0x18017531a
mov rcx, qword [rsi + 8]
lea rdx, [r15 + r9*4]
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
mov ebx, eax
test eax, eax
jne 0x1801750a0
mov rdx, qword [rsi + 0x340]
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r13
test rdx, rdx
je 0x1801752fd
cmp qword [rsi + 0x348], 0
je 0x1801752fd
cmp qword [rsi + 0x1a0], 0
je 0x1801752fd
mov rcx, qword [rsi + 8]
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
mov rcx, qword [rsi + 8]
mov rdx, qword [rsi + 0x340]
mov edi, eax
add rdx, 4
mov r8, qword [rcx]
mov rax, qword [r8 + 0x28]
call qword [case.0x1800a0c66.0]
mov rcx, qword [rsi + 8]
mov r12d, eax
mov rdx, qword [rsi + 0x340]
add rdx, 8
mov r8, qword [rcx]
mov rax, qword [r8 + 0x28]
call qword [case.0x1800a0c66.0]
mov rcx, qword [rsi + 8]
mov rdx, qword [rsi + 0x340]
mov ebx, eax
add rdx, 0xc
mov r8, qword [rcx]
mov rax, qword [r8 + 0x28]
call qword [case.0x1800a0c66.0]
mov r15, qword [rsi + 0x340]
lea rbp, [rbx + rdi]
movzx edx, byte [r14]
add r15, 0x10
mov dword [rsp + 0x70], eax
mov r13d, ebx
mov rcx, r14
mov ebx, 0x1505
test dl, dl
je 0x1801751e3
nop word [rax + rax]
imul ebx, ebx, 0x21
lea rcx, [rcx + 1]
movzx eax, dl
movzx edx, byte [rcx]
add ebx, eax
test dl, dl
jne 0x1801751d0
mov rcx, qword [rsi + 8]
lea r8d, [r13 - 1]
mov r9d, ebx
shr r9, 5
and r9, r8
mov rax, qword [rcx]
lea rdx, [r15 + r9*4]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
mov ecx, dword [rsp + 0x70]
mov edx, ebx
shr edx, cl
mov r8d, eax
and edx, 0x1f
movzx ecx, dl
shr r8d, cl
mov ecx, ebx
and ecx, 0x1f
shr eax, cl
and r8d, eax
test r8b, 1
je 0x1801752fd
mov rcx, qword [rsi + 8]
xor edx, edx
mov rax, qword [rcx]
mov r9, qword [rax + 0x28]
mov eax, ebx
div edi
mov rax, r9
mov r8d, edx
add r8, r13
lea rdx, [r15 + r8*4]
call qword [case.0x1800a0c66.0]
test eax, eax
je 0x1801752fd
mov edi, eax
sub eax, r12d
shl rdi, 4
add rdi, qword [rsi + 0x348]
add rax, rbp
lea rbp, [r15 + rax*4]
mov rcx, qword [rsi + 8]
mov rdx, rbp
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
xor eax, ebx
cmp eax, 2
jae 0x1801752d9
mov rcx, qword [rsi + 8]
mov rdx, rdi
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
mov r8d, 0xffffffff
mov rcx, rsi
mov edx, eax
call fcn.1801772a0
mov rcx, r14
sub rax, r14
nop word [rax + rax]
movzx r8d, byte [rcx]
movzx edx, byte [rcx + rax]
sub r8d, edx
jne 0x1801752d4
inc rcx
test edx, edx
jne 0x1801752c0
test r8d, r8d
je 0x180175334
mov rcx, qword [rsi + 8]
mov rdx, rbp
add rdi, 0x10
add rbp, 4
mov rax, qword [rcx]
mov rax, qword [rax + 0x28]
call qword [case.0x1800a0c66.0]
test al, 1
je 0x180175271
xor eax, eax
mov r12, qword [rsp + 0x28]
mov rbp, qword [rsp + 0x68]
mov r13, qword [rsp + 0x20]
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
shl r9, 4
add r9, qword [rsi + 0x348]
mov rax, r9
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret
mov rax, rdi
jmp 0x1801752ff