Function at 0x3b0bc0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov esi, ecx
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movzx edx, word [esi + 4]
mov word [ebp - 0x16], dx
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x3b0c1c
mov edi, eax
mov eax, edi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], esi
jmp 0x3b0d4b
push 0
push edi
call fcn.00379d40
add esp, 8
mov dword [ebp - 0x10], eax
jmp 0x3b0be5
push dword [ebp + 0x14]
push edi
push eax
call fcn.003b0a70
jmp 0x3b0c3f
xor ebx, ebx
movzx edx, word [eax + ebx]
add ebx, 2
cmp dx, word [ebp - 0x16]
jae 0x3b0c30
test dx, dx
jne 0x3b0c1e
lea edi, [eax + ebx]
add edi, 0xfffffffe
test ecx, ecx
je 0x3b0c3f
cmp ebx, 2
jne 0x3b0c10
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0
jle 0x3b0c00
mov ebx, edi
mov eax, ebx
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
mov ebx, dword [ebp - 0x10]
jmp 0x3b0c49
cmp eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
je 0x3b0c55
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
mov edx, dword [ebp + 0x10]
test edx, edx
jne 0x3b0cc2
mov eax, ebx
mov ebx, dword [ebp - 0x28]
jmp 0x3b0cfd
mov ebx, esi
jmp 0x3b0c88
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x2c]
cmp ebx, eax
je 0x3b0c5a
mov ecx, dword [ebp + 0x10]
test ecx, ecx
mov esi, dword [ebp - 0x1c]
je 0x3b0cdc
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x2c]
call fcn.003b0a70
cmp ebx, dword [ebp - 0x10]
je 0x3b0c49
test al, al
je 0x3b0c49
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
mov edx, dword [ebp + 0x10]
movzx eax, word [ebp - 0x14]
mov ecx, esi
push dword [ebp + 0x14]
push edx
push eax
push edi
call fcn.003b0e70
test al, al
jne 0x3b0d4d
jmp 0x3b0c49
cmp ebx, dword [ebp - 0x10]
je 0x3b0c55
xor eax, eax
cmp edi, 0x10000
setae al
lea eax, [ebx + eax*2]
add eax, 2
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x14]
cmp word [esi + 0xa], cx
ja 0x3b0d10
cmp word [esi + 0x1a], cx
ja 0x3b0c49
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 - 0x28], edi
mov dword [ebp - 0x20], ecx
test dh, dh
je 0x3b0c49
mov ebx, eax
cmp ebx, dword [ebp - 0x10]
je 0x3b0c55
mov dword [ebp - 0x2c], ebx
mov esi, ebx
jmp 0x3b0d70
mov edi, dword [ebp - 0x24]
add esi, 2
mov ebx, esi
mov esi, ebx
cmp ebx, dword [ebp - 0x10]
je 0x3b0c85
movzx edi, word [esi]
cmp di, word [ebp - 0x16]
jb 0x3b0d60
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebx + 0x1c]
mov ecx, dword [edx]
mov eax, edi
mov dword [ebp - 0x30], edx
mov edi, dword [edx + 4]
mov edx, eax
shr edx, 6
movzx ecx, word [ecx + edx*2]
mov dword [ebp - 0x24], eax
and eax, 0x3f
mov dword [ebp - 0x34], edi
lea edx, [edi + eax*2]
movzx ecx, word [edx + ecx*2]
movzx eax, word [ebx + 0xa]
cmp ax, cx
mov dword [ebp - 0x14], ecx
ja 0x3b0d5d
mov edx, ecx
and edx, 0xfdff
movzx edx, dx
cmp edx, 0xfc00
je 0x3b0d5d
mov edi, dword [ebp - 0x24]
mov edx, edi
and edx, 0xfc00
cmp edx, 0xd800
jne 0x3b0c81
lea ebx, [esi + 2]
cmp ebx, dword [ebp - 0x10]
je 0x3b0c85
movzx ecx, word [ebx]
mov edx, ecx
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x3b0d65
mov edx, eax
shl edi, 0xa
add edi, ecx
add edi, 0xfca02400
mov eax, dword [ebp - 0x30]
cmp edi, dword [eax + 0x10]
jl 0x3b0e18
mov eax, dword [eax + 0xc]
add eax, 0xfffffffe
jmp 0x3b0e29
push edi
push eax
call fcn.003ae400
add esp, 8
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 0xa]
mov ecx, dword [ebp - 0x34]
movzx ecx, word [ecx + eax*2]
cmp dx, cx
setbe al
mov dword [ebp - 0x14], ecx
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 0x3b0d65
jmp 0x3b0c88