Function at 0x180026b00
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x138
mov rax, qword [0x180083008]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rdi, rcx
mov r12d, r8d
mov rcx, qword [rcx]
mov rbx, rdx
cmp word [rcx], 1
je 0x180026e0c
mov esi, dword [rcx + 4]
add rsi, qword [rdi + 0x40]
movzx eax, byte [rsi]
cmp eax, r8d
jne 0x180026c4b
movzx ecx, word [rcx + 2]
xor edx, edx
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
div ecx
imul eax, r8d
mov dword [rbx + 8], eax
cmp eax, 0x1000000
jae 0x180026bcb
nop dword [rax]
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180026b89
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180026bb6
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180026b90
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180026b70
mov rax, qword [rdi]
xor r14d, r14d
mov qword [rdi + 0x10], rsi
movzx ecx, word [rax + 2]
movzx eax, byte [rsi + 1]
add eax, eax
cmp eax, ecx
mov rax, qword [rdi]
seta r14b
add dword [rdi + 0x2c], r14d
mov dword [rdi + 0x20], r14d
add word [rax + 2], 4
mov rcx, qword [rdi + 0x10]
movzx eax, byte [rcx + 1]
add eax, 4
mov byte [rcx + 1], al
cmp al, 0x7c
jbe 0x180026c0f
mov rcx, rdi
call fcn.180026130
mov rax, qword [rdi + 0x10]
movzx ecx, word [rax + 4]
movzx eax, word [rax + 2]
shl rcx, 0x10
or rcx, rax
add rcx, qword [rdi + 0x40]
cmp dword [rdi + 0x18], 0
jne 0x180026c3e
cmp rcx, qword [rdi + 0x58]
jbe 0x180026c3e
mov qword [rdi + 8], rcx
mov qword [rdi], rcx
jmp 0x1800272c5
mov rcx, rdi
call fcn.180025c70
jmp 0x1800272c5
mov rdx, qword [rdi]
xor r14d, r14d
mov dword [rdi + 0x20], r14d
movzx r9d, byte [rsi + 1]
movzx ecx, word [rdx]
dec ecx
nop
movzx eax, byte [rsi + 6]
add rsi, 6
cmp eax, r12d
je 0x180026d70
movzx eax, byte [rsi + 1]
add r9d, eax
add ecx, 0xffffffff
jne 0x180026c60
mov rax, qword [rdi + 0x10]
mov r8d, r14d
movzx ecx, byte [rax]
movzx eax, byte [rcx + rdi + 0x3ac]
mov dword [rdi + 0x28], eax
mov edx, r14d
nop word [rax + rax]
lea eax, [rdx + r8]
inc edx
mov qword [rsp + rax*8 + 0x20], 0xffffffffffffffff
cmp edx, 8
jl 0x180026ca0
add r8d, 8
cmp r8d, 0x20
jb 0x180026c92
mov rdx, qword [rdi]
movzx eax, byte [rsi]
movzx ecx, word [rdx]
dec ecx
mov byte [rsp + rax + 0x20], r14b
nop
movzx eax, byte [rsi - 6]
lea rsi, [rsi - 6]
mov byte [rsp + rax + 0x20], r14b
add ecx, 0xffffffff
jne 0x180026cd0
movzx ecx, word [rdx + 2]
xor edx, edx
mov eax, dword [rbx + 8]
mov r8d, ecx
div ecx
sub r8d, r9d
mov ecx, eax
imul eax, r8d
imul ecx, r9d
mov dword [rbx + 8], eax
add qword [rbx], rcx
cmp eax, 0x1000000
jae 0x18002700b
nop
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180026d29
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180026d56
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180026d30
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180026d10
jmp 0x18002700b
movzx ecx, word [rdx + 2]
xor edx, edx
mov eax, dword [rbx + 8]
movzx r8d, byte [rsi + 1]
div ecx
mov ecx, eax
imul eax, r8d
imul ecx, r9d
mov dword [rbx + 8], eax
add qword [rbx], rcx
cmp eax, 0x1000000
jae 0x180026dfb
nop word [rax + rax]
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180026db9
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180026de6
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180026dc0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180026da0
mov rcx, rdi
mov qword [rdi + 0x10], rsi
call fcn.180026330
jmp 0x1800272c5
mov r9, qword [rdi]
mov rax, qword [rdi + 0x10]
lea rbp, [r9 + 2]
mov esi, dword [rdi + 0x2c]
sar esi, 0x1a
and esi, 0x20
movzx ecx, byte [rax]
mov rax, qword [rdi + 0x40]
movzx r8d, byte [rcx + rdi + 0x3ac]
mov dword [rdi + 0x28], r8d
mov ecx, dword [r9 + 8]
movzx eax, word [rcx + rax]
dec eax
cdqe
movzx edx, byte [rax + rdi + 0x2ac]
movzx eax, byte [rbp]
add edx, r8d
movzx ecx, byte [rax + rdi + 0x3ac]
lea eax, [rdx + rcx*2]
add esi, eax
movzx eax, byte [r9 + 3]
add esi, dword [rdi + 0x20]
dec eax
movsxd rcx, eax
movzx eax, byte [rbp]
shl rcx, 6
add rcx, 0x578
add rsi, rcx
mov ecx, dword [rbx + 8]
shr ecx, 0xe
lea rsi, [rdi + rsi*2]
cmp eax, r12d
movzx eax, word [rsi]
jne 0x180026f30
imul ecx, eax
mov dword [rbx + 8], ecx
cmp ecx, 0x1000000
jae 0x180026efb
nop
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180026eb9
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180026ee6
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180026ec0
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180026ea0
movzx ecx, word [rsi]
lea eax, [rcx + 0x20]
shr eax, 7
sub cx, ax
mov eax, 0x80
add cx, ax
mov word [rsi], cx
mov qword [rdi + 0x10], rbp
movzx eax, byte [rbp + 1]
cmp al, 0x80
adc al, 0
mov byte [rbp + 1], al
inc dword [rdi + 0x2c]
mov dword [rdi + 0x20], 1
jmp 0x180026c0f
imul ecx, eax
sub dword [rbx + 8], ecx
mov eax, ecx
add qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jae 0x180026fab
nop dword [rax]
nop dword [rax + rax]
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180026f69
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180026f96
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180026f70
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180026f50
movzx eax, word [rsi]
lea rcx, [0x1800712e0]
add eax, 0x20
shr eax, 7
sub word [rsi], ax
movzx eax, word [rsi]
shr rax, 0xa
xor r14d, r14d
mov r8d, r14d
movzx eax, byte [rax + rcx]
mov dword [rdi + 0x1c], eax
mov edx, r14d
nop word [rax + rax]
lea eax, [rdx + r8]
inc edx
mov qword [rsp + rax*8 + 0x20], 0xffffffffffffffff
cmp edx, 8
jl 0x180026fe0
add r8d, 8
cmp r8d, 0x20
jb 0x180026fd2
movzx eax, byte [rbp]
mov dword [rdi + 0x20], r14d
mov byte [rsp + rax + 0x20], r14b
mov qword [rsp + 0x180], r13
mov r13d, 0x100
mov qword [rsp + 0x130], r15
mov rax, qword [rdi]
mov esi, 0x130
movzx r9d, word [rax]
nop dword [rax]
mov rax, qword [rdi]
inc dword [rdi + 0x18]
cmp dword [rax + 8], 0
je 0x1800272b5
mov r8d, dword [rax + 8]
add r8, qword [rdi + 0x40]
mov qword [rdi], r8
movzx eax, word [r8]
cmp eax, r9d
je 0x180027030
movzx r11d, word [r8]
mov r10d, r11d
sub r10d, r9d
cmp r11w, r13w
je 0x1800270db
mov ecx, dword [r8 + 8]
mov ebp, r14d
mov rax, qword [rdi + 0x40]
movzx edx, word [rcx + rax]
movzx ecx, word [r8 + 2]
sub edx, r11d
imul eax, r11d, 0xb
cmp ecx, eax
lea eax, [r10 - 1]
sbb r8, r8
movzx eax, byte [rax + rdi + 0x1ac]
and r8d, 2
cmp r10d, edx
adc r8, 0
shl rax, 4
add r8, rax
mov eax, 0x12c
cmp r9d, r10d
cmova rax, rsi
add r8, rax
mov eax, dword [rdi + 0x28]
add r8, rax
movzx eax, word [rdi + r8*4]
movzx ecx, byte [rdi + r8*4 + 2]
lea r15, [rdi + r8*4]
mov edx, eax
shr edx, cl
sub ax, dx
test edx, edx
mov word [r15], ax
sete bpl
add ebp, edx
jmp 0x1800270e7
lea r15, [rdi + 0x4ac]
mov ebp, 1
mov rax, qword [rdi]
mov esi, r14d
mov r8d, dword [rax + 4]
add r8, qword [rdi + 0x40]
movzx r9d, word [rax]
nop dword [rax]
movzx eax, byte [r8]
cmp eax, r12d
je 0x1800271b7
movzx ecx, byte [r8 + 1]
lea rdx, [rsp + 0x20]
add rdx, rax
add r8, 6
movsx eax, byte [rdx]
and ecx, eax
mov byte [rdx], 0
add esi, ecx
add r9d, 0xffffffff
jne 0x180027100
mov eax, dword [rbx + 8]
lea ecx, [rsi + rbp]
xor edx, edx
div ecx
mov ecx, eax
imul eax, ebp
imul ecx, esi
mov dword [rbx + 8], eax
add qword [rbx], rcx
cmp eax, 0x1000000
jae 0x1800271ab
nop dword [rax]
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x180027169
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180027196
movzx ecx, byte [rbx + 0xc]
nop dword [rax]
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180027170
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180027150
add bp, si
add word [r15], bp
jmp 0x180027021
mov r10d, esi
mov r14, r8
nop dword [rax]
movzx eax, byte [r8]
lea r8, [r8 + 6]
movsx ecx, byte [rsp + rax + 0x20]
movzx eax, byte [r8 - 5]
and ecx, eax
add esi, ecx
add r9d, 0xffffffff
jne 0x1800271c0
mov eax, dword [rbx + 8]
lea ecx, [rsi + rbp]
movzx r8d, byte [r14 + 1]
xor edx, edx
div ecx
mov ecx, eax
imul eax, r8d
imul ecx, r10d
mov dword [rbx + 8], eax
add qword [rbx], rcx
cmp eax, 0x1000000
jae 0x18002725b
shl dword [rbx + 8], 8
mov ecx, dword [rbx]
cmp ecx, 0xff000000
jb 0x18002721b
mov rax, qword [rbx]
shr rax, 0x20
test eax, eax
je 0x180027246
movzx ecx, byte [rbx + 0xc]
nop
mov rdx, qword [rbx]
mov r8, qword [rbx + 0x18]
shr rdx, 0x20
add dl, cl
mov rcx, r8
call qword [r8]
sub qword [rbx + 0x10], 1
mov cl, 0xff
jne 0x180027220
mov ecx, dword [rbx]
mov eax, ecx
shr eax, 0x18
mov byte [rbx + 0xc], al
inc qword [rbx + 0x10]
shl ecx, 8
mov eax, ecx
mov qword [rbx], rax
cmp dword [rbx + 8], 0x1000000
jb 0x180027202
movzx ecx, byte [r15 + 2]
cmp cl, 7
jae 0x180027281
add byte [r15 + 3], 0xff
jne 0x180027281
shl word [r15], 1
mov eax, 3
shl al, cl
inc cl
mov byte [r15 + 3], al
mov byte [r15 + 2], cl
mov rax, qword [rdi]
mov qword [rdi + 0x10], r14
add word [rax + 2], 4
mov rcx, qword [rdi + 0x10]
movzx eax, byte [rcx + 1]
add eax, 4
mov byte [rcx + 1], al
cmp al, 0x7c
jbe 0x1800272a7
mov rcx, rdi
call fcn.180026130
mov eax, dword [rdi + 0x30]
mov rcx, rdi
mov dword [rdi + 0x2c], eax
call fcn.180025c70
mov r15, qword [rsp + 0x130]
mov r13, qword [rsp + 0x180]
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.18004d010
add rsp, 0x138
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret