Function at 0xb13900
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x34
mov ecx, dword [eax + 0x18]
mov word [ebp - 0x2a], dx
mov edx, dword [eax + 0x14]
mov esi, dword [eax]
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x30], edx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x1c]
sar ecx, 1
lea ebx, [ecx + ecx - 2]
add ecx, ecx
and eax, 0xfffffffe
mov dword [ebp - 0x34], eax
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ecx
mov ebx, eax
shl ebx, 0x10
or ebx, eax
movzx eax, word [ebp - 0x2a]
mov dword [ebp - 0x14], ebx
not ebx
mov dword [ebp - 0x18], ebx
not eax
mov word [ebp - 0x36], ax
sub dword [ebp - 0x20], 1
cmp dword [ebp - 0x20], 0xffffffff
je 0xb13a7b
mov eax, edx
xor eax, esi
test al, 2
je 0xb13a83
mov ecx, dword [ebp - 0x30]
test dl, 2
mov dword [ebp - 0x24], ecx
je 0xb139b2
movzx edi, word [edx]
movzx ebx, word [esi]
add esi, 2
movzx ecx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x2a]
and ecx, edi
and eax, ebx
movzx ecx, cx
movzx eax, ax
and ebx, edi
and bx, word [ebp - 0x36]
lea eax, [ecx + eax]
sar eax, 1
lea eax, [ebx + eax]
mov ebx, dword [ebp - 0x30]
mov word [edx], ax
add edx, 2
sub ebx, 1
mov dword [ebp - 0x24], ebx
cmp dword [ebp - 0x24], 1
lea eax, [esi + 2]
mov dword [ebp - 0x28], eax
mov ecx, dword [eax - 4]
jle 0xb13a2d
mov ebx, dword [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], ebx
jmp 0xb139d2
mov ecx, edi
mov ebx, dword [ebp - 0x1c]
shr ecx, 0x10
mov esi, dword [ebp - 0x18]
and esi, dword [edx + eax]
mov edi, dword [ebx + eax + 2]
mov ebx, edi
shl ebx, 0x10
add ecx, ebx
mov ebx, dword [ebp - 0x14]
and ebx, dword [edx + eax]
and esi, ecx
and ecx, dword [ebp - 0x14]
shr ebx, 1
shr ecx, 1
lea ebx, [esi + ebx]
add ebx, ecx
mov dword [edx + eax], ebx
add eax, 4
sub dword [ebp - 0x10], 2
cmp dword [ebp - 0x10], 1
jg 0xb139d0
mov ebx, dword [ebp - 0x24]
sub ebx, 2
mov eax, ebx
shr eax, 1
lea ecx, [eax*4 + 4]
neg eax
lea eax, [ebx + eax*2]
add edx, ecx
add dword [ebp - 0x28], ecx
mov ecx, edi
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0xb13a64
movzx esi, word [edx]
shr ecx, 0x10
movzx ebx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x2a]
and ebx, ecx
and ecx, esi
and eax, esi
movzx ebx, bx
and cx, word [ebp - 0x36]
movzx eax, ax
lea eax, [ebx + eax]
sar eax, 1
lea eax, [ecx + eax]
mov word [edx], ax
add edx, 2
add dword [ebp - 0x28], 2
mov esi, dword [ebp - 0x28]
sub dword [ebp - 0x20], 1
add esi, dword [ebp - 0x3c]
add edx, dword [ebp - 0x34]
cmp dword [ebp - 0x20], 0xffffffff
jne 0xb13963
add esp, 0x34
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x30]
test esi, 2
mov dword [ebp - 0x1c], eax
je 0xb13ac9
movzx edi, word [edx]
movzx ebx, word [esi]
add esi, 2
movzx ecx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x2a]
and ecx, edi
and eax, ebx
movzx ecx, cx
movzx eax, ax
and ebx, edi
lea eax, [ecx + eax]
mov ecx, dword [ebp - 0x30]
and bx, word [ebp - 0x36]
sar eax, 1
lea eax, [ebx + eax]
sub ecx, 1
mov word [edx], ax
add edx, 2
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 1
jle 0xb13b1d
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov ebx, dword [edx + eax]
sub edi, 2
mov ecx, dword [esi + eax]
and ebx, dword [ebp - 0x14]
and ecx, dword [ebp - 0x14]
shr ebx, 1
shr ecx, 1
lea ecx, [ebx + ecx]
mov ebx, dword [edx + eax]
and ebx, dword [esi + eax]
and ebx, dword [ebp - 0x18]
add ecx, ebx
mov dword [edx + eax], ecx
add eax, 4
cmp edi, 1
jg 0xb13ad4
mov ebx, dword [ebp - 0x1c]
sub ebx, 2
mov eax, ebx
shr eax, 1
lea ecx, [eax*4 + 4]
neg eax
lea eax, [ebx + eax*2]
add esi, ecx
add edx, ecx
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0xb13b53
movzx edi, word [edx]
movzx ebx, word [esi]
add esi, 2
movzx ecx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x2a]
and ecx, edi
and eax, ebx
movzx ecx, cx
movzx eax, ax
and ebx, edi
and bx, word [ebp - 0x36]
lea eax, [ecx + eax]
sar eax, 1
lea eax, [ebx + eax]
mov word [edx], ax
add edx, 2
add esi, dword [ebp - 0x40]
add edx, dword [ebp - 0x34]
jmp 0xb13955