Function at 0x140010020
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rsi
sub rsp, 0x180
mov rax, qword [0x14017b088]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rax, qword [rcx]
mov rsi, rcx
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x68], rdx
mov dword [rax + 8], 0
call fcn.14000f200
mov rdx, qword [rsi]
test eax, eax
jne 0x140010073
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.14000e870
xor eax, eax
jmp 0x14001062f
movsxd rax, dword [rdx + 8]
cmp eax, 3
jne 0x1400100a1
cmp dword [rsi + 0x4850], eax
je 0x140010096
cmp dword [rsi + 0x484c], 0
jne 0x1400100a1
cmp dword [rsi + 0x4848], 0
jne 0x1400100a1
mov qword [rsp + 0x40], 1
jmp 0x1400100aa
mov qword [rsp + 0x40], 0
test eax, eax
jg 0x1400100c2
xor r8d, r8d
mov edx, eax
mov rcx, rsi
call fcn.14000e870
xor eax, eax
jmp 0x14001062f
mov qword [rsp + 0x1a8], rbx
xorps xmm0, xmm0
mov qword [rsp + 0x178], rbp
xorps xmm1, xmm1
mov qword [rsp + 0x170], rdi
mov rcx, rdx
mov qword [rsp + 0x168], r12
mov r12, rax
movdqu xmmword [rsp + 0x48], xmm0
movdqu xmmword [rsp + 0x58], xmm1
test eax, eax
jle 0x1400101ee
xor ebp, ebp
lea rbx, [rsp + 0x98]
lea rdi, [rsi + 0x46a4]
mov rax, qword [rsi]
mov ecx, dword [rax]
add ecx, 3
call fcn.140067440
mov qword [rdi + 0x44], rax
test rax, rax
je 0x14001024d
mov eax, dword [rsi + 0x4688]
cdq
mov dword [rbx + 0x10], 0
idiv dword [rdi]
mov r8d, eax
mov dword [rbx], eax
mov eax, dword [rsi + 0x468c]
cdq
idiv dword [rdi + 4]
xor edx, edx
mov ecx, eax
mov dword [rbx + 4], eax
sar ecx, 1
mov r9d, eax
mov dword [rbx + 0xc], ecx
mov rcx, qword [rsi]
mov eax, dword [rcx]
mov rcx, qword [rdi + 0x2c]
dec eax
add eax, r8d
mov qword [rbx - 8], rcx
div r8d
mov qword [rbx - 0x10], rcx
mov dword [rbx + 8], eax
cmp r8d, 1
jne 0x1400101a0
cmp r9d, r8d
jne 0x14001018b
lea rax, [0x14000f5b0]
jmp 0x1400101d0
mov r8d, 1
cmp r9d, 2
jne 0x1400101b5
lea rax, [0x14000f5c0]
jmp 0x1400101d0
cmp r8d, 2
jne 0x1400101c9
cmp r9d, 1
jne 0x1400101b5
lea rax, [0x14000f800]
jmp 0x1400101d0
cmp r8d, 2
jne 0x1400101c9
cmp r9d, r8d
jne 0x1400101c9
mov rax, qword [rsi + 0x4880]
jmp 0x1400101d0
lea rax, [0x14000fb90]
mov qword [rbx - 0x18], rax
inc rbp
add rbx, 0x30
add rdi, 0x60
cmp rbp, r12
jl 0x140010113
mov rdx, qword [rsi]
mov rcx, rdx
mov r8d, dword [rdx]
mov r9d, dword [rdx + 4]
test r8d, r8d
js 0x140010258
je 0x14001020a
mov eax, 0x7fffffff
cdq
idiv r8d
cmp eax, 4
jl 0x140010258
lea r10d, [r8*4]
mov rdx, rcx
test r10d, r10d
js 0x140010255
test r9d, r9d
js 0x140010255
je 0x14001022f
mov eax, 0x7fffffff
cdq
idiv r9d
cmp r10d, eax
jg 0x140010258
imul r8d, r9d
lea eax, [r8*4]
inc eax
movsxd rcx, eax
call fcn.140067440
mov rcx, qword [rsi]
mov r8, rax
jmp 0x14001025b
mov rax, qword [rsi]
mov edx, dword [rax + 8]
jmp 0x140010268
mov rcx, rdx
xor r8d, r8d
mov qword [rsp + 0x38], r8
test r8, r8
jne 0x140010296
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.14000e870
mov rax, qword gs:[0x58]
mov edx, 0x20
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14001060f
xor edx, edx
mov dword [rsp + 0x30], edx
cmp dword [rcx + 4], edx
jbe 0x1400105e3
mov rdi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x48]
mov qword [rsp + 0x160], r13
mov qword [rsp + 0x158], r14
mov r14, qword [rsp + 0x50]
mov qword [rsp + 0x150], r15
mov r15, qword [rsp + 0x60]
nop dword [rax]
nop word [rax + rax]
mov r13d, dword [rcx]
xor ebp, ebp
imul r13d, edx
shl r13d, 2
add r13, r8
test r12, r12
jle 0x1400103a7
lea rdi, [rsi + 0x46c0]
lea rbx, [rsp + 0xa4]
nop dword [rax + rax]
mov r15d, dword [rbx - 8]
mov eax, r15d
mov r14d, dword [rbx]
mov ecx, dword [rbx - 0xc]
sar eax, 1
cmp r14d, eax
jl 0x14001032a
mov r8, qword [rbx - 0x1c]
jmp 0x14001032e
mov r8, qword [rbx - 0x14]
jl 0x140010336
mov rdx, qword [rbx - 0x14]
jmp 0x14001033a
mov rdx, qword [rbx - 0x1c]
mov r9d, dword [rbx - 4]
mov dword [rsp + 0x20], ecx
mov rcx, qword [rdi + 0x28]
call qword [rbx - 0x24]
mov qword [rsp + rbp*8 + 0x48], rax
lea eax, [r14 + 1]
mov dword [rbx], eax
cmp eax, r15d
jl 0x14001037c
inc dword [rbx + 4]
mov eax, dword [rbx + 4]
mov rcx, qword [rbx - 0x14]
mov dword [rbx], 0
mov qword [rbx - 0x1c], rcx
cmp eax, dword [rdi]
jge 0x14001037c
movsxd rax, dword [rdi + 4]
add rax, rcx
mov qword [rbx - 0x14], rax
inc rbp
add rbx, 0x30
add rdi, 0x60
cmp rbp, r12
jl 0x140010310
mov rcx, qword [rsi]
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x48]
mov edx, dword [rsp + 0x30]
mov eax, dword [rcx + 8]
cmp eax, 3
jne 0x140010425
cmp qword [rsp + 0x40], 0
je 0x140010400
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1400105b4
lea rdx, [r13 + 2]
nop word [rax + rax]
movzx eax, byte [r8 + rbx]
mov byte [rdx - 2], al
lea rdx, [rdx + 4]
movzx eax, byte [r8 + r14]
mov byte [rdx - 5], al
movzx eax, byte [r8 + rdi]
inc r8d
mov byte [rdx - 4], al
mov byte [rdx - 3], 0xff
mov rax, qword [rsi]
cmp r8d, dword [rax]
jb 0x1400103d0
jmp 0x1400105b0
mov eax, dword [rcx]
mov r9, rdi
mov rcx, r13
mov dword [rsp + 0x28], 4
mov r8, r14
mov dword [rsp + 0x20], eax
mov rdx, rbx
call qword [rsi + 0x4878]
jmp 0x1400105b0
cmp eax, 4
jne 0x140010575
mov eax, dword [rsi + 0x484c]
test eax, eax
jne 0x1400104bc
xor r10d, r10d
cmp dword [rcx], r10d
jbe 0x1400105b4
lea r9, [r13 + 2]
nop dword [rax]
movzx r8d, byte [r10 + r15]
lea r9, [r9 + 4]
movzx ecx, byte [r10 + rbx]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 6], al
movzx ecx, byte [r10 + r14]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 5], al
movzx ecx, byte [r10 + rdi]
inc r10d
mov byte [r9 - 3], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r9 - 4], al
mov rax, qword [rsi]
cmp r10d, dword [rax]
jb 0x140010450
jmp 0x1400105b0
mov edx, dword [rcx]
mov r9, rdi
mov r10, qword [rsi + 0x4878]
mov r8, r14
mov dword [rsp + 0x28], 4
mov rcx, r13
mov dword [rsp + 0x20], edx
mov rdx, rbx
cmp eax, 2
jne 0x140010570
call r10
mov rax, qword [rsi]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1400105b0
lea r8, [r13 + 2]
nop dword [rax]
movzx edx, byte [r9 + r15]
inc r9d
movzx eax, byte [r8 - 2]
lea r8, [r8 + 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 6], al
movzx eax, byte [r8 - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 5], al
movzx eax, byte [r8 - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [r8 - 4], al
mov rax, qword [rsi]
cmp r9d, dword [rax]
jb 0x140010500
jmp 0x1400105b0
call r10
jmp 0x1400105b0
xor r8d, r8d
cmp dword [rcx], r8d
jbe 0x1400105b4
lea rdx, [r13 + 1]
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rbx]
inc r8d
mov byte [rdx + 1], cl
mov byte [rdx], cl
mov byte [rdx - 1], cl
mov byte [rdx + 2], 0xff
lea rdx, [rdx + 4]
mov rax, qword [rsi]
cmp r8d, dword [rax]
jb 0x140010590
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsi]
inc edx
mov r8, qword [rsp + 0x38]
mov dword [rsp + 0x30], edx
cmp edx, dword [rcx + 4]
jb 0x1400102e0
mov r15, qword [rsp + 0x150]
mov r14, qword [rsp + 0x158]
mov r13, qword [rsp + 0x160]
mov edx, dword [rcx + 8]
xor r8d, r8d
mov rcx, rsi
call fcn.14000e870
mov rax, qword [rsi]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x68]
mov dword [rax], ecx
mov rax, qword [rsi]
mov ecx, dword [rax + 4]
mov rax, qword [rsp + 0x70]
mov dword [rax], ecx
mov rax, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x170]
mov rbp, qword [rsp + 0x178]
mov rbx, qword [rsp + 0x1a8]
mov r12, qword [rsp + 0x168]
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.14005c070
add rsp, 0x180
pop rsi
ret