Function at 0x1802915e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rdi
sub rsp, 0x20
mov r8, qword [rcx + 0x38]
mov rdi, rcx
mov eax, dword [rcx + 0x60]
mov qword [rsp + 0x30], rbx
add rax, r8
mov rbx, qword [rcx + 8]
mov qword [rsp + 0x40], rsi
mov rsi, rdx
mov qword [rcx + 0x50], rax
cmp rbx, rdx
je 0x1802916d8
mov qword [rsp + 0x38], rbp
mov ebp, 8
nop dword [rax + rax]
movzx eax, byte [rbx]
sub al, 1
mov byte [rbx], al
jne 0x1802916a7
movzx eax, byte [rbx + 1]
xor ecx, ecx
mov edx, dword [rbx + 4]
add rdx, qword [rdi + 0x38]
cmp byte [rdx], 0x40
cmovae ecx, ebp
and al, 0x10
add cl, al
mov byte [rbx + 1], cl
mov eax, dword [rdx]
mov dword [rbx + 2], eax
movzx eax, word [rdx + 4]
mov word [rbx + 6], ax
mov rax, qword [rdi + 0x58]
cmp rdx, rax
je 0x180291690
mov dword [rdx], 0xffffffff
mov eax, dword [rdi + 0x128]
mov dword [rdx + 4], eax
movzx eax, byte [rdi + 0x80]
mov dword [rdx + 8], eax
sub edx, dword [rdi + 0x38]
inc dword [rdi + 0x1c0]
mov dword [rdi + 0x128], edx
movzx eax, byte [rbx + 3]
add eax, 0xb
shr eax, 3
mov byte [rbx + 3], al
jmp 0x1802916c0
add rax, 0xc
mov qword [rdi + 0x58], rax
movzx eax, byte [rbx + 3]
add eax, 0xb
shr eax, 3
mov byte [rbx + 3], al
jmp 0x1802916c0
movzx r8d, al
xor r9d, r9d
add r8d, 3
mov rdx, rbx
shr r8d, 1
mov rcx, rdi
call fcn.180290ea0
mov r8, qword [rdi + 0x38]
mov ebx, dword [rbx + 8]
add rbx, r8
cmp rbx, rsi
jne 0x180291620
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
cmp rbx, qword [rdi]
je 0x180291737
movzx eax, byte [rbx]
test al, al
jne 0x1802916f9
movzx ecx, byte [rbx + 3]
movzx eax, cl
shr al, 1
sub cl, al
mov byte [rbx + 3], cl
jmp 0x180291728
add word [rbx + 2], 4
mov r8d, eax
movzx ecx, word [rbx + 2]
lea eax, [rax*4 + 0x80]
cmp ecx, eax
jbe 0x180291728
add r8d, 2
mov r9d, 1
shr r8d, 1
mov rdx, rbx
mov rcx, rdi
call fcn.180290ea0
mov r8, qword [rdi + 0x38]
mov ebx, dword [rbx + 8]
add rbx, r8
cmp rbx, qword [rdi]
jne 0x1802916e2
cmp dword [rdi + 0x64], 0
mov rbx, qword [rsp + 0x30]
je 0x1802917af
mov rcx, rdi
call fcn.180290770
mov ecx, dword [rdi + 0x30]
shr ecx, 1
cmp eax, ecx
jb 0x1802917af
mov rax, qword [rdi + 8]
cmp dword [rax + 8], 0
je 0x180291770
nop dword [rax]
mov eax, dword [rax + 8]
add rax, r8
mov qword [rdi + 8], rax
cmp dword [rax + 8], 0
jne 0x180291760
mov rdx, qword [rdi + 8]
xor r8d, r8d
mov rcx, rdi
call fcn.180290230
mov rcx, rdi
call fcn.1802905c0
mov rcx, rdi
call fcn.180290770
mov ecx, dword [rdi + 0x30]
shr ecx, 2
lea ecx, [rcx + rcx*2]
cmp eax, ecx
ja 0x180291770
mov eax, dword [rdi + 0x24]
mov dword [rdi + 0x18], eax
mov dword [rdi + 0x34], 0
add rsp, 0x20
pop rdi
ret
mov rcx, rdi
add rsp, 0x20
pop rdi
jmp fcn.180291230
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x38
xor edi, edi
mov rbx, rcx
mov rcx, qword [rcx + 0x10]
mov r10d, edi
movzx r14d, byte [rcx + 1]
movzx r15d, word [rcx + 4]
movzx eax, word [rcx + 2]
movzx r12d, byte [rcx]
shl r15d, 0x10
or r15d, eax
mov dword [rsp + 0x88], r14d
cmp r14b, 0x1f
jae 0x180291a63
mov rax, qword [rbx]
mov ecx, dword [rax + 8]
test ecx, ecx
je 0x180291a63
mov rax, qword [rbx + 0x38]
cmp byte [rax + rcx], dil
lea r8, [rax + rcx]
jne 0x180291a06
movzx eax, byte [r8 + 3]
lea r10, [r8 + 2]
cmp al, 0x20
jae 0x180291a63
inc al
mov byte [r10 + 1], al
jmp 0x180291a63
mov r10d, dword [r8 + 4]
add r10, rax
cmp byte [r10], r12b
je 0x180291a4e
mov r9, r10
add r10, 6
cmp byte [r10], r12b
jne 0x180291a12
movzx eax, byte [r10 - 5]
cmp byte [r10 + 1], al
jb 0x180291a4e
mov eax, dword [r10 - 6]
mov ecx, dword [r10]
movzx edx, word [r10 + 4]
mov dword [r10], eax
movzx eax, word [r10 - 2]
mov word [r10 + 4], ax
mov dword [r10 - 6], ecx
mov word [r10 - 2], dx
mov r10, r9
movzx eax, byte [r10 + 1]
cmp al, 0x73
jae 0x180291a63
add al, 2
mov byte [r10 + 1], al
add word [r8 + 2], 2
mov rsi, qword [rbx + 8]
cmp dword [rbx + 0x18], edi
jne 0x180291acb
test r15d, r15d
je 0x180291acb
mov r9, qword [rbx]
mov r8, r10
mov edx, 1
mov rcx, rbx
call fcn.18028ffb0
mov rcx, qword [rbx + 0x10]
mov rdx, rax
test rax, rax
jne 0x180291aab
mov dword [rcx + 2], edi
mov rdx, rsi
mov rcx, rbx
add rsp, 0x38
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
jmp 0x1802915e0
sub eax, dword [rbx + 0x38]
mov word [rcx + 2], ax
shr eax, 0x10
mov word [rcx + 4], ax
mov qword [rbx + 8], rdx
add rsp, 0x38
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rbx + 0x10]
mov rcx, qword [rbx + 0x50]
movzx eax, byte [rax]
mov byte [rcx], al
inc qword [rbx + 0x50]
mov rax, qword [rbx + 0x50]
mov rcx, qword [rbx + 0x58]
mov r11d, eax
sub r11d, dword [rbx + 0x38]
mov dword [rsp + 0x70], r11d
cmp rax, rcx
jae 0x180291a93
test r15d, r15d
jne 0x180291b16
mov r8, qword [rbx]
mov rdx, r10
mov rcx, rbx
call fcn.180290d10
mov r15, rax
test rax, rax
je 0x180291a93
sub r15d, dword [rbx + 0x38]
jmp 0x180291b41
mov eax, r15d
add rax, qword [rbx + 0x38]
cmp rax, rcx
jae 0x180291b46
mov r9, qword [rbx]
mov r8, r10
xor edx, edx
mov rcx, rbx
call fcn.18028ffb0
test rax, rax
je 0x180291a93
sub eax, dword [rbx + 0x38]
mov r15d, eax
mov r11d, dword [rsp + 0x70]
add dword [rbx + 0x18], 0xffffffff
mov rcx, qword [rbx]
mov qword [rsp + 0x28], r13
jne 0x180291b6a
cmp qword [rbx + 8], rcx
mov rax, rdi
mov r11d, r15d
mov dword [rsp + 0x70], r15d
setne al
sub qword [rbx + 0x50], rax
movzx r13d, byte [rcx]
mov eax, 8
movzx r9d, word [rcx + 2]
sub r9d, r13d
mov qword [rsp + 0x30], rbp
sub r9d, r14d
cmp r12b, 0x40
mov dword [rsp + 0x78], r9d
cmovae edi, eax
mov dword [rsp + 0x80], edi
cmp rsi, rcx
je 0x180291e42
nop
movzx ebp, byte [rsi]
test ebp, ebp
je 0x180291cda
test bpl, 1
je 0x180291cbe
lea edi, [rbp + 1]
shr edi, 1
movzx ecx, byte [rdi + rbx + 0xa6]
lea eax, [rdi - 1]
movzx r14d, byte [rax + rbx + 0xa6]
cmp r14d, ecx
je 0x180291caf
lea edx, [r14 + 1]
mov eax, dword [rbx + rdx*4 + 0x128]
test eax, eax
je 0x180291c01
mov r8d, eax
add r8, qword [rbx + 0x38]
mov eax, dword [r8 + 4]
dec dword [rbx + rdx*4 + 0x1c0]
mov dword [rbx + rdx*4 + 0x128], eax
jmp 0x180291c38
movzx eax, byte [rdx + rbx + 0x80]
lea ecx, [rax + rax*2]
mov eax, dword [rbx + 0x48]
sub eax, dword [rbx + 0x40]
shl ecx, 2
cmp ecx, eax
ja 0x180291c28
mov r8, qword [rbx + 0x40]
mov eax, ecx
add rax, r8
mov qword [rbx + 0x40], rax
jmp 0x180291c38
mov rcx, rbx
call fcn.18028fec0
mov r11d, dword [rsp + 0x70]
mov r8, rax
test r8, r8
je 0x180291e68
mov r9d, dword [rsi + 4]
lea rdx, [r8 + 8]
add r9, qword [rbx + 0x38]
mov rcx, r9
mov eax, dword [rcx]
lea rcx, [rcx + 0xc]
mov dword [rdx - 8], eax
lea rdx, [rdx + 0xc]
mov eax, dword [rcx - 8]
mov dword [rdx - 0x10], eax
mov eax, dword [rcx - 4]
mov dword [rdx - 0xc], eax
add edi, 0xffffffff
jne 0x180291c50
mov dword [r9], 0xffffffff
mov eax, dword [rbx + r14*4 + 0x128]
mov dword [r9 + 4], eax
movzx eax, byte [r14 + rbx + 0x80]
mov dword [r9 + 8], eax
sub r9d, dword [rbx + 0x38]
inc dword [rbx + r14*4 + 0x1c0]
mov dword [rbx + r14*4 + 0x128], r9d
sub r8d, dword [rbx + 0x38]
mov r9d, dword [rsp + 0x78]
mov dword [rsi + 4], r8d
mov r14d, dword [rsp + 0x88]
mov edi, dword [rsp + 0x80]
lea eax, [rbp*2 + 1]
add eax, ebp
cmp eax, r13d
adc word [rsi + 2], 0
movzx edx, word [rsi + 2]
xor ecx, ecx
jmp 0x180291d80
mov eax, dword [rbx + 0x128]
test eax, eax
je 0x180291cfb
mov edx, eax
add rdx, qword [rbx + 0x38]
mov eax, dword [rdx + 4]
dec dword [rbx + 0x1c0]
mov dword [rbx + 0x128], eax
jmp 0x180291d38
movzx eax, byte [rbx + 0x80]
lea ecx, [rax + rax*2]
mov eax, dword [rbx + 0x48]
sub eax, dword [rbx + 0x40]
shl ecx, 2
cmp ecx, eax
ja 0x180291d21
mov rdx, qword [rbx + 0x40]
mov eax, ecx
add rax, rdx
mov qword [rbx + 0x40], rax
jmp 0x180291d38
xor edx, edx
mov rcx, rbx
call fcn.18028fec0
mov r9d, dword [rsp + 0x78]
mov rdx, rax
mov r11d, dword [rsp + 0x70]
test rdx, rdx
je 0x180291e68
mov ecx, dword [rsi + 2]
mov dword [rdx], ecx
movzx ecx, word [rsi + 6]
mov word [rdx + 4], cx
mov ecx, edx
sub ecx, dword [rbx + 0x38]
mov dword [rsi + 4], ecx
movzx eax, byte [rdx + 1]
cmp al, 0x1e
jae 0x180291d62
add al, al
jmp 0x180291d64
mov al, 0x78
mov byte [rdx + 1], al
xor ecx, ecx
cmp r13d, 2
movzx eax, al
mov edx, ecx
seta dl
add dx, word [rbx + 0x1c]
add dx, ax
mov word [rsi + 2], dx
movzx eax, dx
mov r10d, ecx
add r9d, eax
lea r8d, [rax + 6]
imul r8d, r14d
lea eax, [r9 + r9*2]
add eax, eax
add r8d, r8d
cmp r8d, eax
jae 0x180291dc2
lea eax, [r9*4]
cmp r8d, eax
mov eax, ecx
setae r10b
cmp r8d, r9d
seta al
inc eax
add r10d, eax
mov eax, 4
jmp 0x180291df3
imul eax, r9d, 0xf
cmp r8d, eax
lea eax, [r9 + r9*8]
seta r10b
cmp r8d, eax
lea eax, [r9 + r9*2]
seta cl
shl eax, 2
add ecx, 4
add r10d, ecx
xor ecx, ecx
cmp r8d, eax
seta cl
add r10d, ecx
movzx eax, r10w
mov r9d, dword [rsp + 0x78]
add dx, ax
mov word [rsi + 2], dx
lea rax, [rbp + 1]
lea rcx, [rax + rax*2]
inc bpl
mov eax, dword [rsi + 4]
lea rdx, [rax + rcx*2]
mov eax, r11d
add rdx, qword [rbx + 0x38]
shr eax, 0x10
mov word [rdx + 2], r11w
mov word [rdx + 4], ax
mov byte [rdx], r12b
mov byte [rdx + 1], r10b
or byte [rsi + 1], dil
mov byte [rsi], bpl
mov esi, dword [rsi + 8]
add rsi, qword [rbx + 0x38]
cmp rsi, qword [rbx]
jne 0x180291ba0
mov edx, r15d
add rdx, qword [rbx + 0x38]
mov qword [rbx], rdx
mov qword [rbx + 8], rdx
mov rbp, qword [rsp + 0x30]
mov r13, qword [rsp + 0x28]
add rsp, 0x38
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rdx, rsi
mov rcx, rbx
call 0x1802915e0
jmp 0x180291e50