Function at 0x1400f57e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov rax, qword [rcx + 0xb8]
mov r15, r9
mov r13, r8
mov rbx, rcx
cmp rax, qword [rcx + 0xc0]
jae 0x1400f5824
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5847
cmp dword [rcx + 0x30], 0
je 0x1400f5845
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5847
xor cl, cl
movzx eax, cl
mov dword [rsp + 0x58], eax
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f586d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5893
cmp dword [rbx + 0x30], 0
je 0x1400f5891
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5893
xor cl, cl
movzx eax, cl
mov dword [rsp + 0x38], eax
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f58b9
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f58df
cmp dword [rbx + 0x30], 0
je 0x1400f58dd
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f58df
xor cl, cl
movzx ebp, cl
xor esi, esi
mov rcx, rbx
mov dword [rsp + 0xe8], esi
call fcn.1400eb400
mov rcx, rbx
mov dword [rsp + 0x60], eax
call fcn.1400eb400
mov rcx, qword [rbx + 0xb8]
mov dword [rsp + 0x3c], eax
cmp rcx, qword [rbx + 0xc0]
jae 0x1400f5922
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xb8], rcx
jmp 0x1400f5947
cmp dword [rbx + 0x30], esi
je 0x1400f5945
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5947
xor dl, dl
mov rcx, rbx
movzx r14d, dl
call fcn.1400eb400
mov rcx, rbx
call fcn.1400eb400
mov rcx, rbx
call fcn.1400eb400
mov rcx, rbx
mov dword [rsp + 0x30], eax
call fcn.1400eb400
mov rcx, qword [rbx + 0xb8]
mov dword [rsp + 0x34], eax
cmp rcx, qword [rbx + 0xc0]
jae 0x1400f5992
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xb8], rcx
jmp 0x1400f59b7
cmp dword [rbx + 0x30], esi
je 0x1400f59b5
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f59b7
xor dl, dl
mov rax, qword [rbx + 0xb8]
movzx edx, dl
mov dword [rsp + 0x48], edx
cmp rax, qword [rbx + 0xc0]
jae 0x1400f59dd
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5a06
cmp dword [rbx + 0x30], esi
je 0x1400f5a04
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
mov edx, dword [rsp + 0x48]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5a06
xor cl, cl
movzx eax, cl
mov r12d, esi
xor ecx, ecx
mov qword [rsp + 0x68], rsi
mov byte [rsp + 0xc0], sil
mov word [rsp + 0xc1], cx
mov byte [rsp + 0xc3], cl
lea edi, [rcx + 1]
cmp ebp, 8
jb 0x1400f5a3c
sub ebp, 8
mov dword [rsp + 0xe8], edi
shr eax, 5
mov ecx, edi
and eax, edi
mov dword [rsp + 0xe0], esi
sub ecx, eax
mov dword [rsp + 0x4c], ecx
cmp dword [rsp + 0x38], esi
je 0x1400f5a73
mov ecx, r14d
sub ecx, 8
je 0x1400f5acb
sub ecx, 7
je 0x1400f5abc
sub ecx, edi
je 0x1400f5abc
sub ecx, 8
je 0x1400f5a90
cmp ecx, 8
jne 0x1400f5a99
jmp 0x1400f5a90
mov ecx, edx
sub ecx, 8
je 0x1400f5acb
sub ecx, 7
je 0x1400f5abc
sub ecx, edi
je 0x1400f5ab1
sub ecx, 8
je 0x1400f5a8d
cmp ecx, 8
jne 0x1400f5a99
mov r14d, edx
shr r14d, 3
test r14d, r14d
jne 0x1400f5ace
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1400f6122
cmp ebp, 3
jne 0x1400f5abc
lea r14d, [rbp - 1]
jmp 0x1400f5ace
mov r14d, 3
mov dword [rsp + 0xe0], edi
jmp 0x1400f5ace
mov r14d, edi
mov rax, qword [rsp + 0xc8]
mov r10d, dword [rsp + 0x30]
mov dword [rax], r10d
mov eax, dword [rsp + 0x34]
mov dword [r13], eax
test r15, r15
je 0x1400f5aee
mov dword [r15], r14d
test r10d, r10d
js 0x1400f610f
mov r13d, eax
test eax, eax
js 0x1400f610f
test eax, eax
je 0x1400f5b1f
mov eax, 0x7fffffff
mov ecx, esi
cdq
idiv r13d
cmp r10d, eax
setle cl
test ecx, ecx
je 0x1400f610f
mov r8d, r13d
imul r8d, r10d
mov dword [rsp + 0x50], r8d
test r8d, r8d
js 0x1400f610f
xor edx, edx
mov eax, 0x7fffffff
div r14d
mov ecx, esi
cmp r8d, eax
mov ebp, eax
setle cl
test ecx, ecx
je 0x1400f610f
xor r9d, r9d
mov r8d, r14d
mov edx, r13d
mov ecx, r10d
call fcn.1400ea950
test eax, eax
je 0x1400f60fa
mov eax, r14d
imul eax, r13d
imul eax, dword [rsp + 0x30]
movsxd rcx, eax
call fcn.14027bdf8
mov qword [rsp + 0x40], rax
mov r15, rax
test rax, rax
je 0x1400f60fa
mov edx, dword [rsp + 0x58]
mov rcx, rbx
call fcn.1400eb1f0
cmp dword [rsp + 0x38], esi
jne 0x1400f5c15
mov ecx, dword [rsp + 0xe8]
test ecx, ecx
jne 0x1400f5d17
mov eax, dword [rsp + 0xe0]
test eax, eax
jne 0x1400f5d17
test r13d, r13d
jle 0x1400f6096
mov ecx, dword [rsp + 0x30]
lea edi, [r13 - 1]
movsxd r15, dword [rsp + 0x4c]
mov ebp, r14d
mov r12, qword [rsp + 0x40]
imul ebp, ecx
nop
mov eax, esi
test r15, r15
mov r8d, ebp
cmovne eax, edi
imul eax, r14d
imul eax, ecx
mov rcx, rbx
movsxd rdx, eax
add rdx, r12
call fcn.1400eb250
mov ecx, dword [rsp + 0x30]
inc esi
dec edi
cmp esi, r13d
jl 0x1400f5be0
mov r15, r12
jmp 0x1400f608f
mov edx, dword [rsp + 0x60]
mov rcx, rbx
call fcn.1400eb1f0
mov ecx, dword [rsp + 0x3c]
test ecx, ecx
js 0x1400f60f2
cmp ecx, ebp
mov eax, esi
setle al
test eax, eax
je 0x1400f60f2
mov ebp, r14d
imul ebp, ecx
movsxd rcx, ebp
call fcn.14027bdf8
mov qword [rsp + 0x68], rax
test rax, rax
je 0x1400f60f2
cmp dword [rsp + 0xe0], esi
je 0x1400f5d80
mov r15, rax
mov eax, dword [rsp + 0x3c]
test eax, eax
jle 0x1400f5d0b
mov r13d, r14d
mov ebp, eax
nop dword [rax]
mov rcx, rbx
call fcn.1400eb400
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [r15], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [r15 + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [r15 + 2], dl
add r15, r13
sub rbp, 1
jne 0x1400f5c80
mov r13d, dword [rsp + 0x34]
mov r15, qword [rsp + 0x40]
mov ecx, dword [rsp + 0xe8]
mov eax, dword [rsp + 0x50]
mov ebp, r14d
test eax, eax
jle 0x1400f5ffc
movsxd r11, r14d
mov r8, r15
mov r10, r11
mov qword [rsp + 0x60], r15
neg r10
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x78], r10
neg r15
mov r9d, eax
mov r13d, esi
nop word [rax + rax]
test ecx, ecx
je 0x1400f5e06
test r12d, r12d
jne 0x1400f5df9
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f5dc0
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5de5
mov r8d, ebp
mov rdx, rax
mov rcx, rbx
call fcn.1400eb250
test eax, eax
jne 0x1400f5d10
mov rcx, r15
call fcn.14027b988
mov rcx, qword [rsp + 0x68]
call fcn.14027b988
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x1400f6122
cmp dword [rbx + 0x30], esi
je 0x1400f5de3
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5de5
xor cl, cl
movzx r13d, cl
mov r12d, r13d
and r12d, 0x7f
inc r12d
shr r13d, 7
jmp 0x1400f5e06
test r13d, r13d
je 0x1400f5e06
test edi, edi
je 0x1400f5fa7
cmp dword [rsp + 0x38], esi
je 0x1400f5e9f
cmp dword [rsp + 0x48], 8
jne 0x1400f5e66
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f5e39
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f5e6e
cmp dword [rbx + 0x30], esi
je 0x1400f5e5f
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f5e6e
xor cl, cl
movzx eax, cl
jmp 0x1400f5e6e
mov rcx, rbx
call fcn.1400eb400
cmp eax, dword [rsp + 0x3c]
cmovge eax, esi
test r14d, r14d
je 0x1400f5f93
imul eax, r14d
lea rcx, [rsp + 0xc0]
mov r8, rbp
movsxd rdx, eax
add rdx, qword [rsp + 0x68]
call fcn.1402743b0
jmp 0x1400f5f93
cmp dword [rsp + 0xe0], esi
je 0x1400f5f31
mov rcx, rbx
call fcn.1400eb400
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsp + 0xc0], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsp + 0xc1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0xc2], dl
jmp 0x1400f5f93
mov rdi, rsi
test r14d, r14d
je 0x1400f5f93
nop dword [rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f5f5f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5f84
cmp dword [rbx + 0x30], esi
je 0x1400f5f82
mov rcx, rbx
call fcn.1400eb180
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f5f84
xor cl, cl
mov byte [rsp + rdi + 0xc0], cl
inc rdi
cmp rdi, rbp
jl 0x1400f5f40
mov r8, qword [rsp + 0x60]
mov edi, esi
mov r9, qword [rsp + 0x58]
mov r10, qword [rsp + 0x78]
movsxd r11, r14d
test r14d, r14d
je 0x1400f5fd3
lea rdx, [rsp + 0xc0]
mov rcx, r8
add rdx, r15
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rax, [r15 + rcx]
cmp rax, rbp
jl 0x1400f5fc0
mov ecx, dword [rsp + 0xe8]
add r8, r11
dec r12d
mov qword [rsp + 0x60], r8
add r15, r10
sub r9, 1
mov qword [rsp + 0x58], r9
jne 0x1400f5d50
mov r13d, dword [rsp + 0x34]
cmp dword [rsp + 0x4c], esi
je 0x1400f6078
test r13d, r13d
jle 0x1400f6078
mov r12, qword [rsp + 0x40]
lea r10d, [r13 - 1]
mov ebx, r14d
imul r10d, r14d
imul ebx, dword [rsp + 0x30]
mov r11d, esi
mov edi, ebx
neg edi
imul r10d, dword [rsp + 0x30]
nop dword [rax]
mov r8d, ebx
test ebx, ebx
jle 0x1400f606a
movsxd rax, r11d
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r12]
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rdx + r9]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [rdx + r9], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x1400f6050
add r11d, ebx
add r10d, edi
add esi, 2
cmp esi, r13d
jl 0x1400f6030
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x1400f608a
mov rcx, rax
call fcn.14027b988
mov r15, qword [rsp + 0x40]
mov eax, dword [rsp + 0xe0]
cmp r14d, 3
jb 0x1400f60c9
test eax, eax
jne 0x1400f60c9
mov eax, dword [rsp + 0x50]
mov r8, r15
test eax, eax
jle 0x1400f60c9
mov r9d, r14d
mov edx, eax
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, r9
sub rdx, 1
jne 0x1400f60b0
cmp r14d, 4
je 0x1400f60ed
mov r9d, dword [rsp + 0x30]
mov r8d, 4
mov edx, r14d
mov dword [rsp + 0x20], r13d
mov rcx, r15
call fcn.1400eb4b0
mov r15, rax
mov rax, r15
jmp 0x1400f612d
mov rcx, r15
call fcn.14027b988
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x1400f6122
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, [0x140353d38]
mov edx, reloc.WS2_32.dll_recv
mov qword [rdx + rcx], rax
xor eax, eax
mov rbx, qword [rsp + 0xd0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret