Function at 0x1400057a4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x580
mov rax, qword [rsp + 0x590]
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x20], 0
mov rax, qword [rsp + 0x40]
mov ecx, dword [rax + 0x20]
call fcn.14000572c
movzx eax, al
test eax, eax
jne 0x1400057e1
movzx eax, byte [rsp + 0x20]
jmp 0x140005aff
lea rax, [rsp + 0x80]
mov rdi, rax
xor eax, eax
mov ecx, 0x400
rep stosb byte [rdi], al
lea rax, [rsp + 0x480]
mov rdi, rax
xor eax, eax
mov ecx, 0x100
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x40]
movsxd rax, dword [rax]
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.140006f20
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x14000586c
mov rdi, qword [rsp + 0x48]
xor eax, eax
mov rcx, qword [rsp + 0x60]
rep stosb byte [rdi], al
cmp qword [rsp + 0x48], 0
je 0x140005857
mov rax, qword [rsp + 0x48]
mov byte [rax], 0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x68], rax
jmp 0x140005860
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x70], rax
jmp 0x140005875
mov qword [rsp + 0x70], 0
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x70]
mov qword [rax + 0x18], rcx
mov dword [rsp + 0x38], 0
jmp 0x140005897
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x100
jge 0x1400058b3
movsxd rax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x38]
mov dword [rsp + rax*4 + 0x80], ecx
jmp 0x14000588d
xor eax, eax
mov word [rsp + 0x24], ax
jmp 0x1400058c9
movzx eax, word [rsp + 0x24]
inc ax
mov word [rsp + 0x24], ax
movsx eax, word [rsp + 0x24]
cmp eax, 0x100
jge 0x140005902
movsx eax, word [rsp + 0x24]
cdq
mov rcx, qword [rsp + 0x40]
idiv dword [rcx + 0x20]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + 0x28]
movsx rdx, word [rsp + 0x24]
mov al, byte [rcx + rax]
mov byte [rsp + rdx + 0x480], al
jmp 0x1400058bc
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x30], 0
jmp 0x14000591e
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0x100
jge 0x14000599c
movsxd rax, dword [rsp + 0x30]
movsxd rcx, dword [rsp + 0x30]
movzx ecx, byte [rsp + rcx + 0x480]
add ecx, dword [rsp + rax*4 + 0x80]
mov eax, ecx
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x30]
mov eax, dword [rsp + rax*4 + 0x80]
mov dword [rsp + 0x50], eax
movsxd rax, dword [rsp + 0x28]
movsxd rcx, dword [rsp + 0x30]
mov eax, dword [rsp + rax*4 + 0x80]
mov dword [rsp + rcx*4 + 0x80], eax
movsxd rax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x50]
mov dword [rsp + rax*4 + 0x80], ecx
jmp 0x140005914
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x3c], 0
jmp 0x1400059c0
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
cmp dword [rsp + 0x3c], eax
jge 0x140005adc
mov eax, dword [rsp + 0x34]
inc eax
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov dword [rsp + 0x34], eax
movsxd rax, dword [rsp + 0x34]
mov eax, dword [rsp + rax*4 + 0x80]
mov ecx, dword [rsp + 0x28]
add ecx, eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov dword [rsp + 0x28], eax
movsxd rax, dword [rsp + 0x34]
mov eax, dword [rsp + rax*4 + 0x80]
mov dword [rsp + 0x54], eax
movsxd rax, dword [rsp + 0x28]
movsxd rcx, dword [rsp + 0x34]
mov eax, dword [rsp + rax*4 + 0x80]
mov dword [rsp + rcx*4 + 0x80], eax
movsxd rax, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x54]
mov dword [rsp + rax*4 + 0x80], ecx
movsxd rax, dword [rsp + 0x34]
mov qword [rsp + 0x78], rax
movsxd rcx, dword [rsp + 0x28]
mov eax, dword [rsp + rcx*4 + 0x80]
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov rcx, qword [rsp + 0x78]
mov ecx, dword [rsp + rcx*4 + 0x80]
add ecx, eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
and eax, 0xff
sub eax, edx
mov dword [rsp + 0x58], eax
movsxd rax, dword [rsp + 0x58]
mov eax, dword [rsp + rax*4 + 0x80]
mov dword [rsp + 0x5c], eax
mov al, byte [rsp + 0x5c]
mov byte [rsp + 0x2c], al
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + 8]
movzx eax, byte [rcx + rax]
movzx ecx, byte [rsp + 0x2c]
xor eax, ecx
movsxd rcx, dword [rsp + 0x3c]
mov rdx, qword [rsp + 0x40]
mov rdx, qword [rdx + 0x18]
mov byte [rdx + rcx], al
jmp 0x1400059b6
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x40]
mov ecx, dword [rcx]
mov dword [rax + 0x10], ecx
mov byte [rsp + 0x20], 1
xor eax, eax
test eax, eax
jne 0x1400057e1
movzx eax, byte [rsp + 0x20]
add rsp, 0x580
pop rdi
ret