Function at 0x10155720
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x10]
push ebp
push esi
mov esi, ecx
mov ebp, edx
push edi
mov dword [esp + 0x14], ebp
mov eax, dword [esi + 0x1f0]
mov ecx, dword [esi + 0xaa0]
and ecx, dword [esp + 0x24]
shl eax, 4
add eax, 0x3556
mov dword [esp + 0x10], ecx
add eax, ecx
lea edx, [esi + eax*2]
mov eax, dword [esi + 0x18]
cmp ebx, 0xffffffff
jne 0x10155896
mov edi, dword [ebp]
mov ecx, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x14]
mov dword [esi + eax*4 + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [esi + eax*4 + 0x108], edx
mov eax, edi
inc dword [esi + 0x18]
sub eax, ecx
mov ecx, 8
sub cl, byte [esi + 0xaa4]
movzx edx, byte [eax + ebx - 1]
mov eax, dword [esi + 0xaa8]
and eax, dword [esp + 0x24]
shr edx, cl
mov ecx, dword [esi + 0xaa4]
shl eax, cl
lea ecx, [esi + 0xaac]
add edx, eax
imul eax, edx, 0x600
add ecx, eax
mov eax, edi
sub eax, dword [ebp + 0x18]
cmp dword [esi + 0x1f0], 7
movzx edx, byte [eax + ebx]
jge 0x101557dd
push edx
mov edx, ecx
mov ecx, esi
push 8
call fcn.10156610
add esp, 8
jmp 0x1015583f
sub edi, dword [esi + 0x1f4]
mov ebp, ecx
sub edi, dword [esp + 0x1c]
movzx edi, byte [edi + ebx - 1]
mov ebx, 0x100
add edx, ebx
mov eax, dword [esi + 0x18]
mov ecx, edx
shr ecx, 7
add edi, edi
and ecx, 1
mov dword [esi + eax*4 + 0x20], ecx
mov ecx, ebx
and ecx, edi
mov eax, edx
shr eax, 8
add ecx, ebx
add eax, ecx
add edx, edx
lea ecx, [eax*2]
mov eax, dword [esi + 0x18]
add ecx, ebp
mov dword [esi + eax*4 + 0x108], ecx
mov eax, edi
inc dword [esi + 0x18]
xor eax, edx
not eax
and ebx, eax
cmp edx, 0x10000
jb 0x101557f5
mov ebp, dword [esp + 0x14]
mov eax, dword [esi + 0x1f0]
cmp eax, 3
jg 0x10155861
xor eax, eax
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebp + 0x18], eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp eax, 9
jg 0x1015587e
add eax, 0xfffffffd
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebp + 0x18], eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
add eax, 0xfffffffa
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
sub dword [ebp + 0x18], eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [esi + eax*4 + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
mov edi, dword [esi + 0x1f0]
mov eax, dword [esi + 0x18]
add edi, 0x3616
lea edx, [esi + eax*4]
lea edi, [esi + edi*2]
cmp ebx, 4
jae 0x10155a7a
mov dword [edx + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edi
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
mov edi, dword [esp + 0x20]
lea edx, [esi + eax*4]
test ebx, ebx
jne 0x10155945
mov eax, dword [esi + 0x1f0]
mov ebx, dword [esp + 0x10]
add eax, 0x3622
mov dword [edx + 0x20], 0
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x1f0]
mov edx, dword [esi + 0x18]
shl eax, 4
add eax, 0x3646
add eax, ebx
lea ecx, [esi + eax*2]
xor eax, eax
cmp edi, 1
setne al
mov dword [esi + edx*4 + 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
jmp 0x10155a12
mov eax, dword [esi + ebx*4 + 0x1f4]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x1f0]
add eax, 0x3622
mov dword [edx + 0x20], 1
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
mov edx, dword [esi + 0x1f0]
mov eax, dword [esi + 0x18]
add edx, 0x362e
lea ecx, [esi + eax*4]
lea edx, [esi + edx*2]
cmp ebx, 1
jne 0x101559a2
mov dword [ecx + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
jmp 0x101559f8
mov dword [ecx + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x1f0]
mov ecx, dword [esi + 0x18]
add eax, 0x363a
lea edx, [esi + eax*2]
lea eax, [ebx - 2]
mov dword [esi + ecx*4 + 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
cmp ebx, 3
jne 0x101559ec
mov eax, dword [esi + 0x1fc]
mov dword [esi + 0x200], eax
mov eax, dword [esi + 0x1f8]
mov dword [esi + 0x1fc], eax
mov eax, dword [esi + 0x1f4]
mov ebx, dword [esp + 0x10]
mov dword [esi + 0x1f8], eax
mov eax, dword [esp + 0x20]
mov dword [esi + 0x1f4], eax
cmp edi, 1
jne 0x10155a3b
xor eax, eax
cmp dword [esi + 0x1f0], 7
setge al
sub dword [ebp + 0x18], edi
pop edi
lea eax, [eax*2 + 9]
mov dword [esi + 0x1f0], eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
movzx eax, byte [esi + 0xa9c]
lea edx, [esi + 0xb958]
push eax
push edi
push ebx
mov ecx, esi
call fcn.10155da0
add esp, 0xc
mov eax, 0xb
cmp dword [esi + 0x1f0], 7
mov ecx, 8
cmovl eax, ecx
sub dword [ebp + 0x18], edi
pop edi
mov dword [esi + 0x1f0], eax
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [edx + 0x20], 0
mov edx, ecx
mov eax, dword [esi + 0x18]
mov ecx, esi
mov dword [esi + eax*4 + 0x108], edi
lea eax, [ebx - 4]
mov edi, dword [esp + 0x20]
inc dword [esi + 0x18]
push edi
push eax
call fcn.10155c50
add esp, 8
sub dword [ebp + 0x18], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret