Function at 0x5a5540
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, ecx
lea eax, [ebp - 0x18]
mov dword [eax - 4], esp
mov dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x4f0840
mov ecx, dword fs:[0]
mov dword [eax], ecx
mov ebx, dword [ebp + 0x10]
mov dword fs:[0], eax
test byte [ebx + 4], 1
jne 0x5a55e6
movzx eax, byte [ebp + 0x18]
mov dword [ebp - 0x20], eax
mov eax, dword [esi]
mov edi, dword [eax + 0x18]
mov ecx, edi
call dword [0x6401dc]
movzx eax, word [ebp + 0x14]
mov ecx, esi
push dword [ebp - 0x20]
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
jmp 0x5a55d7
mov ebx, dword [ebp - 0x34]
shr bl, 7
mov eax, dword [ebp - 0x38]
mov edx, ebx
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x24]
mov dword [esi], ecx
test dl, dl
je 0x5a55cc
push eax
call fcn.00564050
add esp, 4
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
shr edx, 0x1f
jmp 0x5a55b7
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], eax
cmp eax, 0x64ad98
jne 0x5a573d
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x30]
push 0x64ae88
call fcn.0052f4a0
mov esi, eax
mov ebx, dword [ebp - 0x20]
cmp ebx, 0x64ad98
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
mov dl, byte [ebp + 0x18]
je 0x5a564b
xor eax, eax
dec eax
lock xadd dword [ebx + 4], eax
test eax, eax
jne 0x5a564b
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [0x6401dc]
mov ecx, ebx
call edi
mov dl, byte [ebp + 0x18]
xor eax, eax
dec eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov ecx, dword [esi]
xor dl, 1
movzx edx, dl
mov edi, dword [ecx + edx*4 + 0x14]
mov dword [ebp - 0x10], eax
mov ecx, edi
call dword [0x6401dc]
mov ecx, esi
lea ebx, [ebp - 0x30]
push ebx
call edi
movsx edx, byte [ebp - 0x25]
test edx, edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov esi, edx
cmovs esi, ecx
test esi, esi
je 0x5a55e1
mov dword [ebp - 0x34], edx
test dl, dl
mov esi, ebx
mov dword [ebp - 0x38], eax
cmovs esi, eax
mov dword [ebp - 0x20], esi
jmp 0x5a56fe
mov dword [ebp - 0x24], 0
lea esi, [ebp - 0x30]
mov edx, dword [ebp - 0x38]
mov ebx, ecx
mov ecx, dword [ebp - 0x34]
jmp 0x5a56d7
lea ecx, [eax + 2]
mov dword [ebx + 0x18], ecx
mov word [eax], si
xor edi, edi
cmp si, 0xffff
je 0x5a56c8
mov edi, ebx
mov cl, byte [ebp - 0x25]
mov edx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x24], edi
lea esi, [ebp - 0x30]
mov eax, dword [ebp - 0x20]
add eax, 2
test cl, cl
mov dword [ebp - 0x38], edx
cmovs esi, edx
mov dword [ebp - 0x34], ecx
movzx edi, cl
cmovs edi, ebx
lea esi, [esi + edi*2]
mov dword [ebp - 0x20], eax
cmp eax, esi
mov ecx, ebx
je 0x5a55ac
mov ebx, dword [ebp - 0x24]
test ebx, ebx
je 0x5a56a1
mov eax, dword [ebp - 0x20]
movzx esi, word [eax]
mov eax, dword [ebx + 0x18]
cmp eax, dword [ebx + 0x1c]
jne 0x5a56b5
mov eax, dword [ebx]
mov edi, dword [eax + 0x30]
mov dword [ebp - 0x10], 0xffffffff
mov ecx, edi
call dword [0x6401dc]
mov dword [ebp - 0x10], 1
movzx eax, si
mov ecx, ebx
push eax
call edi
mov esi, eax
mov ebx, dword [ebp - 0x24]
jmp 0x5a56be
mov eax, dword [ebp - 0x20]
lock inc dword [eax + 4]
jmp 0x5a55fa