Function at 0x180025860
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
push r12
push r14
sub rsp, 0x60
mov r14, rdx
mov r12d, r8d
mov rdx, qword [rcx + 0x40]
mov rdi, rcx
mov qword [rsp + 0x28], rdx
test rdx, rdx
je 0x180025b16
cmp byte [rcx + 0x6c], 0
jge 0x180025b16
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbp
movsx ebp, word [rcx + 0x20]
mov qword [rsp + 0x40], r13
mov r8d, ebp
movzx r13d, byte [rcx + 0x37]
imul r8d, r13d
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x98], ebp
sub r8d, dword [rcx + 0x24]
je 0x1800258dc
mov r9, rdx
mov edx, dword [rcx + 0x38]
mov rcx, r14
call fcn.18001f530
mov rdx, qword [rsp + 0x28]
mov eax, 1
lea rcx, [rdi + 0x28]
mov dword [rdx + 0x2c], eax
mov r15, qword [rdi + 0x48]
movsx r8d, word [rdi + 0x22]
mov dword [rsp + 0x90], r8d
test r15, r15
je 0x180025934
mov eax, r8d
imul eax, r13d
sub eax, dword [rcx]
je 0x18002592b
mov edx, dword [rdi + 0x38]
mov r9, r15
mov r8d, eax
mov rcx, r14
call fcn.18001f530
mov r8d, dword [rsp + 0x90]
lea rcx, [rdi + 0x28]
mov rdx, qword [rsp + 0x28]
mov eax, 1
mov dword [r15 + 0x2c], eax
mov ebx, dword [rdi + 0x38]
add ebx, dword [rdi + 0x2c]
cmp ebx, r12d
jge 0x180025ad4
movzx r9d, byte [rdi + 0x34]
mov qword [rsp + 0x48], rsi
test r9b, r9b
jns 0x180025a03
mov eax, r8d
or eax, ebp
je 0x180025acf
mov ebp, dword [rdi + 0x68]
mov eax, r9d
mov edi, dword [rsp + 0x90]
and eax, 0x1f
mov ecx, 0x20
sub ecx, eax
shl ecx, 6
mov dword [rsp + 0x20], ecx
nop
mov eax, ebp
and ebp, 1
shr eax, 1
neg ebp
and ebp, 0xe008
mov ecx, eax
and ecx, 1
xor ebp, eax
neg ecx
and ecx, 0x1f
mov esi, ecx
sub esi, r13d
je 0x1800259d6
mov r8d, esi
mov r13d, ecx
imul r8d, dword [rsp + 0x98]
mov r9, rdx
mov edx, ebx
mov rcx, r14
call fcn.18001f530
test r15, r15
je 0x1800259d6
imul esi, edi
mov r9, r15
mov edx, ebx
mov rcx, r14
mov r8d, esi
call fcn.18001f530
add ebx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x28]
cmp ebx, r12d
jl 0x180025980
mov rdi, qword [rsp + 0x80]
mov r8d, dword [rsp + 0x90]
mov dword [rdi + 0x68], ebp
mov ebp, dword [rsp + 0x98]
jmp 0x180025acb
test byte [rdi + 0x6c], 0x40
jne 0x180025acf
movzx esi, byte [rdi + 0x35]
mov r14d, dword [rdi + 0x30]
inc esi
and esi, 0x1f
add r14d, r14d
cmp r14d, 0xe
jl 0x180025aa3
mov eax, r8d
or eax, ebp
je 0x180025aaa
movzx ecx, byte [rsi + rdi]
inc esi
and esi, 0x1f
mov ebp, ecx
sub ebp, r13d
je 0x180025a85
mov r8d, ebp
mov r13d, ecx
imul r8d, dword [rsp + 0x98]
mov r9, rdx
mov rcx, qword [rsp + 0x88]
mov edx, ebx
call fcn.18001f530
test r15, r15
je 0x180025a85
imul ebp, dword [rsp + 0x90]
mov r9, r15
mov rcx, qword [rsp + 0x88]
mov edx, ebx
mov r8d, ebp
call fcn.18001f530
mov rdx, qword [rsp + 0x28]
add ebx, r14d
cmp ebx, r12d
jl 0x180025a32
mov r8d, dword [rsp + 0x90]
mov ebp, dword [rsp + 0x98]
jmp 0x180025ac0
test r14d, r14d
cmove r14d, eax
mov eax, r14d
sub eax, ebx
dec eax
add eax, r12d
cdq
idiv r14d
add esi, eax
imul eax, r14d
add ebx, eax
dec sil
and sil, 0x1f
mov byte [rdi + 0x35], sil
lea rcx, [rdi + 0x28]
mov rsi, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
sub ebx, r12d
mov eax, 0
mov byte [rdi + 0x37], r13b
cmovns eax, ebx
mov dword [rdi + 0x38], r12d
mov rbx, qword [rsp + 0x58]
imul ebp, r13d
imul r8d, r13d
mov r13, qword [rsp + 0x40]
mov dword [rdi + 0x2c], eax
mov dword [rdi + 0x24], ebp
mov rbp, qword [rsp + 0x50]
mov dword [rcx], r8d
add rsp, 0x60
pop r14
pop r12
pop rdi
ret
mov dword [rcx + 0x38], r12d
add rsp, 0x60
pop r14
pop r12
pop rdi
ret