Function at 0x4f88d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x44]
mov dword [rsp + 0x30], eax
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x9c]
mov eax, dword [rdx + 0x58]
sub eax, ecx
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0x94]
mov dword [rsp + 0x2c], eax
xor eax, eax
test eax, eax
je 0x4f894e
cmp dword [rsp + 0x2c], 0
jne 0x4f893c
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x94], 0
jne 0x4f893c
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x9c], 0
jne 0x4f893c
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x2c], eax
jmp 0x4f894e
cmp dword [rsp + 0x2c], 0xffffffff
jne 0x4f894e
mov eax, dword [rsp + 0x2c]
sub eax, 1
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x44]
mov eax, dword [rsp + 0x30]
lea ecx, [rax + rcx - 0x106]
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x94], ecx
jb 0x4f8aeb
mov r8d, dword [rsp + 0x30]
mov edx, dword [rsp + 0x30]
mov rax, qword [rsp + 0x60]
add rdx, qword [rax + 0x50]
mov rcx, qword [rsp + 0x60]
mov rcx, qword [rcx + 0x50]
call sub.msvcrt.dll_memcpy
mov r11, qword [rsp + 0x60]
mov eax, dword [rsp + 0x30]
mov ecx, dword [r11 + 0x98]
sub ecx, eax
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x98], ecx
mov rcx, qword [rsp + 0x60]
mov eax, dword [rsp + 0x30]
mov ecx, dword [rcx + 0x94]
sub ecx, eax
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x94], ecx
mov rcx, qword [rsp + 0x60]
mov eax, dword [rsp + 0x30]
mov ecx, dword [rcx + 0x84]
sub ecx, eax
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x84], ecx
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x74]
mov dword [rsp + 0x28], eax
mov ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x68]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
sub rax, 2
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
jb 0x4f8a3d
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
sub eax, ecx
mov dword [rsp + 0x40], eax
jmp 0x4f8a45
mov dword [rsp + 0x40], 0
mov rcx, qword [rsp + 0x20]
movzx eax, word [rsp + 0x40]
mov word [rcx], ax
mov eax, dword [rsp + 0x28]
sub eax, 1
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
jne 0x4f8a09
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x28], eax
mov ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x60]
lea rax, [rax + rcx*2]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
sub rax, 2
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
movzx eax, word [rax]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x34], eax
jb 0x4f8ab6
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x34]
sub eax, ecx
mov dword [rsp + 0x44], eax
jmp 0x4f8abe
mov dword [rsp + 0x44], 0
mov rcx, qword [rsp + 0x20]
movzx eax, word [rsp + 0x44]
mov word [rcx], ax
mov eax, dword [rsp + 0x28]
sub eax, 1
mov dword [rsp + 0x28], eax
cmp dword [rsp + 0x28], 0
jne 0x4f8a82
mov ecx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x2c]
add eax, ecx
mov dword [rsp + 0x2c], eax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
cmp dword [rax + 8], 0
jne 0x4f8afe
jmp 0x4f8d29
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x94]
mov rdx, qword [rsp + 0x60]
mov rdx, qword [rdx + 0x50]
add rdx, rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x9c]
add rdx, rax
mov r8d, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0x60]
mov rcx, qword [rcx]
call fcn.004f8d40
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x9c]
add ecx, dword [rsp + 0x28]
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x9c], ecx
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x9c], 3
jb 0x4f8bc7
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x94]
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x50]
movzx ecx, byte [rax + rcx]
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x70], ecx
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x80]
mov rax, qword [rsp + 0x60]
mov edx, dword [rax + 0x70]
shl edx, cl
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x94]
add eax, 1
mov ecx, eax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 0x50]
movzx eax, byte [rax + rcx]
mov ecx, edx
xor ecx, eax
mov rax, qword [rsp + 0x60]
and ecx, dword [rax + 0x7c]
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x70], ecx
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x9c], 0x106
jae 0x4f8bea
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
cmp dword [rax + 8], 0
jne 0x4f88e5
mov rcx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x58]
cmp dword [rcx + 0x1718], eax
jae 0x4f8d29
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x94]
mov rcx, qword [rsp + 0x60]
add eax, dword [rcx + 0x9c]
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0x60]
mov eax, dword [rsp + 0x3c]
cmp dword [rcx + 0x1718], eax
jae 0x4f8c87
mov rax, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x3c]
mov eax, dword [rax + 0x58]
sub eax, ecx
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x102
jbe 0x4f8c52
mov dword [rsp + 0x38], 0x102
mov r8d, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x3c]
mov rax, qword [rsp + 0x60]
add rcx, qword [rax + 0x50]
xor edx, edx
call sub.msvcrt.dll_memset
mov r11d, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x3c]
add ecx, r11d
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x1718], ecx
jmp 0x4f8d29
mov ecx, dword [rsp + 0x3c]
add ecx, 0x102
mov rax, qword [rsp + 0x60]
cmp dword [rax + 0x1718], ecx
jae 0x4f8d29
mov eax, dword [rsp + 0x3c]
add eax, 0x102
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0x1718]
mov dword [rsp + 0x38], eax
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x1718]
mov eax, dword [rdx + 0x58]
sub eax, ecx
cmp dword [rsp + 0x38], eax
jbe 0x4f8cee
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x1718]
mov eax, dword [rdx + 0x58]
sub eax, ecx
mov dword [rsp + 0x38], eax
mov r8d, dword [rsp + 0x38]
mov rax, qword [rsp + 0x60]
mov ecx, dword [rax + 0x1718]
mov rax, qword [rsp + 0x60]
add rcx, qword [rax + 0x50]
xor edx, edx
call sub.msvcrt.dll_memset
mov r11, qword [rsp + 0x60]
mov ecx, dword [r11 + 0x1718]
add ecx, dword [rsp + 0x38]
mov rax, qword [rsp + 0x60]
mov dword [rax + 0x1718], ecx
add rsp, 0x58
ret