Function at 0x5f6710
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebx + 0x11], eax
mov dword [ebx + 0x15], eax
push edi
lea edi, [ebx + 0x11]
mov dword [edi + 8], eax
mov dword [edi + 0xc], eax
mov word [edi + 0x10], ax
cmp byte [ebx + 1], al
setne al
sub ax, 8
movzx eax, ax
movzx ecx, ax
push ecx
mov dword [ebp - 0xc], eax
mov ecx, 0x10
mov eax, esi
call fcn.005f7220
mov eax, dword [ebx + 2]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
cmp eax, 1
mov dword [ebp - 8], 0
je 0x5f6782
jmp 0x5f6770
add dword [ebp - 8], 1
mov cl, byte [ebp - 8]
mov edx, 1
shl edx, cl
cmp edx, eax
jne 0x5f6770
mov eax, dword [ebp - 8]
add eax, 0xfffffff8
shl eax, 0xc
movzx ecx, ax
movzx eax, byte [ebx + 0xb]
sub eax, 1
mov dword [ebp - 8], ecx
je 0x5f67bb
sub eax, 2
je 0x5f67b2
movzx dx, byte [ebx + 0xa]
sub dx, 1
shl dx, 4
or word [ebp - 8], dx
jmp 0x5f67c2
or dword [ebp - 8], 0xa0
jmp 0x5f67c2
or dword [ebp - 8], 0x80
movzx eax, word [ebp - 8]
push eax
mov ecx, 0x10
mov eax, esi
call fcn.005f7220
mov cx, word [ebp - 0xc]
mov ax, word [ebp - 8]
mov dh, cl
add edi, 2
add edi, 2
mov dl, ch
mov ch, al
mov word [edi - 4], dx
mov cl, ah
mov word [edi - 2], cx
cmp byte [ebx + 1], 0
jne 0x5f6a97
mov ecx, dword [ebx + 2]
test ecx, ecx
je 0x5f6a97
mov eax, dword [ebx + 0xd]
cdq
idiv ecx
xor cl, cl
cmp eax, 0x80
jae 0x5f681d
mov byte [ebp - 0x14], al
jmp 0x5f694d
cmp eax, 0x800
jae 0x5f683d
mov edx, eax
shr edx, 6
or dl, 0xc0
and al, 0x3f
or al, 0x80
mov cl, 1
mov byte [ebp - 0x14], dl
mov byte [ebp - 0x13], al
jmp 0x5f694d
cmp eax, 0x10000
jae 0x5f686e
mov edx, eax
shr edx, 0xc
and dl, 0xf
or dl, 0xe0
mov byte [ebp - 0x14], dl
mov edx, eax
shr edx, 6
and dl, 0x3f
or dl, 0x80
and al, 0x3f
or al, 0x80
mov cl, 2
mov byte [ebp - 0x13], dl
mov byte [ebp - 0x12], al
jmp 0x5f694d
cmp eax, 0x200000
jae 0x5f68ad
mov edx, eax
shr edx, 0x12
and dl, 7
or dl, 0xf0
mov byte [ebp - 0x14], dl
mov edx, eax
shr edx, 0xc
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x13], dl
mov edx, eax
shr edx, 6
and dl, 0x3f
or dl, 0x80
and al, 0x3f
or al, 0x80
mov cl, 3
mov byte [ebp - 0x12], dl
mov byte [ebp - 0x11], al
jmp 0x5f694d
cmp eax, 0x4000000
jae 0x5f68f7
mov edx, eax
shr edx, 0x18
and dl, 3
or dl, 0xf8
mov byte [ebp - 0x14], dl
mov edx, eax
shr edx, 0x12
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x13], dl
mov edx, eax
shr edx, 0xc
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x12], dl
mov edx, eax
shr edx, 6
and dl, 0x3f
or dl, 0x80
and al, 0x3f
or al, 0x80
mov cl, 4
mov byte [ebp - 0x11], dl
mov byte [ebp - 0x10], al
jmp 0x5f694d
cmp eax, 0x80000000
jae 0x5f694d
mov edx, eax
shr edx, 0x1e
and dl, 1
or dl, 0xfc
mov byte [ebp - 0x14], dl
mov edx, eax
shr edx, 0x18
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x13], dl
mov edx, eax
shr edx, 0x12
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x12], dl
mov edx, eax
shr edx, 0xc
and dl, 0x3f
or dl, 0x80
mov byte [ebp - 0x11], dl
mov edx, eax
shr edx, 6
and dl, 0x3f
or dl, 0x80
and al, 0x3f
or al, 0x80
mov cl, 5
mov byte [ebp - 0x10], dl
mov byte [ebp - 0xf], al
add cl, 1
movzx ecx, cl
mov dword [ebp - 0xc], ecx
add cl, 4
add cl, cl
add cl, cl
lea eax, [ebp - 0x14]
add cl, cl
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
jmp 0x5f6970
movzx eax, byte [eax]
mov edx, dword [esi + 0xc]
shl eax, 0x18
mov ecx, 0x20
sub ecx, edx
mov ebx, eax
shr ebx, cl
or dword [esi + 8], ebx
cmp edx, 8
jbe 0x5f6994
add edx, 0xfffffff8
mov dword [esi + 0xc], edx
jmp 0x5f69cb
mov ebx, 8
sub ebx, edx
cmp edx, 0x20
jne 0x5f69a4
xor eax, eax
jmp 0x5f69a8
mov ecx, edx
shl eax, cl
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
shr ecx, 3
add ecx, dword [esi]
bswap edx
mov dword [esi + 8], edx
mov dword [ecx], edx
add dword [esi + 4], 0x20
mov dword [esi + 8], eax
mov eax, 0x20
sub eax, ebx
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 8]
mov cl, byte [eax]
mov byte [edi], cl
add eax, 1
add edi, 1
sub dword [ebp - 0xc], 1
mov dword [ebp - 8], eax
jne 0x5f6970
mov ecx, dword [ebp + 8]
movzx eax, byte [ecx + 0x12]
mov ah, byte [ecx + 0x11]
movzx edx, byte [ecx + 0x13]
mov bl, byte [ebp - 1]
mov byte [ebp + 0xb], 4
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 0x14]
shl eax, 8
or eax, edx
xor dl, dl
test bl, bl
jbe 0x5f6a37
movzx edi, bl
mov bl, byte [ebp + 0xb]
cmp dl, 8
jne 0x5f6a24
movzx edx, bl
movzx edx, byte [edx + ecx + 0x11]
or eax, edx
add bl, 1
xor dl, dl
test eax, eax
jns 0x5f6a2d
xor eax, 0x3800000
add eax, eax
add dl, 1
sub edi, 1
jne 0x5f6a10
mov edx, dword [esi + 0xc]
and eax, 0xff000000
mov ecx, 0x20
sub ecx, edx
mov edi, eax
shr edi, cl
or dword [esi + 8], edi
cmp edx, 8
jbe 0x5f6a60
add edx, 0xfffffff8
pop edi
mov dword [esi + 0xc], edx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, 8
sub edi, edx
cmp edx, 0x20
jne 0x5f6a70
xor eax, eax
jmp 0x5f6a74
mov ecx, edx
shl eax, cl
mov ecx, dword [esi + 4]
mov edx, dword [esi + 8]
shr ecx, 3
add ecx, dword [esi]
bswap edx
mov dword [esi + 8], edx
mov dword [ecx], edx
add dword [esi + 4], 0x20
mov dword [esi + 8], eax
mov eax, 0x20
sub eax, edi
mov dword [esi + 0xc], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4