Function at 0x14005bd40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0xb0
mov r15, qword [rsp + 0x100]
mov rdi, rdx
mov r12, qword [rsp + 0x108]
mov rdx, r9
sub rdx, r15
mov r10, r12
sub r10, r15
mov rbp, r9
lea rcx, [r15 + 0xff]
mov rsi, r8
mov al, 0xff
nop dword [rax]
sub byte [rdx + rcx], al
sub byte [rcx], al
sub byte [r10 + rcx], al
lea rcx, [rcx - 1]
add al, 0xff
jne 0x14005bd80
mov ecx, dword [rdi]
mov qword [rsp + 0xe0], rbx
mov qword [rsp + 0xa0], r14
cmp ecx, 0x20200001
ja 0x14005be01
lea eax, [rcx - 0x10200001]
test eax, 0xefffffff
je 0x14005be1f
lea eax, [rcx - 0x20000001]
cmp eax, 1
ja 0x14005be15
mov eax, dword [rsp + 0x120]
mov r9, r15
mov dword [rsp + 0x38], eax
mov r8, rbp
mov eax, dword [rsp + 0x118]
mov rdx, rsi
mov dword [rsp + 0x30], eax
mov rcx, rdi
mov rax, qword [rsp + 0x110]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
call fcn.14009fa70
jmp 0x14005c39e
cmp ecx, 0x30100001
je 0x14005bf11
cmp ecx, 0x30200001
je 0x14005be1f
mov eax, 0xfffffffa
jmp 0x14005c39e
mov edx, dword [rsi + 8]
mov r8d, dword [r8]
inc edx
mov r9d, dword [rdi + 4]
add edx, r8d
mov r11d, dword [rsi + 4]
mov ecx, r9d
mov r10d, dword [rsi + 0xc]
and r8d, 0xfffffff8
mov ebx, dword [rdi + 8]
and ecx, 0xfffffff8
mov esi, dword [rsp + 0x118]
inc r10d
mov r14, qword [rsp + 0x110]
add r10d, r11d
and r11d, 0xfffffff8
mov dword [rsp + 0x40], r8d
mov eax, edx
mov dword [rsp + 0x44], r11d
and eax, 0xfffffff8
cmp eax, ecx
mov ecx, ebx
mov eax, r10d
cmovl r9d, edx
and ecx, 0xfffffff8
and r9d, 0xfffffff8
and eax, 0xfffffff8
sub r9d, r8d
mov rdx, rdi
cmp eax, ecx
mov dword [rsp + 0x48], r9d
mov r9, rbp
lea r8, [rsp + 0x40]
cmovl ebx, r10d
xor ecx, ecx
and ebx, 0xfffffff8
sub ebx, r11d
mov dword [rsp + 0x4c], ebx
mov ebx, dword [rsp + 0x120]
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r14
call fcn.140057240
test eax, eax
jne 0x14005c39e
mov dword [rsp + 0x30], ebx
lea r8, [rsp + 0x40]
mov dword [rsp + 0x28], esi
mov r9, r15
mov rdx, rdi
mov qword [rsp + 0x20], r14
mov cl, 1
call fcn.140057240
test eax, eax
jne 0x14005c39e
mov dword [rsp + 0x30], ebx
lea r8, [rsp + 0x40]
mov dword [rsp + 0x28], esi
mov r9, r12
mov rdx, rdi
mov qword [rsp + 0x20], r14
mov cl, 2
call fcn.140057240
jmp 0x14005c39e
mov edx, dword [r8 + 8]
mov r14d, dword [r8]
inc edx
mov ebx, dword [r8 + 4]
add edx, r14d
mov r8d, dword [r8 + 0xc]
and r14d, 0xfffffff8
mov r15d, dword [rdi + 4]
inc r8d
mov r12d, dword [rdi + 8]
add r8d, ebx
mov esi, dword [rsp + 0x118]
mov ecx, r15d
and ecx, 0xfffffff8
mov qword [rsp + 0xa8], r13
mov r13, qword [rsp + 0x110]
and ebx, 0xfffffff8
mov eax, edx
mov dword [rsp + 0x40], r14d
and eax, 0xfffffff8
mov dword [rsp + 0x44], ebx
cmp eax, ecx
mov ecx, r12d
cmovl r15d, edx
and ecx, 0xfffffff8
and r15d, 0xfffffff8
mov rdx, rdi
mov eax, r15d
sub eax, r14d
mov dword [rsp + 0xf8], eax
mov dword [rsp + 0x48], eax
mov eax, r8d
and eax, 0xfffffff8
cmp eax, ecx
cmovl r12d, r8d
lea r8, [rsp + 0x40]
and r12d, 0xfffffff8
xor ecx, ecx
mov eax, r12d
sub eax, ebx
mov dword [rsp + 0xe8], eax
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x120]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r13
call fcn.140057240
test eax, eax
jne 0x14005c396
mov eax, dword [rdi + 4]
test eax, eax
je 0x14005c38d
mov ecx, dword [rdi + 8]
test ecx, ecx
je 0x14005c38d
cmp dword [rdi], 0
je 0x14005c38d
cmp qword [rdi + 0x18], 0
je 0x14005bffd
cmp dword [rdi + 0x10], 0
jne 0x14005c02c
cmp qword [rdi + 0x28], 0
je 0x14005c00a
cmp dword [rdi + 0x20], 0
jne 0x14005c02c
cmp qword [rdi + 0x38], 0
je 0x14005c017
cmp dword [rdi + 0x30], 0
jne 0x14005c02c
cmp qword [rdi + 0x48], 0
je 0x14005c38d
cmp dword [rdi + 0x40], 0
je 0x14005c38d
test r13, r13
je 0x14005c38d
test r14d, r14d
js 0x14005c38d
test ebx, ebx
js 0x14005c38d
mov r10d, dword [rsp + 0xf8]
test r10d, r10d
jle 0x14005c38d
mov ebp, dword [rsp + 0xe8]
test ebp, ebp
jle 0x14005c38d
cmp r15d, eax
jg 0x14005c38d
cmp r12d, ecx
jg 0x14005c38d
xor edx, edx
div esi
cmp eax, 8
jne 0x14005c38d
mov ecx, eax
call fcn.14006a030
mov edx, dword [rdi + 0x20]
mov r9d, eax
mov ecx, r9d
add eax, eax
sar r10d, cl
mov ecx, ebx
sar ecx, 1
imul ecx, edx
lea r8d, [rdx - 8]
mov dword [rsp + 0xf8], r10d
lea edx, [rdx*4]
mov dword [rsp + 0x50], eax
movsxd rax, r14d
add ecx, r14d
movsxd r11, ecx
mov ecx, r9d
mov r9d, dword [rsp + 0xf8]
and r11, 0xfffffffffffffffe
add r11, qword [rdi + 0x28]
mov edi, esi
sub edi, r10d
sar ebx, cl
sar rax, cl
imul ebx, esi
sar ebp, cl
dec ebp
mov ecx, edx
mov qword [rsp + 0x80], r11
mov qword [rsp + 0x78], r11
mov r10d, ebx
add r10, rax
mov qword [rsp + 0x40], rdi
sub r10, rdi
mov eax, r8d
add r10, r13
mov dword [rsp + 0xe8], ebp
dec r9d
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x58], r9d
mov qword [rsp + 0x90], rcx
lea rbx, [r10 + rsi]
nop dword [rax + rax]
add r10, rdi
add rbx, rdi
nop word [rax + rax]
mov dword [rsp + 0x54], r9d
nop word [rax + rax]
movzx eax, byte [r10]
inc r10
movzx edx, byte [rbx]
inc rbx
movzx edi, byte [r10]
movzx r15d, byte [rbx]
sub edi, eax
sub r15d, edx
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x60], r10
nop dword [rax]
nop dword [rax + rax]
mov r14, r11
lea esi, [rdi*8]
mov r11d, eax
lea edx, [rdx*4]
lea eax, [rax*4]
shl r11d, 6
mov dword [rsp + 0x74], eax
mov ecx, esi
mov eax, esi
mov dword [rsp + 0x70], edx
neg eax
neg ecx
shl eax, 2
mov ebp, 8
nop word [rax + rax]
mov r12d, ecx
mov ebx, r11d
mov ecx, dword [rsp + 0x50]
mov r13d, 8
sar ebx, cl
mov r10d, dword [r14]
add r11d, esi
mov rdx, qword [rsp + 0x100]
mov r8d, r10d
shr r8d, 8
sub r13d, 4
movzx ecx, r10b
movsx edx, byte [rcx + rdx]
imul edx, ebx
movzx ecx, r8b
sar edx, 8
add dl, r10b
movzx r9d, dl
mov rdx, qword [rsp + 0x108]
movsx edx, byte [rcx + rdx]
imul edx, ebx
mov ebx, r11d
sar edx, 8
add dl, r8b
mov r8d, r10d
movzx ecx, dl
mov rdx, qword [rsp + 0x100]
shl ecx, 8
or r9d, ecx
shr r8d, 0x10
mov ecx, dword [rsp + 0x50]
sar ebx, cl
movzx ecx, r8b
shr r10d, 0x18
movsx edx, byte [rcx + rdx]
imul edx, ebx
sar edx, 8
add dl, r8b
movzx ecx, dl
mov rdx, qword [rsp + 0x108]
shl ecx, 0x10
or r9d, ecx
movzx ecx, r10b
movsx edx, byte [rcx + rdx]
imul edx, ebx
sar edx, 8
add dl, r10b
movzx ecx, dl
shl ecx, 0x18
or ecx, r9d
mov dword [r14], ecx
add r14, 4
test r13d, r13d
jg 0x14005c1d2
mov ecx, dword [rsp + 0x70]
lea edx, [r15*4]
add r14, qword [rsp + 0x88]
add ecx, eax
sub ecx, dword [rsp + 0x74]
sub eax, edx
add r11d, ecx
lea edx, [rdi*4]
mov ecx, r15d
add eax, edx
sub ecx, edi
sub ebp, 2
add esi, ecx
mov ecx, edi
sub ecx, r15d
add ecx, r12d
test ebp, ebp
jg 0x14005c1c0
mov r11, qword [rsp + 0x78]
mov ecx, dword [rsp + 0x54]
add r11, 8
dec ecx
mov qword [rsp + 0x78], r11
mov dword [rsp + 0x54], ecx
test ecx, ecx
jg 0x14005c30d
jne 0x14005c31c
mov r10, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
movzx eax, byte [r10]
inc r10
movzx edx, byte [rbx]
inc rbx
xor ecx, ecx
mov r15d, ecx
mov edi, ecx
jmp 0x14005c16a
mov r10, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
jmp 0x14005c150
mov r15, qword [rsp + 0x80]
add r15, qword [rsp + 0x90]
mov ebp, dword [rsp + 0xe8]
mov r11, r15
dec ebp
mov qword [rsp + 0x80], r15
mov qword [rsp + 0x78], r15
mov dword [rsp + 0xe8], ebp
test ebp, ebp
jg 0x14005c374
jne 0x14005c394
movsxd rax, dword [rsp + 0xf8]
mov r10, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
sub r10, rax
mov r9d, dword [rsp + 0x58]
sub rbx, rax
jmp 0x14005c140
mov r10, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x58]
mov rdi, qword [rsp + 0x40]
jmp 0x14005c130
mov eax, 0xfffffffc
jmp 0x14005c396
xor eax, eax
mov r13, qword [rsp + 0xa8]
mov r14, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xe0]
add rsp, 0xb0
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret