Function at 0x579590
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x5c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x704bc0
mov esi, ecx
lea eax, [ebp - 0x18]
mov edi, edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
push edi
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.0056d0c0
add esp, 0xc
cmp dword [esi + 8], 0
mov edx, eax
mov dword [ebp - 0x30], esi
jne 0x5795ff
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x28], edx
lea edx, [esi + 0x10]
mov dword [ebp - 0x10], 0
call fcn.00710d70
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x30]
mov eax, dword [esi + 4]
mov edi, dword [esi]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], eax
mov eax, edx
mov dword [ebp - 0x44], edi
shr eax, 0x19
movd xmm0, eax
mov dword [ebp - 0x40], eax
lea eax, [edi - 0x28]
mov dword [ebp - 0x3c], eax
movzx eax, byte [ecx + 1]
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
movdqu xmmword [ebp - 0x68], xmm0
mov byte [ebp - 0x22], al
movzx eax, byte [ecx + 3]
mov byte [ebp - 0x21], al
nop
and edx, dword [ebp - 0x2c]
movdqu xmm0, xmmword [ebp - 0x68]
movdqu xmm1, xmmword [edi + edx]
mov edi, edx
mov dword [ebp - 0x28], edx
pcmpeqb xmm0, xmm1
movdqu xmmword [ebp - 0x58], xmm1
pmovmskb ebx, xmm0
jmp 0x579687
lea eax, [ebx - 1]
and eax, ebx
mov ebx, eax
test bx, bx
je 0x579730
tzcnt eax, ebx
mov esi, dword [ebp - 0x3c]
add eax, edi
and eax, dword [ebp - 0x2c]
neg eax
lea edx, [eax + eax*4]
mov eax, dword [ecx + 0xc]
cmp eax, dword [esi + edx*8 + 0xc]
jne 0x579680
mov edi, dword [ebp - 0x3c]
lea edx, [edi + edx*8]
push eax
mov dword [ebp - 0x20], edx
push dword [edx + 4]
push dword [ecx + 4]
mov esi, ecx
call sub.VCRUNTIME140.dll_memcmp
mov edi, dword [ebp - 0x28]
mov ecx, esi
add esp, 0xc
test eax, eax
jne 0x579680
cmp byte [ecx], 0
mov edx, dword [ebp - 0x20]
sete al
cmp byte [edx], 0
setne dl
cmp al, dl
je 0x579680
cmp byte [ebp - 0x22], 0
mov edx, dword [ebp - 0x20]
sete al
cmp byte [edx + 1], 0
setne dl
cmp al, dl
je 0x579680
cmp byte [ecx + 2], 0
mov edx, dword [ebp - 0x20]
sete al
cmp byte [edx + 2], 0
setne dl
cmp al, dl
je 0x579680
cmp byte [ebp - 0x21], 0
mov edx, dword [ebp - 0x20]
sete al
cmp byte [edx + 3], 0
setne dl
xor dl, al
je 0x579680
jmp 0x579801
cmp dword [ebp - 0x34], 1
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x34], 1
je 0x57975c
movdqu xmm0, xmmword [ebp - 0x58]
xor edx, edx
pmovmskb eax, xmm0
test eax, eax
setne dl
tzcnt ebx, eax
add ebx, edi
mov dword [ebp - 0x34], edx
and ebx, dword [ebp - 0x2c]
movdqu xmm1, xmmword [ebp - 0x58]
pcmpeqd xmm0, xmm0
mov edi, dword [ebp - 0x44]
pcmpeqb xmm1, xmm0
pmovmskb eax, xmm1
test eax, eax
jne 0x57978c
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x48], ebx
lea edx, [edx + eax + 0x10]
add eax, 0x10
mov dword [ebp - 0x38], eax
jmp 0x579650
movzx eax, byte [edi + ebx]
test al, al
js 0x5797a4
movdqa xmm0, xmmword [edi]
pmovmskb eax, xmm0
tzcnt ebx, eax
movzx eax, byte [edi + ebx]
mov edx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
and al, 1
movzx eax, al
sub dword [edx + 8], eax
lea eax, [ebx - 0x10]
and esi, eax
mov eax, dword [ebp - 0x40]
mov byte [edi + ebx], al
mov byte [esi + edi + 0x10], al
neg ebx
inc dword [edx + 0xc]
movsd xmm0, qword [ecx + 0x20]
lea eax, [ebx + ebx*4]
movsd qword [edi + eax*8 - 8], xmm0
movsd xmm0, qword [ecx + 0x18]
movsd qword [edi + eax*8 - 0x10], xmm0
movsd xmm0, qword [ecx + 0x10]
movsd qword [edi + eax*8 - 0x18], xmm0
movq xmm0, qword [ecx]
movq xmm1, qword [ecx + 8]
movq qword [edi + eax*8 - 0x20], xmm1
movq qword [edi + eax*8 - 0x28], xmm0
jmp 0x57980d
mov dword [ebp - 0x10], 0xffffffff
call fcn.00565e20
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret