Function at 0x6b3540
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov esi, ecx
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movzx ecx, word [ecx + 4]
mov word [ebp - 0x1a], cx
mov dword [ebp - 0x10], edx
test edx, edx
je 0x6b3592
mov ebx, eax
mov eax, ebx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], esi
mov ebx, eax
jmp 0x6b36b3
push 0
push ebx
call fcn.0054c590
add esp, 8
mov dword [ebp - 0x10], eax
jmp 0x6b3565
xor ecx, ecx
movzx edx, word [eax + ecx]
add ecx, 2
cmp dx, word [ebp - 0x1a]
jae 0x6b35a6
test dx, dx
jne 0x6b3594
cmp ecx, 2
sete dl
cmp dword [ebp + 0x10], 0
sete dh
lea ebx, [eax + ecx]
add ebx, 0xfffffffe
or dh, dl
jne 0x6b35c8
mov ecx, dword [ebp + 0x10]
push edi
push ebx
push eax
call fcn.006b3480
cmp dword [edi], 0
jle 0x6b3582
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
cmp eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x10]
je 0x6b35cd
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
test ecx, ecx
jne 0x6b3697
mov eax, ebx
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp word [esi + 0xa], cx
ja 0x6b3611
cmp word [esi + 0x1a], cx
ja 0x6b35cd
movzx edx, cx
mov ecx, edx
shr ecx, 1
cmp edx, 0xfc00
mov edx, 0
cmovb ecx, edx
cmp byte [ebp - 0x20], cl
setbe dl
test cl, cl
sete dh
or dh, dl
mov edi, ebx
cmovne edi, eax
cmp cl, 2
cmovae edi, ebx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], ecx
test dh, dh
jne 0x6b357b
jmp 0x6b35cd
mov ebx, esi
mov eax, dword [ebp - 0x28]
cmp ebx, eax
je 0x6b35d9
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x6b37b7
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x28]
call fcn.006b3480
cmp ebx, dword [ebp - 0x10]
je 0x6b35cd
test al, al
je 0x6b35cd
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
movzx eax, word [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edi
call fcn.006b37e0
test al, al
je 0x6b35cd
cmp ebx, dword [ebp - 0x10]
je 0x6b35cd
mov dword [ebp - 0x28], ebx
mov esi, ebx
jmp 0x6b36cf
add esi, 2
mov ebx, esi
mov esi, ebx
cmp ebx, dword [ebp - 0x10]
je 0x6b3653
movzx edi, word [esi]
cmp di, word [ebp - 0x1a]
jb 0x6b36c3
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x1c]
mov ecx, dword [edx]
mov dword [ebp - 0x2c], edx
mov ebx, dword [edx + 4]
mov edx, edi
shr edx, 6
movzx ecx, word [ecx + edx*2]
mov edx, edi
and edx, 0x3f
mov dword [ebp - 0x30], ebx
lea edx, [ebx + edx*2]
movzx ebx, word [edx + ecx*2]
movzx ecx, word [eax + 0xa]
cmp cx, bx
setbe dl
mov dword [ebp - 0x18], ebx
and ebx, 0xfdff
cmp ebx, 0xfc00
setne dh
test dl, dh
je 0x6b36c3
mov edx, edi
and edx, 0xfc00
cmp edx, 0xd800
jne 0x6b3651
lea ebx, [esi + 2]
cmp ebx, dword [ebp - 0x10]
je 0x6b36c8
movzx eax, word [ebx]
mov edx, eax
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x6b36c8
shl edi, 0xa
add edi, eax
add edi, 0xfca02400
mov eax, dword [ebp - 0x2c]
cmp edi, dword [eax + 0x10]
jl 0x6b376c
mov eax, dword [eax + 0xc]
add eax, 0xfffffffe
jmp 0x6b377d
push edi
push eax
call fcn.004e0b40
add esp, 8
mov ecx, dword [ebp - 0x14]
movzx ecx, word [ecx + 0xa]
mov edx, dword [ebp - 0x30]
movzx edx, word [edx + eax*2]
cmp cx, dx
setbe al
mov dword [ebp - 0x18], edx
mov ecx, edx
and ecx, 0xfdff
cmp ecx, 0xfc00
setne cl
and cl, al
mov eax, ecx
xor al, 1
movzx eax, al
lea ebx, [esi + eax*4]
test cl, cl
je 0x6b36c8
jmp 0x6b3653
cmp ebx, dword [ebp - 0x10]
je 0x6b35cd
xor eax, eax
cmp edi, 0x10000
setae al
lea eax, [ebx + eax*2]
add eax, 2
mov dword [ebp - 0x20], 0
jmp 0x6b35ff