Function at 0x1400fbf54
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 [0x1402126b0]
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 0x1400fc5d6
call fcn.1400ff950
test eax, eax
jne 0x1400fbfc1
mov rcx, rbx
call fcn.1400fdbdc
jmp 0x1400fc5e2
mov rcx, qword [rbx]
mov esi, 1
mov eax, dword [rcx + 8]
lea r8d, [rsi + 2]
test r15d, r15d
jne 0x1400fbfe4
cmp eax, r8d
mov r15d, esi
cmovge r15d, r8d
mov dword [rsp + 0x30], r15d
cmp eax, r8d
jne 0x1400fc00b
cmp dword [rbx + 0x4850], r8d
je 0x1400fc002
cmp dword [rbx + 0x484c], edi
jne 0x1400fc00b
cmp dword [rbx + 0x4848], edi
jne 0x1400fc00b
mov edx, esi
mov qword [rsp + 0x38], rsi
jmp 0x1400fc017
mov qword [rsp + 0x38], rdi
mov edx, edi
cmp eax, r8d
jne 0x1400fc022
cmp r15d, r8d
jge 0x1400fc022
test edx, edx
jne 0x1400fc022
mov eax, esi
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 0x1400fc12a
mov r12, rdi
lea r14, [rbx + 0x46a4]
lea rdi, [rbp - 0x58]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, r8d
call fcn.140103944
mov qword [r14 + 0x44], rax
test rax, rax
je 0x1400fc14b
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 0x1400fc0da
cmp r9d, esi
jne 0x1400fc0c8
lea rax, [0x1400fc604]
jmp 0x1400fc109
mov r8d, esi
cmp r9d, 2
jne 0x1400fc0ee
lea rax, [0x140107974]
jmp 0x1400fc109
cmp r8d, 2
jne 0x1400fc102
cmp r9d, esi
jne 0x1400fc0ee
lea rax, [0x140107614]
jmp 0x1400fc109
cmp r8d, 2
jne 0x1400fc102
cmp r9d, r8d
jne 0x1400fc102
mov rax, qword [rbx + 0x4880]
jmp 0x1400fc109
lea rax, [0x1401075dc]
mov qword [rdi - 0x18], rax
add r12, rsi
add rdi, 0x30
add r14, 0x60
mov r8d, 3
cmp r12, r13
jl 0x1400fc052
mov rcx, qword [rbx]
mov r8d, dword [rcx + 4]
mov r9d, esi
mov edx, dword [rcx]
mov ecx, r15d
call fcn.14010398c
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov r12, rax
test rax, rax
jne 0x1400fc15f
mov rcx, rbx
call fcn.1400fdbdc
lea rcx, str.outofmem
jmp 0x1400fc5dd
mov rcx, qword [rbx]
mov edx, r8d
mov dword [rsp + 0x34], edx
cmp dword [rcx + 4], r8d
jbe 0x1400fc596
mov r14, qword [rsp + 0x68]
mov r13, qword [rsp + 0x78]
mov r11, qword [rsp + 0x70]
jmp 0x1400fc187
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 0x1400fc247
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 0x1400fc1c2
mov r8, qword [r14 - 0x1c]
jmp 0x1400fc1c6
mov r8, qword [r14 - 0x14]
jl 0x1400fc1ce
mov rdx, qword [r14 - 0x14]
jmp 0x1400fc1d2
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 0x1400fc220
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 0x1400fc220
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 0x1400fc1b1
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 0x1400fc3ee
cmp dword [rcx + 8], eax
jne 0x1400fc2ca
cmp qword [rsp + 0x38], r8
je 0x1400fc29e
cmp dword [rcx], 0
jbe 0x1400fc2c2
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 0x1400fc274
mov byte [rdi + 3], 0xff
add r8d, esi
mov rax, qword [rbx]
add rdi, r10
cmp r8d, dword [rax]
jb 0x1400fc269
jmp 0x1400fc2c2
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 0x1400fc57e
cmp dword [rcx + 8], 4
jne 0x1400fc3bc
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x1400fc335
mov r10d, r8d
cmp dword [rcx], r8d
jbe 0x1400fc2c2
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.1400fc97c
mov byte [rdi], al
mov cl, byte [r9 + r15]
call fcn.1400fc97c
mov byte [rdi + 1], al
mov cl, byte [r9 + r13]
call fcn.1400fc97c
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 0x1400fc2ee
mov r15d, dword [rsp + 0x30]
jmp 0x1400fc2bd
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 0x1400fc3b4
call r10
mov rax, qword [rbx]
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1400fc2bd
mov r13, qword [rbp - 0x80]
movsxd r10, r15d
mov cl, byte [rdi]
mov dl, byte [r9 + r13]
not cl
call fcn.1400fc97c
mov cl, byte [rdi + 1]
not cl
mov byte [rdi], al
call fcn.1400fc97c
mov cl, byte [rdi + 2]
not cl
mov byte [rdi + 1], al
call fcn.1400fc97c
mov byte [rdi + 2], al
add r9d, esi
mov rax, qword [rbx]
add rdi, r10
cmp r9d, dword [rax]
jb 0x1400fc373
mov r13, qword [rsp + 0x78]
jmp 0x1400fc2bd
call r10
jmp 0x1400fc2bd
mov edx, r8d
cmp dword [rcx], r8d
jbe 0x1400fc2c2
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 0x1400fc3cb
jmp 0x1400fc2c2
cmp qword [rsp + 0x38], r8
je 0x1400fc46c
mov eax, dword [rcx]
mov r9d, r8d
cmp r15d, esi
jne 0x1400fc433
test eax, eax
je 0x1400fc57e
mov eax, r9d
movzx r8d, byte [rax + r13]
movzx edx, byte [rax + r11]
movzx ecx, byte [rax + r14]
call fcn.1400fdfac
mov byte [rdi], al
add r9d, esi
mov rcx, qword [rbx]
add rdi, rsi
cmp r9d, dword [rcx]
jb 0x1400fc407
jmp 0x1400fc57e
test eax, eax
je 0x1400fc57e
mov eax, r9d
movzx r8d, byte [rax + r13]
movzx edx, byte [rax + r11]
movzx ecx, byte [rax + r14]
call fcn.1400fdfac
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 0x1400fc43b
jmp 0x1400fc57e
cmp dword [rcx + 8], 4
jne 0x1400fc53e
mov eax, dword [rbx + 0x484c]
test eax, eax
jne 0x1400fc4fd
mov r12d, r8d
cmp dword [rcx], r8d
jbe 0x1400fc57e
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.1400fc97c
movzx r10d, al
mov rax, qword [rsp + 0x70]
mov cl, byte [r11 + rax]
call fcn.1400fc97c
mov cl, byte [r11 + r14]
movzx r9d, al
call fcn.1400fc97c
movzx ecx, al
mov r8d, r10d
mov edx, r9d
call fcn.1400fdfac
mov byte [rdi], al
add r12d, esi
mov byte [rdi + 1], 0xff
add rdi, r13
mov rcx, qword [rbx]
cmp r12d, dword [rcx]
jb 0x1400fc494
mov r15d, dword [rsp + 0x30]
mov r13, qword [rsp + 0x78]
mov r11, qword [rsp + 0x70]
jmp 0x1400fc57e
cmp eax, 2
jne 0x1400fc53e
mov r9d, r8d
cmp dword [rcx], r8d
jbe 0x1400fc57e
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.1400fc97c
mov byte [rdi], al
add r9d, esi
mov byte [rdi + 1], 0xff
add rdi, r10
mov rcx, qword [rbx]
cmp r9d, dword [rcx]
jb 0x1400fc511
mov r13, qword [rsp + 0x78]
jmp 0x1400fc57e
mov eax, dword [rcx]
mov edx, r8d
cmp r15d, esi
jne 0x1400fc560
test eax, eax
je 0x1400fc57e
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 0x1400fc54c
jmp 0x1400fc57e
test eax, eax
je 0x1400fc57e
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 0x1400fc564
mov edx, dword [rsp + 0x34]
mov r12, qword [rsp + 0x48]
add edx, esi
mov dword [rsp + 0x34], edx
cmp edx, dword [rcx + 4]
jb 0x1400fc184
mov rcx, rbx
call fcn.1400fdbdc
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 0x1400fc5d1
mov rax, qword [rbx]
mov edx, 3
cmp dword [rax + 8], edx
cmovge esi, edx
mov dword [rcx], esi
mov rax, r12
jmp 0x1400fc5e4
lea rcx, str.bad_req_comp
call fcn.1400ffc38
xor eax, eax
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140138320
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret