Function at 0x5d4b45
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
and dword [ebp - 0x10], 0
mov edx, ecx
mov eax, dword [eax + 0x18]
and ecx, 7
shr edx, 3
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
lea edx, [edx*8 + 1]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], eax
jbe 0x5d4e17
push ebx
push esi
push edi
mov ecx, dword [ebp + 0x1c]
mov esi, dword [ebp - 0x10]
and byte [ebp - 1], 0
and byte [ebp - 2], 0
mov edx, dword [ecx + 0x24]
mov ebx, dword [ecx + 0x10]
mov eax, edx
mov dword [ebp - 0x18], 0xd
imul eax, esi
add eax, ebx
mov dword [ebp - 0x20], eax
lea eax, [esi - 1]
mov edi, eax
mov dword [ebp - 0x1c], eax
imul edi, edx
lea esi, [eax - 1]
add edi, ebx
imul esi, edx
mov dl, byte [edi]
add esi, ebx
shr dl, 1
and dl, 0x70
movzx dx, dl
mov word [ebp - 0x14], dx
mov dl, byte [esi]
and dl, 0xc0
movzx bx, dl
shl ebx, 5
cmp byte [ebp + 0x14], 0
je 0x5d4c0d
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp + 8]
add eax, 0x9b25
push eax
mov eax, dword [ebp - 0x2c]
add eax, 0x9b25
push eax
call fcn.005d40cf
mov ecx, dword [ebp + 0x1c]
movzx eax, al
xor dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x24], 0
jne 0x5d4c34
mov edx, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x10]
push edx
imul eax, edx
imul edx, dword [ebp - 0x10]
add eax, ecx
add edx, ecx
push eax
push edx
call fcn.005c3923
add esp, 0xc
jmp 0x5d4e05
xor eax, eax
push 1
mov ah, byte [edi]
inc edi
mov dword [ebp - 0xc], eax
movzx ax, byte [edi]
or dword [ebp - 0xc], eax
xor eax, eax
mov ah, byte [esi]
inc edi
inc esi
mov dword [ebp - 8], eax
movzx ax, byte [esi]
or dword [ebp - 8], eax
pop eax
inc esi
cmp dword [ebp - 0x30], eax
mov dword [ebp - 0x1c], eax
jbe 0x5d4d46
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov cx, ax
shr dx, cl
lea ecx, [eax - 1]
movzx ax, byte [ebp - 1]
and edx, 1
and eax, 0xffef
shl edx, 0xa
or ebx, edx
and ecx, 0xf
and ebx, 0xfff7
mov dword [ebp - 0x18], ecx
shl ebx, 1
or ebx, eax
mov eax, dword [ebp - 0xc]
shr ax, cl
mov ecx, dword [ebp - 0x14]
and ecx, 0xfbff
and eax, 1
shl eax, 3
or eax, ecx
mov ecx, dword [ebp + 0x18]
shl eax, 1
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
dec eax
push eax
push dword [ebp - 0x10]
call fcn.005c64c5
test al, al
je 0x5d4cca
and byte [ebp - 1], 0
jmp 0x5d4cea
movzx eax, word [ebp - 0x14]
movzx ecx, bx
or eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005d40cf
mov byte [ebp - 1], al
mov al, byte [ebp - 2]
mov ecx, dword [ebp - 0x1c]
shl al, 1
or al, byte [ebp - 1]
test cl, 7
mov byte [ebp - 2], al
jne 0x5d4d39
mov edx, dword [ebp - 0x20]
inc dword [ebp - 0x20]
and byte [ebp - 2], 0
cmp dword [ebp - 0x18], 8
mov byte [edx], al
jae 0x5d4d23
xor eax, eax
mov ah, byte [edi]
inc edi
mov al, byte [ebp - 0xc]
mov dword [ebp - 0xc], eax
xor eax, eax
mov ah, byte [esi]
mov al, byte [ebp - 8]
jmp 0x5d4d35
xor eax, eax
mov ah, byte [ebp - 0xb]
mov al, byte [edi]
inc edi
mov dword [ebp - 0xc], eax
xor eax, eax
mov ah, byte [ebp - 7]
mov al, byte [esi]
mov dword [ebp - 8], eax
inc esi
inc ecx
cmp ecx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], ecx
jb 0x5d4c63
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp + 0x10]
cmp eax, edi
ja 0x5d4df0
sub edi, eax
lea esi, [eax - 1]
inc edi
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 8]
mov cx, ax
push esi
shr dx, cl
lea ecx, [eax - 1]
push dword [ebp - 0x10]
movzx ax, byte [ebp - 1]
and edx, 1
and eax, 0xffef
shl edx, 0xa
or ebx, edx
and ecx, 0xf
and ebx, 0xfff7
mov dword [ebp - 0x18], ecx
shl ebx, 1
or ebx, eax
mov eax, dword [ebp - 0xc]
shr ax, cl
mov ecx, dword [ebp - 0x14]
and ecx, 0xfbff
and eax, 1
shl eax, 3
or eax, ecx
mov ecx, dword [ebp + 0x18]
shl eax, 1
mov dword [ebp - 0x14], eax
call fcn.005c64c5
test al, al
je 0x5d4dbd
and byte [ebp - 1], 0
jmp 0x5d4ddd
movzx eax, word [ebp - 0x14]
movzx ecx, bx
or eax, ecx
mov ecx, dword [ebp - 0x28]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005d40cf
mov byte [ebp - 1], al
mov al, byte [ebp - 2]
shl al, 1
or al, byte [ebp - 1]
inc esi
dec edi
mov byte [ebp - 2], al
jne 0x5d4d5a
cmp dword [ebp - 0x34], 0
je 0x5d4e05
mov al, byte [ebp - 2]
mov cl, 8
sub cl, byte [ebp - 0x34]
shl al, cl
mov ecx, dword [ebp - 0x20]
mov byte [ecx], al
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0xc]
jb 0x5d4b8c
pop edi
pop esi
pop ebx
xor eax, eax
leave
ret