Function at 0x1008aa80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x14]
xor ecx, ecx
mov esi, dword [eax]
test edi, edi
je 0x1008ab48
cmp edi, 8
mov eax, 0
jb 0x1008ab2d
mov ecx, dword [ebp + 0x10]
mov eax, edi
pxor xmm0, xmm0
pxor xmm1, xmm1
and eax, 0xfffffff8
mov edx, eax
add ecx, 0x38
nop
movd xmm2, dword [ecx - 0x20]
movd xmm3, dword [ecx - 0x28]
movd xmm4, dword [ecx - 0x38]
movd xmm6, dword [ecx - 8]
movd xmm5, dword [ecx - 0x10]
punpckldq xmm3, xmm2
movd xmm2, dword [ecx - 0x30]
punpckldq xmm4, xmm2
movd xmm2, dword [ecx]
punpcklqdq xmm4, xmm3
paddd xmm0, xmm4
movd xmm4, dword [ecx - 0x18]
add ecx, 0x40
add edx, 0xfffffff8
punpckldq xmm6, xmm2
punpckldq xmm4, xmm5
punpcklqdq xmm4, xmm6
paddd xmm1, xmm4
jne 0x1008aac0
paddd xmm1, xmm0
cmp eax, edi
pshufd xmm0, xmm1, 0xee
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0x55
paddd xmm1, xmm0
movd ecx, xmm1
je 0x1008ab48
mov ebx, dword [ebp + 0x10]
mov edx, edi
sub edx, eax
lea eax, [ebx + eax*8]
nop word [eax + eax]
add ecx, dword [eax]
add eax, 8
dec edx
jne 0x1008ab40
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
mov ebx, dword [esi + 8]
mov dword [ebp - 0x1c], esi
cmp eax, edx
jne 0x1008ab95
cmp ecx, ebx
jb 0x1008ab95
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp + 0x10]
shl edi, 3
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
add esi, 0x18
nop word cs:[eax + eax]
test edi, edi
je 0x1008abee
mov eax, dword [ebx]
add ebx, 8
add edi, 0xfffffff8
test eax, eax
je 0x1008ab80
mov ecx, dword [ebx - 4]
jmp 0x1008abf5
mov ecx, dword [ebp - 0x1c]
cmp eax, edx
mov esi, dword [ecx + 4]
jb 0x1008ac63
mov eax, dword [ecx + 0x14]
lea edi, [ecx + 0x18]
mov ecx, ebx
sub ecx, eax
add eax, esi
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x18]
push ebx
mov dword [ebp - 0x10], esi
push esi
push edi
push eax
call sym.__LT_std..sys..pal..windows..stdio..Stdin_u20_as_u20_std..io..Read_GT_::read::hed48a6f374b25a86
add esp, 0x10
movzx eax, byte [ebp - 0x18]
cmp eax, 4
jne 0x1008ac36
mov edx, dword [ebp - 0x14]
cmp edx, ebx
jbe 0x1008ac4b
push 0x1015f9b4
push 0x29
push 0x1015f98a
call sym.core::panicking::panic::hf6244c8fb5815825
mov ecx, 1
xor eax, eax
lea edx, [ebp - 0x18]
push eax
push ecx
push esi
push edx
call sym.__LT_std..sys..pal..windows..stdio..Stdin_u20_as_u20_std..io..Read_GT_::read::hed48a6f374b25a86
add esp, 0x10
movzx eax, byte [ebp - 0x18]
cmp al, 4
jne 0x1008ac1d
movq xmm0, qword [ebp - 0x18]
mov eax, dword [ebp + 8]
movq qword [eax], xmm0
jmp 0x1008acf2
test al, al
jne 0x1008ac0c
cmp dword [ebp - 0x14], 6
jne 0x1008ac0c
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0
jmp 0x1008acef
mov ecx, dword [ebp - 0x14]
mov edx, ecx
xor edx, 6
or edx, eax
mov edx, 0
jne 0x1008acfa
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp - 0x10]
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], edx
mov dword [eax + 0x14], ebx
xor eax, eax
sub edx, eax
add esi, eax
shl edi, 3
xor ebx, ebx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp + 0x10]
mov ecx, esi
jmp 0x1008aca5
mov esi, ecx
movzx ecx, byte [ecx]
mov byte [eax], cl
mov ecx, dword [ebp - 0x10]
add esi, edi
add ebx, edi
add edx, 8
mov eax, ecx
sub eax, edi
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
add edi, 0xfffffff8
cmp ecx, dword [ebp - 0x24]
mov ecx, esi
jbe 0x1008acd6
test edi, edi
je 0x1008acd6
mov dword [ebp - 0x28], edi
mov esi, dword [edx]
mov edi, dword [ebp - 0x10]
mov eax, dword [edx + 4]
cmp esi, edi
mov dword [ebp - 0x24], esi
cmovb edi, esi
cmp edi, 1
je 0x1008ac80
push edi
push ecx
push eax
mov dword [ebp - 0x20], edx
mov esi, ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x20]
add esp, 0xc
jmp 0x1008ac87
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 0x10]
add eax, ebx
cmp eax, ecx
cmovae eax, ecx
mov dword [edx + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], ebx
mov byte [eax], 4
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
movzx edx, byte [ebp - 0x15]
movzx esi, word [ebp - 0x17]
shl edx, 0x10
or esi, edx
shl esi, 8
or esi, eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
mov dword [eax + 4], ecx
jmp 0x1008acf2