Function at 0x1400a5d40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rsi
push rdi
push r14
lea rbp, [rsp - 0x1068]
mov eax, 0x1168
call fcn.1400fcd40
sub rsp, rax
mov rax, qword [0x14049f410]
xor rax, rsp
mov qword [rbp + 0x1050], rax
mov r8d, dword [rcx + 0x2e4]
mov eax, 0xea0ea0eb
shl r8d, 0xc
mov r14d, 0x61
imul r8d
mov rsi, rcx
mov qword [rsp + 0x48], rcx
add edx, r8d
mov dword [rbp - 0x74], r14d
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp dword [rcx + 0x110], 0
movsxd rdi, edx
je 0x1400a68c5
cmp qword [rcx + 0x108], 0
je 0x1400a68c5
mov qword [rsp + 0x1198], rbx
lea rdx, [rbp + 0x80]
mov qword [rsp + 0x11a0], r12
mov qword [rsp + 0x1160], r15
call fcn.140093b10
movzx ecx, byte [rsi + 0x2ea]
lea r8, [rbp + 0xd50]
mov ebx, 0x1000
mov r9d, 0x100
mov r10d, ebx
mov r11d, r9d
sub r10, rdi
imul rcx, rdi
nop word [rax + rax]
mov rax, rcx
lea r8, [r8 + 1]
cqo
add rcx, r10
and edx, 0xfff
add rax, rdx
sar rax, 0xc
mov byte [r8 - 1], al
sub r11, 1
jne 0x1400a5e10
movzx ecx, byte [rsi + 0x2eb]
lea r8, [rbp + 0xf50]
imul rcx, rdi
mov r11, r9
nop dword [rax + rax]
mov rax, rcx
lea r8, [r8 + 1]
cqo
add rcx, r10
and edx, 0xfff
add rax, rdx
sar rax, 0xc
mov byte [r8 - 1], al
sub r11, 1
jne 0x1400a5e50
movzx ecx, byte [rsi + 0x2e9]
lea r8, [rbp + 0xe50]
mov rax, rdi
cqo
sub rax, rdx
sar rax, 1
sub rbx, rax
imul rcx, rax
mov rax, rcx
lea r8, [r8 + 1]
cqo
add rcx, rbx
and edx, 0xfff
add rax, rdx
sar rax, 0xc
mov byte [r8 - 1], al
sub r9, 1
jne 0x1400a5e93
mov r15, qword [rsi + 0x108]
mov r12d, dword [rsi + 0x110]
mov qword [rbp], r15
test r12d, r12d
je 0x1400a6849
mov qword [rsp + 0x11a8], r13
nop dword [rax]
dec r12d
cmp dword [r15 + 0x98], 0
mov dword [rbp - 8], r12d
je 0x1400a682d
cmp dword [r15 + 0x88], 0
je 0x1400a682d
cmp dword [r15 + 0x58], 0
jbe 0x1400a682d
lea rdi, [rsi + 0x1e8]
mov r8, r15
mov rcx, rdi
lea r9, [rbp + 0x20]
lea rdx, [rbp + 0x80]
call fcn.1400b8380
movaps xmm0, xmmword [rbp + 0x20]
mov eax, 0x66666667
imul dword [rbp + 0x28]
movdqa xmmword [rsp + 0x60], xmm0
psrldq xmm0, 4
movd ecx, xmm0
movdqa xmm0, xmmword [0x1401c3df0]
mov ebx, edx
sar ebx, 1
mov eax, ebx
shr eax, 0x1f
add ebx, eax
mov eax, 0x66666667
imul dword [rbp + 0x2c]
mov r10d, edx
sar r10d, 1
mov eax, r10d
shr eax, 0x1f
add r10d, eax
mov eax, 0x99999999
imul dword [rbp + 0x28]
mov r11d, edx
sar r11d, 1
mov eax, r11d
shr eax, 0x1f
add r11d, eax
mov eax, 0x99999999
imul dword [rbp + 0x2c]
mov r9d, edx
xor edx, edx
sar r9d, 1
mov eax, r9d
shr eax, 0x1f
add r9d, eax
mov eax, dword [rsi + 0x24c]
add ecx, r9d
test ecx, ecx
cmovg edx, ecx
mov ecx, dword [rsp + 0x60]
add ecx, r11d
mov dword [rsp + 0x64], edx
xor r8d, r8d
test ecx, ecx
cmovg r8d, ecx
mov ecx, dword [rsp + 0x6c]
sub ecx, r9d
mov dword [rsp + 0x60], r8d
add ecx, r10d
lea r9, [rbp + 0x30]
sub eax, edx
mov rdx, r15
cmp eax, ecx
cmovl ecx, eax
mov eax, dword [rsi + 0x248]
mov dword [rsp + 0x6c], ecx
sub eax, r8d
mov ecx, dword [rsp + 0x68]
lea r8, [rbp + 0x80]
sub ecx, r11d
add ecx, ebx
cmp eax, ecx
cmovl ecx, eax
mov dword [rsp + 0x68], ecx
mov rcx, rsi
pand xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x60], xmm0
call fcn.1400b57b0
test eax, eax
jne 0x1400a67af
mov ecx, dword [rdi]
cmp ecx, 0x20200001
ja 0x1400a66e6
lea eax, [rcx - 0x10200001]
test eax, 0xefffffff
je 0x1400a6703
lea eax, [rcx - 0x20000001]
cmp eax, 1
ja 0x1400a67b9
mov r9d, dword [rdi + 4]
mov dword [rbp - 0x5c], 0
test r9d, r9d
je 0x1400a66d0
mov edx, dword [rdi + 8]
test edx, edx
je 0x1400a66d0
test ecx, ecx
je 0x1400a66d0
mov r12, qword [rdi + 0x18]
test r12, r12
je 0x1400a6085
cmp dword [rdi + 0x10], 0
jne 0x1400a60b4
cmp qword [rdi + 0x28], 0
je 0x1400a6092
cmp dword [rdi + 0x20], 0
jne 0x1400a60b4
cmp qword [rdi + 0x38], 0
je 0x1400a609f
cmp dword [rdi + 0x30], 0
jne 0x1400a60b4
cmp qword [rdi + 0x48], 0
je 0x1400a66d0
cmp dword [rdi + 0x40], 0
je 0x1400a66d0
mov ebx, dword [rsp + 0x60]
test ebx, ebx
js 0x1400a66d0
mov esi, dword [rsp + 0x64]
test esi, esi
js 0x1400a66cb
mov r15d, dword [rsp + 0x68]
test r15d, r15d
jle 0x1400a66cb
mov r8d, dword [rsp + 0x6c]
mov dword [rsp + 0x40], r8d
test r8d, r8d
jle 0x1400a66cb
lea eax, [rbx + r15]
cmp eax, r9d
jg 0x1400a66cb
lea eax, [rsi + r8]
cmp eax, edx
jg 0x1400a66cb
mov r14, qword [rbp + 0x48]
test r14, r14
je 0x1400a66cb
sub ecx, 0x20000001
je 0x1400a615a
cmp ecx, 1
je 0x1400a613b
mov rsi, qword [rsp + 0x48]
mov eax, 0xfffffffc
mov r14d, dword [rbp - 0x74]
mov r15, qword [rbp]
mov r12d, dword [rbp - 8]
jmp 0x1400a67ab
mov qword [rbp - 0x80], 1
xor r13d, r13d
mov qword [rsp + 0x70], 3
mov qword [rsp + 0x78], 2
jmp 0x1400a617a
mov qword [rbp - 0x80], 0
mov r13d, 1
mov qword [rsp + 0x70], 2
mov qword [rsp + 0x78], 3
and r15d, 0xfffffffe
mov qword [rbp - 0x28], r13
and ebx, 0xfffffffe
mov dword [rsp + 0x58], r15d
xor edx, edx
mov ecx, 0xff
xor r8d, r8d
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rbp + r8 + 0xf4f]
lea r8, [r8 - 1]
sub eax, ecx
mov dword [rbp + rdx + 0x54c], eax
lea rdx, [rdx - 4]
movzx eax, byte [rbp + r8 + 0xe50]
sub eax, ecx
mov dword [rbp + rdx + 0xd50], eax
movzx eax, byte [rbp + r8 + 0x1050]
sub eax, ecx
mov dword [rbp + rdx + 0x950], eax
mov eax, ecx
dec ecx
test eax, eax
jne 0x1400a61a0
mov r10d, dword [rbp + 0x34]
xor edx, edx
mov eax, r9d
div r10d
mov ecx, eax
mov dword [rsp + 0x50], eax
mov r11d, eax
call fcn.14006a030
mov ecx, eax
mov dword [rbp - 0x78], eax
mov r9d, r15d
mov edx, eax
sar r9d, cl
mov dword [rbp - 0x64], r9d
cmp r11d, 1
jne 0x1400a637c
sub qword [rbp - 0x80], r13
mov eax, esi
sub qword [rsp + 0x78], r13
imul eax, r10d
sub r10d, r15d
movsxd rdi, ebx
add rax, r14
add rdi, rax
mov rax, qword [rsp + 0x48]
mov edx, dword [rax + 0x1f8]
mov eax, edx
imul eax, esi
movsxd rcx, eax
lea eax, [rbx + rbx]
movsxd rsi, eax
lea rax, [r12 + rcx]
add rsi, rax
lea eax, [r15 + r15]
sub edx, eax
sub qword [rsp + 0x70], r13
mov r13d, r10d
mov r12d, edx
mov qword [rbp - 0x48], r13
mov qword [rbp - 0x40], r12
nop
mov rbx, qword [rbp - 0x28]
mov r14d, r15d
mov r12, qword [rbp - 0x80]
add rbx, rsi
mov r13, qword [rsp + 0x70]
mov r15, qword [rsp + 0x78]
nop dword [rax + rax]
movzx edx, byte [r12 + rbx]
mov r8d, 0xff
movzx r11d, byte [rbx + r13]
movzx r9d, byte [rbx]
movzx r10d, byte [r15 + rbx]
lea rbx, [rbx + 4]
mov ecx, dword [rbp + rdx*4 + 0x150]
lea eax, [rdx + 0x32]
cmp eax, r8d
cmovb r8d, eax
movzx eax, byte [rdi]
imul r8d, eax
lea eax, [r11 + 0x32]
shr r8d, 8
imul ecx, r8d
sar ecx, 8
add cl, dl
mov byte [r12 + rbx - 4], cl
mov ecx, dword [rbp + r9*4 + 0x950]
imul ecx, r8d
sar ecx, 8
add cl, r9b
mov byte [rbx - 4], cl
mov ecx, dword [rbp + r10*4 + 0x550]
imul ecx, r8d
sar ecx, 8
add cl, r10b
mov byte [r15 + rbx - 4], cl
mov ecx, 0xff
cmp eax, ecx
cmovb ecx, eax
movzx eax, byte [rdi + 1]
imul ecx, eax
add rdi, 2
add rsi, 4
sub r14d, 2
shr ecx, 8
imul ecx, dword [rbp + r11*4 + 0x150]
sar ecx, 8
add cl, r11b
mov byte [rbx + r13 - 4], cl
test r14d, r14d
jg 0x1400a6290
mov eax, dword [rsp + 0x40]
add rsi, qword [rbp - 0x40]
dec eax
add rdi, qword [rbp - 0x48]
mov r15d, dword [rsp + 0x58]
mov dword [rsp + 0x40], eax
test eax, eax
jg 0x1400a6270
mov rsi, qword [rsp + 0x48]
mov eax, dword [rbp - 0x5c]
mov r14d, dword [rbp - 0x74]
mov r15, qword [rbp]
mov r12d, dword [rbp - 8]
jmp 0x1400a67ab
sub qword [rbp - 0x80], r13
lea ecx, [rdx + 1]
sub qword [rsp + 0x78], r13
mov eax, r11d
sub qword [rsp + 0x70], r13
mov r15d, 1
shr eax, 1
mov edi, r11d
mov dword [rbp - 0x34], eax
mov rax, qword [rsp + 0x48]
shl r15d, cl
mov ecx, dword [rbp - 0x78]
imul edi, r11d
mov edx, dword [rax + 0x1f8]
lea eax, [r11 + r11]
mov r8d, edx
imul edx, esi
sub r8d, eax
mov eax, dword [rsp + 0x40]
sar eax, cl
dec eax
mov dword [rsp + 0x54], edi
mov dword [rsp + 0x40], eax
mov eax, r10d
sub eax, r9d
mov r9d, esi
sar r9d, cl
mov qword [rbp - 0x40], rax
imul r9d, r10d
movsxd rax, ebx
sar rax, cl
movsxd rcx, edx
add r9, rax
lea eax, [rbx + rbx]
sub r9, qword [rbp - 0x40]
movsxd rbx, eax
add r9, r14
lea rax, [r12 + rcx]
add r10, r9
mov ecx, dword [rbp - 0x64]
add rbx, rax
mov eax, r8d
mov qword [rbp + 0x18], rax
mov eax, r15d
imul r15d, ecx
lea edx, [rcx - 1]
mov qword [rbp - 0x48], rbx
mov dword [rsp + 0x58], edx
mov qword [rsp + 0x60], rax
mov dword [rbp - 0x38], r15d
nop dword [rax]
add r9, qword [rbp - 0x40]
add r10, qword [rbp - 0x40]
nop dword [rax + rax]
mov dword [rbp - 0x6c], edx
nop dword [rax]
nop word [rax + rax]
movzx r14d, byte [r9]
inc r9
movzx ecx, byte [r10]
inc r10
movzx r13d, byte [r9]
movzx edx, byte [r10]
sub r13d, r14d
sub edx, ecx
mov dword [rbp - 0x68], edx
mov qword [rbp - 0x50], r10
mov qword [rbp - 0x58], r9
nop word [rax + rax]
mov r15d, r14d
imul ecx, r11d
imul r15d, edi
mov esi, r13d
imul esi, r11d
mov r8, rbx
imul r14d, r11d
mov qword [rbp - 0x18], rbx
mov dword [rbp - 0x70], r11d
mov dword [rbp - 0x30], ecx
mov eax, esi
neg eax
mov dword [rbp - 0x10], eax
mov edi, eax
mov eax, esi
imul eax, r11d
neg eax
imul edx, r11d
mov dword [rbp - 0xc], edx
nop dword [rax]
mov r9, qword [rbp - 0x28]
mov ecx, dword [rbp - 0x34]
add r9, r8
mov qword [rbp - 0x20], r9
mov dword [rbp - 0x60], ecx
movzx r10d, byte [r9]
mov edx, r15d
mov r12d, dword [rbp - 0x78]
mov rcx, qword [rbp - 0x80]
movzx r8d, byte [r9 + rcx]
mov rcx, qword [rsp + 0x70]
movzx ebx, byte [r9 + rcx]
mov rcx, qword [rsp + 0x78]
movzx r11d, byte [r9 + rcx]
lea ecx, [r8 + 0x32]
mov r9d, 0xff
cmp ecx, r9d
cmovb r9d, ecx
add r15d, esi
lea ecx, [r12 + r12]
sar edx, cl
mov rcx, qword [rbp - 0x80]
imul r9d, edx
mov edx, dword [rbp + r8*4 + 0x150]
sar r9d, 8
imul edx, r9d
sar edx, 8
add dl, r8b
mov r8, qword [rbp - 0x20]
mov byte [r8 + rcx], dl
mov rcx, qword [rsp + 0x78]
mov edx, dword [rbp + r10*4 + 0x950]
imul edx, r9d
sar edx, 8
add dl, r10b
mov r10d, r12d
mov byte [r8], dl
mov edx, dword [rbp + r11*4 + 0x550]
imul edx, r9d
mov r9, r8
sar edx, 8
add dl, r11b
mov byte [r8 + rcx], dl
lea ecx, [rbx + 0x32]
mov r8d, 0xff
mov edx, r15d
cmp ecx, r8d
cmovb r8d, ecx
lea ecx, [r12 + r12]
sar edx, cl
add r15d, esi
mov rcx, qword [rsp + 0x70]
imul r8d, edx
sar r8d, 8
imul r8d, dword [rbp + rbx*4 + 0x150]
sar r8d, 8
add r8b, bl
mov byte [r9 + rcx], r8b
add r9, 4
mov r8, qword [rbp - 0x18]
add r8, 4
mov qword [rbp - 0x20], r9
sub dword [rbp - 0x60], 1
mov qword [rbp - 0x18], r8
jne 0x1400a64d1
sub edi, dword [rbp - 0x68]
add r8, qword [rbp + 0x18]
add edi, r13d
mov ecx, dword [rbp - 0x30]
add ecx, eax
mov qword [rbp - 0x18], r8
sub ecx, r14d
add r15d, ecx
mov ecx, dword [rbp - 0x68]
sub ecx, r13d
add esi, ecx
mov ecx, dword [rbp - 0x10]
add ecx, dword [rbp - 0xc]
sub eax, ecx
sub dword [rbp - 0x70], 1
jne 0x1400a64c0
mov r12d, dword [rbp - 0x6c]
mov rbx, qword [rbp - 0x48]
dec r12d
add rbx, qword [rsp + 0x60]
mov qword [rbp - 0x48], rbx
mov dword [rbp - 0x6c], r12d
test r12d, r12d
jg 0x1400a6645
jne 0x1400a665b
mov r9, qword [rbp - 0x58]
xor edx, edx
mov r10, qword [rbp - 0x50]
mov r11d, dword [rsp + 0x50]
mov edi, dword [rsp + 0x54]
movzx r14d, byte [r9]
inc r9
movzx ecx, byte [r10]
inc r10
xor r13d, r13d
jmp 0x1400a646b
mov r9, qword [rbp - 0x58]
mov r10, qword [rbp - 0x50]
mov r11d, dword [rsp + 0x50]
mov edi, dword [rsp + 0x54]
jmp 0x1400a6450
mov r15d, dword [rsp + 0x40]
mov ecx, r10d
mov rsi, qword [rsp + 0x48]
dec r15d
mov dword [rsp + 0x40], r15d
mov eax, dword [rsi + 0x1f8]
shl eax, cl
sub eax, dword [rbp - 0x38]
add rbx, rax
mov qword [rbp - 0x48], rbx
test r15d, r15d
jg 0x1400a66b1
jne 0x1400a6368
movsxd rax, dword [rbp - 0x64]
mov r9, qword [rbp - 0x58]
mov r10, qword [rbp - 0x50]
sub r9, rax
mov r11d, dword [rsp + 0x50]
sub r10, rax
mov edi, dword [rsp + 0x54]
mov edx, dword [rsp + 0x58]
jmp 0x1400a6440
mov r9, qword [rbp - 0x58]
mov r10, qword [rbp - 0x50]
mov r11d, dword [rsp + 0x50]
mov edi, dword [rsp + 0x54]
mov edx, dword [rsp + 0x58]
jmp 0x1400a6430
mov rsi, qword [rsp + 0x48]
mov r14d, dword [rbp - 0x74]
mov eax, 0xfffffffc
mov r15, qword [rbp]
mov r12d, dword [rbp - 8]
jmp 0x1400a67ab
lea eax, [rcx - 0x30100001]
test eax, 0xffeffffe
jne 0x1400a67b9
cmp ecx, 0x30200002
je 0x1400a67b9
mov r9d, dword [rdi + 4]
mov eax, r9d
mov r8d, dword [rsp + 0x60]
and eax, 0xfffffff8
mov r11d, dword [rsp + 0x64]
mov ebx, dword [rdi + 8]
mov edx, dword [rsp + 0x68]
mov r10d, dword [rsp + 0x6c]
inc edx
add edx, r8d
inc r10d
add r10d, r11d
and r8d, 0xfffffff8
and r11d, 0xfffffff8
mov dword [rbp + 8], r8d
mov ecx, edx
mov dword [rbp + 0xc], r11d
and ecx, 0xfffffff8
cmp ecx, eax
mov eax, ebx
mov ecx, r10d
cmovl r9d, edx
and eax, 0xfffffff8
and r9d, 0xfffffff8
lea rdx, [rbp + 8]
sub r9d, r8d
and ecx, 0xfffffff8
cmp ecx, eax
mov dword [rbp + 0x10], r9d
mov eax, dword [rbp + 0x38]
lea r9, [rbp + 0xd50]
mov dword [rsp + 0x38], eax
lea r8, [rbp + 0xe50]
mov eax, dword [rbp + 0x34]
cmovl ebx, r10d
mov dword [rsp + 0x30], eax
and ebx, 0xfffffff8
mov rax, qword [rbp + 0x48]
sub ebx, r11d
mov qword [rsp + 0x28], rax
mov rcx, rdi
lea rax, [rbp + 0xf50]
mov dword [rbp + 0x14], ebx
mov qword [rsp + 0x20], rax
call fcn.14005f190
test eax, eax
je 0x1400a67c3
cmp eax, 0x61
je 0x1400a67c3
mov r14d, eax
jmp 0x1400a67ca
mov eax, 0xfffffffa
mov r14d, eax
jmp 0x1400a67ca
test r14d, r14d
cmovne r14d, eax
mov ecx, dword [rbp + 0x30]
xor ebx, ebx
mov rsi, qword [rsi + 8]
mov eax, ecx
shr eax, 0x14
and eax, 3
mov dword [rbp - 0x74], r14d
add eax, 1
je 0x1400a6828
nop dword [rax]
nop dword [rax + rax]
mov eax, ebx
lea rdi, [rbp + 0x48]
shl rax, 4
add rdi, rax
mov rdx, qword [rdi]
test rdx, rdx
je 0x1400a6818
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
mov qword [rdi], 0
mov ecx, dword [rbp + 0x30]
mov eax, ecx
inc ebx
shr eax, 0x14
and eax, 3
inc eax
cmp ebx, eax
jb 0x1400a67f0
mov rsi, qword [rsp + 0x48]
add r15, 0x208
mov qword [rbp], r15
test r12d, r12d
jne 0x1400a5ee0
mov r13, qword [rsp + 0x11a8]
mov rcx, qword [rsi + 8]
lea rdx, [rbp + 0x80]
call fcn.140081c90
mov rcx, qword [rsi + 8]
lea rdx, [rbp + 0xd0]
call fcn.140081c90
mov rdx, qword [rbp + 0x120]
mov r15, qword [rsp + 0x1160]
mov r12, qword [rsp + 0x11a0]
mov rbx, qword [rsp + 0x1198]
test rdx, rdx
je 0x1400a6897
mov rcx, qword [rsi + 8]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rdx, qword [rbp + 0x128]
test rdx, rdx
je 0x1400a68ae
mov rcx, qword [rsi + 8]
mov r8, qword [rcx]
call qword [r8 + 0x10]
mov rdx, qword [rbp + 0x138]
test rdx, rdx
je 0x1400a68c5
mov rcx, qword [rsi + 8]
mov r8, qword [rcx]
call qword [r8 + 0x10]
mov eax, r14d
mov rcx, qword [rbp + 0x1050]
xor rcx, rsp
call fcn.1400fc4b0
add rsp, 0x1168
pop r14
pop rdi
pop rsi
pop rbp
ret