Function at 0x18002e780
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov r12d, edx
mov rdi, rcx
call fcn.18002e5f0
test dword [rdi + 0x78], 0x80
lea r13, [rdi + 0x10]
mov eax, dword [rdi + 0x74]
lea r9, [0x180064b30]
mov r11, qword [rdi + 0x60]
mov edx, 0x1ffff
mov ecx, 0x1ff
mov qword [rsp + 0x30], r11
cmove ecx, edx
mov qword [rsp + 0x60], r13
mov edx, 0x372
mov dword [rsp + 0x38], ecx
mov r8d, 0x332
cmove r8d, edx
cdq
idiv ecx
add r8, r11
xor esi, esi
mov dword [rdi + 0x74], edx
mov qword [rsp + 0x68], r8
mov qword [rsp + 0x58], rsi
nop dword [rax]
mov r10, qword [r13]
mov ebx, dword [rdi + 0x68]
add ebx, dword [r13 - 8]
mov r14d, dword [r13 - 4]
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x50], r10
test r10, r10
je 0x18002eb17
mov dword [r10 + 0x2c], 1
movzx ecx, byte [r13 - 0xf]
mov edx, ecx
and edx, 0xf
lea r15d, [rdx + rdx]
test r15d, r15d
je 0x18002eaf4
test cl, 0x10
jne 0x18002eafc
mov eax, ecx
and eax, 0xa0
cmp al, 0xa0
jne 0x18002e85f
cmp r14d, 0x4a
jl 0x18002eaf9
movzx eax, byte [rsi + r9]
mov ebp, r12d
mov dword [rsp + 0x20], 0
mov dword [rsp + 0xd8], r12d
test byte [rdi + 0x78], al
je 0x18002e8a0
mov ebp, dword [r13 + 0x28]
add ebp, dword [rdi + 0x68]
cmp byte [r13 - 0xd], 0
mov eax, dword [r13 + 0x2c]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0xd8], ebp
je 0x18002e8a0
sub dword [r13 - 0xc], r15d
neg r15d
cmp ebx, r12d
jl 0x18002e8ae
cmp ebp, r12d
jge 0x18002eade
movzx edi, byte [r13 - 0xe]
lea rax, [0x180064b34]
mov r9d, 0x10
mov qword [rsp + 0x48], rax
and edi, 1
mov dword [rsp + 0xd0], r9d
lea esi, [r9 - 0xf]
test cl, 0x20
jne 0x18002e930
mov rdx, qword [rsp + 0xc0]
mov r9d, dword [rsp + 0x38]
mov qword [rsp + 0x48], r8
mov dword [rsp + 0xd0], r9d
mov r8d, dword [rdx + 0x74]
test cl, 0x40
je 0x18002e91a
mov r8d, dword [rdx + 0x70]
lea rax, [r11 + 0x330]
mov r9d, 0xf
mov qword [rsp + 0x48], rax
mov dword [rsp + 0xd0], r9d
mov eax, r14d
cdq
idiv r9d
mov eax, dword [r13 - 8]
add eax, r8d
mov esi, edx
cdq
idiv r9d
mov edi, edx
sub esi, r9d
xor edx, edx
mov dword [rsp + 0x3c], esi
mov esi, 0x167c6ea1
mov dword [rsp + 0x24], edx
test cl, cl
js 0x18002e9ac
mov rax, qword [rsp + 0xc0]
mov ecx, 0x1f
mov r8d, dword [rax + 0x6c]
mov eax, 0x84210843
add r8d, dword [r13 - 8]
imul r8d
add edx, r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x1f
sub r8d, eax
mov eax, 0x167c6ea1
sub ecx, r8d
shr esi, cl
mov ecx, r8d
shl eax, cl
btr eax, 0x1f
or esi, eax
mov eax, 0x84210843
imul r14d
add edx, r14d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x1f
mov edx, r14d
sub edx, eax
mov dword [rsp + 0x24], edx
mov r14d, dword [r13 - 0xc]
mov eax, 0x1f
mov r13d, dword [rsp + 0xd0]
sub eax, edx
mov dword [rsp + 0x40], eax
cmp ebp, ebx
jge 0x18002e9fe
mov eax, r14d
mov r8d, r15d
neg eax
sub r8d, r14d
test r15d, r15d
cmovns r8d, eax
test r8d, r8d
je 0x18002ea00
mov eax, r8d
mov r9, r10
sub eax, r15d
mov edx, ebp
add r14d, eax
neg r15d
mov rcx, r11
call fcn.1800120b0
mov r11, qword [rsp + 0x30]
jmp 0x18002ea00
jg 0x18002ea11
mov eax, dword [rsp + 0x20]
add ebp, eax
cmp ebp, ebx
jle 0x18002ea04
mov dword [rsp + 0xd8], ebp
cmp dword [rsp + 0xc8], ebp
cmovg r12d, ebp
cmp ebx, r12d
jge 0x18002ea9b
mov rbp, qword [rsp + 0x50]
test sil, 1
je 0x18002ea6e
mov rcx, qword [rsp + 0x48]
movsxd rax, edi
sar rax, 3
movzx eax, byte [rax + rcx]
movzx ecx, dil
and ecx, 7
shr eax, cl
and eax, 1
neg eax
and eax, r15d
add edi, dword [rsp + 0x3c]
jns 0x18002ea56
add edi, r13d
mov r8d, eax
sub r8d, r14d
je 0x18002ea6e
mov r9, rbp
mov edx, ebx
mov rcx, r11
mov r14d, eax
call fcn.1800120b0
mov ecx, dword [rsp + 0x24]
mov edx, esi
add ebx, dword [rsp + 0x28]
mov eax, esi
mov r11, qword [rsp + 0x30]
shl edx, cl
mov ecx, dword [rsp + 0x40]
btr edx, 0x1f
shr eax, cl
mov esi, edx
or esi, eax
cmp ebx, r12d
jl 0x18002ea26
mov ebp, dword [rsp + 0xd8]
mov r12d, dword [rsp + 0xc8]
mov r10, qword [rsp + 0x50]
mov r11, qword [rsp + 0x30]
cmp ebx, r12d
jl 0x18002e9c3
cmp ebp, r12d
jl 0x18002e9c3
mov r13, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov byte [r13 - 0xe], dil
mov rdi, qword [rsp + 0xc0]
mov dword [r13 - 0xc], r14d
mov r14d, dword [rsp + 0x28]
mov rax, r13
mov byte [rax - 0xd], 0
test r15d, r15d
jns 0x18002eb17
sub dword [rax - 0xc], r15d
mov byte [rax - 0xd], 1
jmp 0x18002eb17
test cl, 0x10
jne 0x18002eafc
mov r15d, edx
mov r8d, r15d
sub r8d, dword [r13 - 0xc]
je 0x18002eb17
mov dword [r13 - 0xc], r15d
mov r9, r10
mov edx, dword [rdi + 0x68]
mov rcx, r11
call fcn.1800120b0
mov eax, r12d
sub eax, ebx
test eax, eax
jle 0x18002eb33
dec eax
add eax, r14d
cdq
idiv r14d
xor byte [r13 - 0xe], al
imul eax, r14d
add ebx, eax
mov r11, qword [rsp + 0x30]
lea r9, [0x180064b30]
mov r8, qword [rsp + 0x68]
mov rax, r13
sub ebx, r12d
inc rsi
add r13, 0x18
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], r13
mov dword [rax - 8], ebx
cmp rsi, 4
jl 0x18002e800
mov r8d, dword [rdi + 0x70]
mov r9d, r12d
sub r9d, dword [rdi + 0x68]
mov eax, 0x88888889
add r8d, r9d
mov dword [rdi + 0x68], r12d
imul r8d
mov eax, 0x84210843
add edx, r8d
sar edx, 3
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0xf
sub r8d, ecx
mov dword [rdi + 0x70], r8d
mov r8d, dword [rdi + 0x6c]
add r8d, r9d
imul r8d
add edx, r8d
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x1f
sub r8d, eax
add dword [rdi + 0x74], r9d
mov dword [rdi + 0x6c], r8d
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret