Function at 0x5d5f73
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
and dword [ebp - 0x14], 0
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x28], 1
mov eax, dword [edi + 4]
mov edx, eax
and eax, 7
mov dword [ebp - 0x24], eax
mov eax, dword [ecx]
shr edx, 3
cmp dword [edi + 8], 0
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 4]
lea edx, [edx*8 + 1]
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x1c], eax
jbe 0x5d6200
push ebx
push esi
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp - 0x14]
and dword [ebp - 0x10], 0
and byte [ebp + 0xf], 0
mov edx, dword [eax + 0x24]
mov ecx, dword [eax + 0x10]
mov ebx, edx
and byte [ebp - 1], 0
imul ebx, esi
add ebx, ecx
lea ecx, [esi - 1]
mov esi, ecx
mov dword [ebp - 0x2c], ecx
imul esi, edx
add esi, dword [eax + 0x10]
mov dword [ebp - 0x18], 0xd
mov dl, byte [esi]
shr dl, 2
and dl, 0x30
cmp byte [edi + 0xd], 0
movzx dx, dl
mov word [ebp - 8], dx
je 0x5d602d
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
add eax, 0x195
push eax
mov eax, dword [ebp - 0x20]
add eax, 0x195
push eax
call fcn.005d40cf
mov ecx, dword [ebp - 0x2c]
movzx eax, al
xor dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x28], 0
jne 0x5d6054
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x10]
push edx
imul ecx, edx
imul edx, dword [ebp - 0x14]
add ecx, eax
add edx, eax
push ecx
push edx
call fcn.005c3923
add esp, 0xc
jmp 0x5d61ef
xor eax, eax
push 1
mov ah, byte [esi]
inc esi
mov dword [ebp - 0xc], eax
movzx ax, byte [esi]
or dword [ebp - 0xc], eax
pop eax
inc esi
cmp dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
jbe 0x5d6139
movzx ax, byte [ebp + 0xf]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
and ecx, 0xfff7
and eax, 0xffef
shl ecx, 1
or eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov cx, ax
shr dx, cl
and edx, 1
shl edx, 3
or dword [ebp - 8], edx
mov ecx, dword [ebp - 8]
and ecx, 0xfdff
shl ecx, 1
dec eax
mov dword [ebp - 8], ecx
and eax, 0xf
cmp byte [edi + 0xe], 0
mov dword [ebp - 0x18], eax
je 0x5d60d7
mov eax, dword [ebp - 0x2c]
mov ecx, dword [edi + 0x10]
dec eax
push eax
push dword [ebp - 0x14]
call fcn.005c64c5
test al, al
je 0x5d60d7
and byte [ebp + 0xf], 0
jmp 0x5d60f8
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 0x10]
or eax, ecx
mov ecx, dword [ebp - 0x1c]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x20]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005d40cf
mov byte [ebp + 0xf], al
mov al, byte [ebp - 1]
mov ecx, dword [ebp - 0x2c]
shl al, 1
or al, byte [ebp + 0xf]
test cl, 7
mov byte [ebp - 1], al
jne 0x5d612c
and byte [ebp - 1], 0
mov byte [ebx], al
inc ebx
cmp dword [ebp - 0x18], 8
jae 0x5d6121
xor eax, eax
mov ah, byte [esi]
mov al, byte [ebp - 0xc]
jmp 0x5d6128
xor eax, eax
mov ah, byte [ebp - 0xb]
mov al, byte [esi]
mov dword [ebp - 0xc], eax
inc esi
inc ecx
cmp ecx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
jb 0x5d6073
xor esi, esi
cmp dword [ebp - 0x24], esi
jbe 0x5d61dd
movzx ax, byte [ebp + 0xf]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
and ecx, 0xfff7
and eax, 0xffef
shl ecx, 1
or eax, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x18]
mov cx, ax
shr dx, cl
and edx, 1
shl edx, 3
or dword [ebp - 8], edx
mov ecx, dword [ebp - 8]
and ecx, 0xfdff
shl ecx, 1
dec eax
mov dword [ebp - 8], ecx
and eax, 0xf
cmp byte [edi + 0xe], 0
mov dword [ebp - 0x18], eax
je 0x5d61a7
mov ecx, dword [edi + 0x10]
lea eax, [esi - 1]
push eax
push dword [ebp - 0x14]
call fcn.005c64c5
test al, al
je 0x5d61a7
and byte [ebp + 0xf], 0
jmp 0x5d61c8
movzx eax, word [ebp - 8]
movzx ecx, word [ebp - 0x10]
or eax, ecx
mov ecx, dword [ebp - 0x1c]
add ecx, eax
push ecx
mov ecx, dword [ebp - 0x20]
add eax, ecx
mov ecx, dword [ebp + 8]
push eax
call fcn.005d40cf
mov byte [ebp + 0xf], al
mov al, byte [ebp - 1]
shl al, 1
or al, byte [ebp + 0xf]
inc esi
cmp esi, dword [ebp - 0x24]
mov byte [ebp - 1], al
jb 0x5d6144
cmp dword [ebp - 0x24], 0
je 0x5d61ef
mov al, byte [ebp - 1]
mov cl, 8
sub cl, byte [ebp - 0x24]
shl al, cl
mov byte [ebx], al
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [edi + 8]
jb 0x5d5fbd
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret