Function at 0x5a1870
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x675978]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x210], ecx
mov ecx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x228], ecx
mov ecx, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x22c], ecx
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x208]
mov dword [ebp - 0x220], ebx
push ecx
lea ecx, [ebp - 0x154]
mov dword [ebp - 0x20c], eax
push ecx
push esi
push eax
mov dword [ebp - 0x218], 0x5fb0a94f
mov dword [ebp - 0x208], 0
mov dword [ebx + 0xc], 1
mov dword [ebx + 0x1090], 0
mov dword [ebx + 0x1094], 0
call fcn.005a5670
add esp, 0x14
test eax, eax
jne 0x5a1a5d
mov eax, dword [ebp - 0x208]
add dword [ebx + 0x30], eax
adc dword [ebx + 0x34], 0
test byte [ebp - 0x14f], 2
je 0x5a1a5d
jmp 0x5a1930
movzx eax, byte [ebp - 0x138]
xor edx, edx
xor edi, edi
mov dword [ebp - 0x214], edx
xor ecx, ecx
mov dword [ebp - 0x224], eax
cmp eax, 2
jb 0x5a1978
dec eax
mov ebx, eax
movzx eax, byte [ebp + ecx - 0x137]
add edx, eax
movzx eax, byte [ebp + ecx - 0x136]
add ecx, 2
add edi, eax
cmp ecx, ebx
jl 0x5a1951
mov ebx, dword [ebp - 0x220]
mov eax, dword [ebp - 0x224]
cmp ecx, eax
jge 0x5a1986
movzx eax, byte [ebp + ecx - 0x137]
jmp 0x5a198c
mov eax, dword [ebp - 0x214]
add edi, edx
add edi, eax
push 1
cmp edi, 0x33
jne 0x5a1a03
lea eax, [ebp - 0x1fd]
push eax
push esi
call dword [ebp - 0x20c]
add esp, 0xc
cmp eax, 1
jne 0x5a1a5d
cmp byte [ebp - 0x1fd], 0x7f
jne 0x5a19fd
push 4
lea eax, [ebp - 0x204]
push eax
push esi
call dword [ebp - 0x20c]
add esp, 0xc
cmp eax, 4
jne 0x5a1a5d
mov eax, dword [ebp - 0x204]
cmp al, 0x46
jne 0x5a19f7
cmp ah, 0x4c
jne 0x5a19f7
cmp byte [ebp - 0x202], 0x41
jne 0x5a19f7
cmp byte [ebp - 0x201], 0x43
je 0x5a1a70
push 1
push 0x2e
jmp 0x5a1a04
push 1
push 0x32
jmp 0x5a1a04
push edi
push esi
call dword [ebp - 0x210]
add esp, 0xc
test eax, eax
je 0x5a1a5d
mov eax, edi
cdq
add dword [ebx + 0x30], eax
lea eax, [ebp - 0x218]
push eax
adc dword [ebx + 0x34], edx
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x154]
push eax
push esi
push dword [ebp - 0x20c]
call fcn.005a55c0
add esp, 0x14
test eax, eax
jne 0x5a1a5d
mov eax, dword [ebp - 0x208]
add dword [ebx + 0x30], eax
adc dword [ebx + 0x34], 0
test byte [ebp - 0x14f], 2
jne 0x5a1930
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b6a10
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x20c]
lea eax, [ebp - 0x208]
push 2
push eax
push esi
call edi
add esp, 0xc
cmp eax, 2
jne 0x5a1a5d
cmp byte [ebp - 0x208], 1
jne 0x5a1a5d
push 1
push eax
push esi
call dword [ebp - 0x210]
add esp, 0xc
test eax, eax
je 0x5a1a5d
push 4
lea eax, [ebp - 0x204]
push eax
push esi
call edi
add esp, 0xc
cmp eax, 4
jne 0x5a1a5d
mov eax, dword [ebp - 0x204]
cmp al, 0x66
jne 0x5a1a5d
cmp ah, 0x4c
jne 0x5a1a5d
cmp byte [ebp - 0x202], 0x61
jne 0x5a1a5d
cmp byte [ebp - 0x201], 0x43
jne 0x5a1a5d
push 4
lea eax, [ebp - 0x214]
push eax
push esi
call edi
add esp, 0xc
cmp eax, 4
jne 0x5a1a5d
mov ecx, dword [ebp - 0x214]
bswap ecx
mov eax, ecx
mov edi, ecx
shr eax, 0x18
and ecx, 0xffffff
shr edi, 0x1f
and al, 0x7f
jne 0x5a1a5d
cmp ecx, 0x22
jne 0x5a1a5d
lea eax, [ebp - 0x34]
push eax
push esi
push dword [ebp - 0x20c]
call fcn.005a3950
add esp, 0xc
test eax, eax
je 0x5a1a5d
mov eax, dword [ebp - 0x28]
xor edi, 1
mov dword [ebx + 0x18], eax
movzx eax, byte [ebp - 0x24]
mov byte [ebx + 0x1c], al
movzx eax, byte [ebp - 0x23]
mov byte [ebx + 0x1d], al
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x24], eax
mov ax, word [ebp - 0x32]
mov word [ebx + 0x28], ax
mov eax, dword [ebp - 0x228]
mov dword [ebx + 0x38], 1
mov dword [ebx + 0x3c], edi
test eax, eax
je 0x5a1bb4
mov dword [ebp - 0x1fc], 0
lea esi, [ebp - 0x34]
mov dword [ebp - 0x1f8], 0
lea edi, [ebp - 0x1ec]
mov dword [ebp - 0x1f4], 0
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x1fc]
push ecx
push dword [ebp - 0x22c]
call eax
add esp, 8
add dword [ebx + 0x30], 0x33
lea edi, [ebx + 0x1098]
mov ecx, dword [ebx + 0x30]
lea esi, [ebp - 0x154]
adc dword [ebx + 0x34], 0
add ecx, 0xffffffb1
mov eax, dword [ebx + 0x34]
mov dword [ebx + 0x1090], ecx
adc eax, 0xffffffff
mov ecx, 0x48
mov dword [ebx + 0x1094], eax
mov eax, dword [ebp - 0x144]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
pop edi
mov dword [ebx + 0x1088], eax
xor ecx, ebp
pop esi
mov dword [ebx + 0x3c], 1
mov eax, 1
pop ebx
call fcn.005b6a10
mov esp, ebp
pop ebp
ret