Function at 0x580890
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, 0x34
call fcn.0042ed50
mov eax, dword [0x630160]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
push ebx
push ebp
mov dword [esp + 0x28], edx
push esi
mov esi, dword [esp + 0x5c]
movzx edx, byte [esi + 1]
push edi
mov edi, dword [eax]
lea eax, [esi + 1]
mov dword [esp + 0x2c], eax
inc eax
inc eax
shl edx, 8
mov dword [esp + 0x34], ecx
movzx ecx, byte [esi]
or ecx, edx
movzx edx, byte [eax - 1]
inc eax
movzx ebx, byte [eax + 1]
shl edx, 0x10
or ecx, edx
movzx edx, byte [eax - 1]
inc eax
shl edx, 0x18
or ecx, edx
movzx edx, byte [eax - 1]
inc eax
shl ebx, 8
or edx, ebx
movzx ebx, byte [eax + 1]
movzx eax, byte [eax]
mov ebp, dword [esp + 0x50]
shl ebx, 8
or ebx, eax
mov eax, ecx
shr eax, 8
mov byte [esp + 0x39], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x3a], al
shl ebx, 0x10
or edx, ebx
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x3b], al
mov eax, edx
shr eax, 8
mov byte [esp + 0x3d], al
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x3e], al
mov eax, edx
shr eax, 0x18
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov byte [esp + 0x38], cl
mov byte [esp + 0x3c], dl
mov byte [esp + 0x3f], al
test ebp, ebp
je 0x580a8a
lea esp, [esp]
mov ebp, 1
sub dword [esp + 0x14], ebp
test edi, edi
jne 0x5809f3
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
push ecx
push edx
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00574ab0
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov ebx, eax
shr ebx, 8
mov byte [esp + 0x49], bl
mov ebx, eax
mov ecx, eax
mov byte [esp + 0x48], al
shr ebx, 0x10
shr eax, 0x18
mov byte [esp + 0x4a], bl
mov byte [esp + 0x4b], al
mov eax, edx
mov ebx, eax
shr ebx, 8
mov byte [esp + 0x4d], bl
mov ebx, eax
mov byte [esp + 0x4c], al
shr ebx, 0x10
shr eax, 0x18
add esp, 0x10
add dword [esp + 0x18], ebp
mov byte [esp + 0x3e], bl
mov byte [esp + 0x3f], al
mov al, byte [esp + edi + 0x38]
mov ebx, dword [esp + 0x48]
xor al, byte [ebx]
mov ebp, dword [esp + 0x24]
inc dword [esp + 0x48]
inc edi
mov byte [ebp], al
inc ebp
and edi, 7
cmp dword [esp + 0x14], 0
mov dword [esp + 0x24], ebp
jne 0x580980
cmp dword [esp + 0x18], 0
je 0x580a71
mov byte [esi], cl
mov esi, dword [esp + 0x2c]
mov eax, ecx
shr eax, 8
mov byte [esi], al
inc esi
mov eax, ecx
shr eax, 0x10
mov byte [esi], al
inc esi
shr ecx, 0x18
mov byte [esi], cl
mov byte [esi + 1], dl
inc esi
inc esi
mov ecx, edx
shr ecx, 8
mov byte [esi], cl
mov ecx, dword [esp + 0x10]
inc esi
mov eax, edx
shr eax, 0x10
mov byte [esi], al
shr edx, 0x18
mov byte [esi + 1], dl
mov dword [ecx], edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00418878
add esp, 0x34
ret
mov edx, dword [esp + 0x10]
mov dword [edx], edi
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00418878
add esp, 0x34
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
mov dword [eax], edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00418878
add esp, 0x34
ret