Function at 0x140088c7c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x68]
sub rsp, 0x168
mov rax, qword [0x140160188]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov r15d, dword [rbp + 0xd0]
xor edi, edi
mov rax, qword [rcx]
mov rbx, rcx
mov qword [rsp + 0x60], r9
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x50], rdx
mov dword [rax + 8], edi
mov dword [rsp + 0x30], r15d
cmp r15d, 4
ja 0x140089307
call fcn.14008c7a4
test eax, eax
je 0x1400892fd
mov rcx, qword [rbx]
lea esi, [rdi + 1]
lea r8d, [rdi + 3]
mov eax, dword [rcx + 8]
test r15d, r15d
jne 0x140088d01
cmp eax, r8d
mov r15d, esi
cmovge r15d, r8d
mov dword [rsp + 0x30], r15d
cmp eax, r8d
jne 0x140088d28
cmp dword [rbx + 0x4850], r8d
je 0x140088d1f
cmp dword [rbx + 0x484c], edi
jne 0x140088d28
cmp dword [rbx + 0x4848], edi
jne 0x140088d28
mov edx, esi
mov qword [rsp + 0x38], rsi
jmp 0x140088d34
mov qword [rsp + 0x38], rdi
mov edx, edi
cmp eax, r8d
jne 0x140088d41
cmp r15d, r8d
jge 0x140088d41
test edx, edx
jne 0x140088d41
mov eax, esi
jmp 0x140088d49
test eax, eax
jle 0x1400892fd
movsxd r13, eax
xorps xmm0, xmm0
mov qword [rsp + 0x40], r13
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm0
movdqu xmmword [rsp + 0x78], xmm1
test eax, eax
jle 0x140088e51
mov r12, rdi
lea r14, [rbx + 0x46a4]
lea rdi, [rbp - 0x58]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, r8d
call fcn.140090860
mov qword [r14 + 0x44], rax
test rax, rax
je 0x140088e72
mov eax, dword [rbx + 0x4688]
and dword [rdi + 0x10], 0
cdq
idiv dword [r14]
mov r8d, eax
mov dword [rdi], eax
mov eax, dword [rbx + 0x468c]
cdq
idiv dword [r14 + 4]
xor edx, edx
mov ecx, eax
mov dword [rdi + 4], eax
sar ecx, 1
mov r9d, eax
mov dword [rdi + 0xc], ecx
mov rcx, qword [rbx]
mov eax, dword [rcx]
mov rcx, qword [r14 + 0x2c]
dec eax
add eax, r8d
mov qword [rdi - 8], rcx
div r8d
mov qword [rdi - 0x10], rcx
mov dword [rdi + 8], eax
cmp r8d, esi
jne 0x140088e01
cmp r9d, esi
jne 0x140088def
lea rax, [0x140089338]
jmp 0x140088e30
mov r8d, esi
cmp r9d, 2
jne 0x140088e15
lea rax, [0x1400949e4]
jmp 0x140088e30
cmp r8d, 2
jne 0x140088e29
cmp r9d, esi
jne 0x140088e15
lea rax, [0x140094684]
jmp 0x140088e30
cmp r8d, 2
jne 0x140088e29
cmp r9d, r8d
jne 0x140088e29
mov rax, qword [rbx + 0x4880]
jmp 0x140088e30
lea rax, [0x14009464c]
mov qword [rdi - 0x18], rax
add r12, rsi
add rdi, 0x30
add r14, 0x60
mov r8d, 3
cmp r12, r13
jl 0x140088d79
mov rcx, qword [rbx]
mov r8d, dword [rcx + 4]
mov r9d, esi
mov edx, dword [rcx]
mov ecx, r15d
call fcn.1400908a8
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov r12, rax
test rax, rax
jne 0x140088e86
mov rcx, rbx
call fcn.14008a994
lea rcx, str.outofmem
jmp 0x14008930e
mov rcx, qword [rbx]
mov edx, r8d
mov dword [rsp + 0x34], edx
cmp dword [rcx + 4], r8d
jbe 0x1400892bd
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x78]
mov r11, qword [rsp + 0x70]
jmp 0x140088eae
xor r8d, r8d
mov edi, dword [rcx]
imul edi, edx
imul edi, r15d
add rdi, r12
mov r12, r8
cmp qword [rsp + 0x40], r8
jle 0x140088f6e
mov r15, qword [rsp + 0x40]
lea r13, [rbx + 0x46c0]
lea r14, [rbp - 0x4c]
mov eax, dword [r14 - 8]
sar eax, 1
cmp dword [r14], eax
jl 0x140088ee9
mov r8, qword [r14 - 0x1c]
jmp 0x140088eed
mov r8, qword [r14 - 0x14]
jl 0x140088ef5
mov rdx, qword [r14 - 0x14]
jmp 0x140088ef9
mov rdx, qword [r14 - 0x1c]
mov eax, dword [r14 - 0xc]
mov r9d, dword [r14 - 4]
mov rcx, qword [r13 + 0x28]
mov dword [rsp + 0x20], eax
call qword [r14 - 0x24]
mov qword [rsp + r12*8 + 0x68], rax
xor r8d, r8d
mov eax, dword [r14]
inc eax
mov dword [r14], eax
cmp eax, dword [r14 - 8]
jl 0x140088f47
add dword [r14 + 4], esi
mov eax, dword [r14 + 4]
mov rcx, qword [r14 - 0x14]
mov dword [r14], r8d
mov qword [r14 - 0x1c], rcx
cmp eax, dword [r13]
jge 0x140088f47
movsxd rax, dword [r13 + 4]
add rax, rcx
mov qword [r14 - 0x14], rax
add r12, rsi
add r14, 0x30
add r13, 0x60
cmp r12, r15
jl 0x140088ed8
mov rcx, qword [rbx]
mov r14, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x30]
mov r13, qword [rsp + 0x78]
mov r11, qword [rsp + 0x70]
mov eax, 3
cmp r15d, eax
jl 0x140089115
cmp dword [rcx + 8], eax
jne 0x140088ff1
cmp qword [rsp + 0x38], r8
je 0x140088fc5
cmp dword [rcx], 0
jbe 0x140088fe9
movsxd r10, r15d
mov r9d, r8d
xor edx, edx
mov al, byte [r9 + r14]
mov byte [rdi], al
mov rax, qword [rsp + rdx*8 + 0x70]
mov cl, byte [r9 + rax]
mov byte [rdi + rdx + 1], cl
add rdx, rsi
cmp rdx, 2
jl 0x140088f9b
mov byte [rdi + 3], 0xff
add r8d, esi
mov rax, qword [rbx]
add rdi, r10
cmp r8d, dword [rax]
jb 0x140088f90
jmp 0x140088fe9
mov eax, dword [rcx]
mov r9, r13
mov r8, qword [rsp + 0x70]
mov rcx, rdi
mov dword [rsp + 0x28], r15d
mov rdx, r14
mov dword [rsp + 0x20], eax
call qword [rbx + 0x4878]
mov r11, qword [rsp + 0x70]
mov rcx, qword [rbx]
jmp 0x1400892a5
cmp dword [rcx + 8], 4
jne 0x1400890e3
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x14008905c
mov r10d, r8d
cmp dword [rcx], r8d
jbe 0x140088fe9
movsxd r11, r15d
mov r15, qword [rsp + 0x70]
mov rax, qword [rbp - 0x80]
mov r9d, r10d
mov dl, byte [r9 + rax]
mov cl, byte [r9 + r14]
call fcn.1400896b0
mov byte [rdi], al
mov cl, byte [r9 + r15]
call fcn.1400896b0
mov byte [rdi + 1], al
mov cl, byte [r9 + r13]
call fcn.1400896b0
mov byte [rdi + 2], al
add r10d, esi
mov byte [rdi + 3], 0xff
add rdi, r11
mov rax, qword [rbx]
cmp r10d, dword [rax]
jb 0x140089015
mov r15d, dword [rsp + 0x30]
jmp 0x140088fe4
mov edx, dword [rcx]
mov r9, r13
mov r10, qword [rbx + 0x4878]
mov rcx, rdi
mov r8, qword [rsp + 0x70]
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], edx
mov rdx, r14
cmp eax, 2
jne 0x1400890db
call r10
mov rax, qword [rbx]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x140088fe4
mov r13, qword [rbp - 0x80]
movsxd r10, r15d
mov cl, byte [rdi]
mov dl, byte [r9 + r13]
not cl
call fcn.1400896b0
mov cl, byte [rdi + 1]
not cl
mov byte [rdi], al
call fcn.1400896b0
mov cl, byte [rdi + 2]
not cl
mov byte [rdi + 1], al
call fcn.1400896b0
mov byte [rdi + 2], al
add r9d, esi
mov rax, qword [rbx]
add rdi, r10
cmp r9d, dword [rax]
jb 0x14008909a
mov r13, qword [rsp + 0x78]
jmp 0x140088fe4
call r10
jmp 0x140088fe4
mov edx, r8d
cmp dword [rcx], r8d
jbe 0x140088fe9
movsxd r8, r15d
mov eax, edx
add edx, esi
mov cl, byte [rax + r14]
mov byte [rdi + 2], cl
mov byte [rdi + 1], cl
mov byte [rdi], cl
mov byte [rdi + 3], 0xff
add rdi, r8
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x1400890f2
jmp 0x140088fe9
cmp qword [rsp + 0x38], r8
je 0x140089193
mov eax, dword [rcx]
mov r9d, r8d
cmp r15d, esi
jne 0x14008915a
test eax, eax
je 0x1400892a5
mov eax, r9d
movzx r8d, byte [rax + r13]
movzx edx, byte [rax + r11]
movzx ecx, byte [rax + r14]
call fcn.14008ad78
mov byte [rdi], al
add r9d, esi
mov rcx, qword [rbx]
add rdi, rsi
cmp r9d, dword [rcx]
jb 0x14008912e
jmp 0x1400892a5
test eax, eax
je 0x1400892a5
mov eax, r9d
movzx r8d, byte [rax + r13]
movzx edx, byte [rax + r11]
movzx ecx, byte [rax + r14]
call fcn.14008ad78
mov byte [rdi], al
add r9d, esi
mov byte [rdi + 1], 0xff
lea rdi, [rdi + 2]
mov rcx, qword [rbx]
cmp r9d, dword [rcx]
jb 0x140089162
jmp 0x1400892a5
cmp dword [rcx + 8], 4
jne 0x140089265
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x140089224
mov r12d, r8d
cmp dword [rcx], r8d
jbe 0x1400892a5
movsxd r13, r15d
mov r15, qword [rsp + 0x78]
mov rax, qword [rbp - 0x80]
mov r11d, r12d
mov dl, byte [r11 + rax]
mov cl, byte [r11 + r15]
call fcn.1400896b0
movzx r10d, al
mov rax, qword [rsp + 0x70]
mov cl, byte [r11 + rax]
call fcn.1400896b0
mov cl, byte [r11 + r14]
movzx r9d, al
call fcn.1400896b0
movzx ecx, al
mov r8d, r10d
mov edx, r9d
call fcn.14008ad78
mov byte [rdi], al
add r12d, esi
mov byte [rdi + 1], 0xff
add rdi, r13
mov rcx, qword [rbx]
cmp r12d, dword [rcx]
jb 0x1400891bb
mov r15d, dword [rsp + 0x30]
mov r13, qword [rsp + 0x78]
mov r11, qword [rsp + 0x70]
jmp 0x1400892a5
cmp eax, 2
jne 0x140089265
mov r9d, r8d
cmp dword [rcx], r8d
jbe 0x1400892a5
mov r13, qword [rbp - 0x80]
movsxd r10, r15d
mov eax, r9d
mov cl, byte [rax + r14]
mov dl, byte [rax + r13]
not cl
call fcn.1400896b0
mov byte [rdi], al
add r9d, esi
mov byte [rdi + 1], 0xff
add rdi, r10
mov rcx, qword [rbx]
cmp r9d, dword [rcx]
jb 0x140089238
mov r13, qword [rsp + 0x78]
jmp 0x1400892a5
mov eax, dword [rcx]
mov edx, r8d
cmp r15d, esi
jne 0x140089287
test eax, eax
je 0x1400892a5
mov ecx, edx
add edx, esi
mov al, byte [rcx + r14]
mov byte [rcx + rdi], al
mov rcx, qword [rbx]
cmp edx, dword [rcx]
jb 0x140089273
jmp 0x1400892a5
test eax, eax
je 0x1400892a5
mov eax, edx
add edx, esi
mov cl, byte [rax + r14]
mov byte [rdi], cl
add rdi, rsi
mov byte [rdi], 0xff
add rdi, rsi
mov rcx, qword [rbx]
cmp edx, dword [rcx]
jb 0x14008928b
mov edx, dword [rsp + 0x34]
mov r12, qword [rsp + 0x48]
add edx, esi
mov dword [rsp + 0x34], edx
cmp edx, dword [rcx + 4]
jb 0x140088eab
mov rcx, rbx
call fcn.14008a994
mov rax, qword [rbx]
mov ecx, dword [rax]
mov rax, qword [rsp + 0x50]
mov dword [rax], ecx
mov rax, qword [rbx]
mov ecx, dword [rax + 4]
mov rax, qword [rsp + 0x58]
mov dword [rax], ecx
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400892f8
mov rax, qword [rbx]
mov edx, 3
cmp dword [rax + 8], edx
cmovge esi, edx
mov dword [rcx], esi
mov rax, r12
jmp 0x140089315
mov rcx, rbx
call fcn.14008a994
jmp 0x140089313
lea rcx, str.bad_req_comp
call fcn.14008caa4
xor eax, eax
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.1400ce670
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret