Function at 0x1186620
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x18
mov ebp, dword [ecx]
xor eax, eax
cmp byte [ebp], 0x22
jne 0x11868dd
mov esi, ebp
jmp 0x118664f
lea esi, [ebx + 2]
mov dword [ecx], esi
cmp byte [ebx + 2], 0
je 0x11868dd
mov ebx, esi
inc esi
mov dword [ecx], esi
movzx edi, byte [ebx + 1]
cmp edi, 0x5c
je 0x1186640
test edi, edi
je 0x11868dd
cmp edi, 0x22
jne 0x118664f
mov dword [esp + 0xc], edx
add ebx, 2
mov dword [ecx], ebx
mov esi, ebp
sub ebx, ebp
mov eax, ebx
not eax
and eax, 2
and ebx, 0xfffffffd
sub ebx, eax
lea eax, [ebx + 1]
push eax
call dword [0x11c6008]
add esp, 4
mov edx, eax
test eax, eax
je case.0x11866f5.35
inc esi
mov dword [esp + 4], esi
movzx eax, byte [esi]
mov esi, edx
test al, al
je 0x1186891
mov esi, edx
mov ebp, dword [esp + 4]
jmp 0x11866d0
mov byte [esi], 0xa
nop
nop
nop
nop
nop
nop
nop
nop
nop
inc esi
movzx eax, byte [edi + 1]
inc edi
mov ebp, edi
test al, al
je 0x1186891
mov ecx, ebp
sub ecx, dword [esp + 4]
cmp ecx, ebx
jae 0x1186891
cmp al, 0x5c
jne 0x1186710
movzx eax, byte [ebp + 1]
add eax, 0xffffffde
cmp eax, 0x53
ja case.0x11866f5.35
lea edi, [ebp + 1]
jmp dword [eax*4 + 0x11c398c]
mov byte [esi], 0x22
jmp 0x11866c0
cmp al, 0x20
jb case.0x11866f5.35
mov byte [esi], al
mov edi, ebp
jmp 0x11866c0
mov byte [esi], 0x2f
jmp 0x11866c0
mov byte [esi], 8
jmp 0x11866c0
mov dword [esp], edx
lea ecx, [ebp + 2]
lea edx, [esp + 0x14]
call fcn.011868f0
test eax, eax
jne 0x11868ce
mov ecx, dword [esp + 0x14]
cmp ecx, 0x7f
ja 0x118677c
mov byte [esi], cl
mov eax, 1
add edi, eax
add edi, 3
mov edx, dword [esp]
jmp 0x11866c0
mov byte [esi], 0x5c
jmp 0x11866c0
mov byte [esi], 0xd
jmp 0x11866c0
mov byte [esi], 0xc
jmp 0x11866c0
mov byte [esi], 9
jmp 0x11866c0
cmp ecx, 0x7ff
mov edx, dword [esp]
ja 0x118679c
mov eax, ecx
shr eax, 6
or al, 0xc0
mov byte [esi], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 1], cl
inc esi
jmp 0x11867cc
lea eax, [ecx - 0xe000]
cmp eax, 0xfffff7ff
ja 0x11867db
mov eax, ecx
shr eax, 0xc
and al, 0xf
or al, 0xe0
mov byte [esi], al
mov eax, ecx
shr eax, 6
and al, 0x3f
or al, 0x80
mov byte [esi + 1], al
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
add esi, 2
mov eax, 1
add edi, eax
add edi, 3
jmp 0x11866c0
cmp ecx, 0xdbff
ja 0x11868ce
cmp byte [ebp + 6], 0x5c
jne 0x11868ce
cmp byte [ebp + 7], 0x75
jne 0x11868ce
add ebp, 8
mov dword [esp + 8], ecx
mov ecx, ebp
lea edx, [esp + 0x10]
call fcn.011868f0
mov ecx, dword [esp + 8]
test eax, eax
jne 0x11868ce
mov eax, dword [esp + 0x10]
cmp eax, 0xdc00
jb 0x11868ce
cmp eax, 0xdfff
ja 0x11868ce
shl ecx, 0xa
mov edx, 0xffc00
sub edx, ecx
and edx, 0xffc00
mov ecx, eax
and ecx, 0x3ff
or ecx, edx
xor ecx, 0xffc00
mov ebp, eax
lea eax, [ecx + 0x10000]
mov edx, eax
shr edx, 0x12
or dl, 0xf0
mov byte [esi], dl
shr eax, 0xc
and al, 0x3f
or al, 0x80
mov byte [esi + 1], al
shr ecx, 6
and cl, 0x3f
or cl, 0x80
mov byte [esi + 2], cl
mov eax, ebp
and al, 0x3f
or al, 0x80
mov byte [esi + 3], al
add esi, 3
mov eax, 7
jmp 0x118674f
mov byte [esi], 0
sub esi, edx
lea edi, [esi + 1]
push edi
mov ebx, edx
call dword [0x11c6008]
mov edx, ebx
add esp, 4
test eax, eax
je case.0x11866f5.35
push edi
push edx
push eax
mov edi, eax
mov ebx, edx
call fcn.0118ca20
add esp, 0xc
mov eax, dword [esp + 0xc]
mov dword [eax], esi
push ebx
call dword [0x11c6004]
add esp, 4
mov eax, edi
jmp 0x11868dd
mov edx, dword [esp]
push edx
call dword [0x11c6004]
add esp, 4
xor eax, eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret