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

Disassembly:
push ebp
mov ebp, ecx
push edi
lea edi, [ecx + 1]
push esi
xor esi, esi
push ebx
mov ebx, 1
sub esp, 0x34
mov dword [esp + 0x10], ecx
movzx ecx, byte [esp + 0x48]
mov dword [esp + 0x18], edx
xor edx, edx
shld esi, ebx, cl
shl ebx, cl
test cl, 0x20
mov dword [esp + 0x20], eax
cmovne esi, ebx
cmovne ebx, edx
lea eax, [edi + edi]
mov dword [esp + 0x24], eax
mov ecx, ebx
mov ebx, esi
add ecx, 8
adc ebx, 0
xor edx, edx
add eax, ecx
adc edx, ebx
xor ebx, ebx
cmp dword [esp + 0x50], eax
mov esi, ebx
sbb esi, edx
setb dl
cmp ebp, 0xff
mov ebx, edx
seta al
mov edx, 0xffffffd2
or bl, al
mov byte [esp + 8], bl
jne 0x101f2d12
cmp dword [esp + 0x48], 0xc
mov edx, 0xffffffd4
ja 0x101f2d12
mov eax, dword [esp + 0x20]
movzx ecx, byte [esp + 0x48]
movzx edx, word [esp + 0x48]
lea ebp, [eax + 4]
mov eax, 1
mov esi, eax
shl esi, cl
lea ebx, [esi - 1]
mov dword [esp + 0x1c], esi
mov esi, edx
or esi, 0x10000
mov dword [esp + 4], ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x48]
lea ecx, [esi - 1]
shl eax, cl
mov esi, eax
test edi, edi
je 0x101f2e08
mov dword [esp + 0x14], ebp
mov edx, ebx
mov ebp, dword [esp + 0x18]
mov ebx, 1
mov word [esp + 0xc], si
xor eax, eax
mov esi, dword [esp + 0x4c]
xor edi, edi
jmp 0x101f2bcc
cmp cx, word [esp + 0xc]
mov word [esi + eax*2], cx
lea ecx, [eax + 1]
mov byte [esp + 8], 1
cmovge ebx, edi
cmp dword [esp + 0x10], eax
je 0x101f2bf4
mov eax, ecx
movzx ecx, word [ebp + eax*2]
cmp cx, 0xffff
jne 0x101f2bb0
mov ecx, dword [esp + 0x14]
mov byte [ecx + edx*4 + 2], al
mov ecx, 1
sub edx, 1
mov word [esi + eax*2], cx
lea ecx, [eax + 1]
cmp dword [esp + 0x10], eax
jne 0x101f2bca
cmp byte [esp + 8], 0
mov ebp, dword [esp + 0x14]
je 0x101f2c0d
movzx eax, word [esp + 0x2c]
shl ebx, 0x10
or eax, ebx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 4]
mov dword [eax], edi
cmp edx, ebx
je 0x101f2d1c
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], edx
mov edi, ebp
mov dword [esp + 0xc], 0
mov esi, dword [esp + 0xc]
mov ecx, eax
shr eax, 3
shr ecx, 1
lea ecx, [ecx + eax + 3]
xor eax, eax
lea esi, [esi]
lea esi, [esi]
mov edx, dword [esp + 0x18]
movsx ebp, word [edx + esi*2]
mov edx, esi
xor esi, esi
mov byte [esp + 8], dl
mov word [esp + 0x14], bp
cmp word [esp + 0x14], 0
jle 0x101f2c9b
lea esi, [esi]
movzx edx, byte [esp + 8]
mov byte [edi + eax*4 + 2], dl
add eax, ecx
mov edx, dword [esp + 4]
and eax, ebx
cmp edx, eax
jae 0x101f2c94
lea esi, [esi]
add eax, ecx
and eax, ebx
cmp edx, eax
jb 0x101f2c88
mov dword [esp + 4], edx
add esi, 1
cmp esi, ebp
jne 0x101f2c70
mov edx, dword [esp + 0xc]
lea esi, [edx + 1]
cmp dword [esp + 0x10], edx
je 0x101f2cae
mov dword [esp + 0xc], esi
jmp 0x101f2c50
mov ebp, edi
mov edx, 0xffffffff
test eax, eax
jne 0x101f2d12
movzx esi, byte [esp + 0x48]
mov edi, dword [esp + 0x20]
mov eax, 4
mov edx, ebp
movzx ebx, word [esp + 0x1c]
mov ecx, esi
shl eax, cl
lea edi, [edi + eax + 4]
lea esi, [esi]
lea esi, [esi]
movzx eax, byte [edx + 2]
mov ecx, dword [esp + 0x4c]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
lea ebp, [eax + 1]
mov word [ecx], bp
bsr ecx, eax
add edx, 4
xor ecx, 0x1f
lea ecx, [esi + ecx - 0x1f]
shl eax, cl
mov byte [edx - 1], cl
sub eax, ebx
mov word [edx - 4], ax
cmp edi, edx
jne 0x101f2ce0
xor edx, edx
add esp, 0x34
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x24]
xor ecx, ecx
mov esi, dword [esp + 0x4c]
mov edx, eax
shr eax, 3
add esi, ebx
shr edx, 1
lea edi, [edx + eax + 3]
mov dword [esp + 8], esi
mov eax, dword [esp + 0x18]
add esi, 0x10
mov dword [esp + 0x14], esi
xor edx, edx
add ebx, eax
mov dword [esp + 0x18], ebp
mov ebp, eax
mov dword [esp + 0x10], ebx
xor ebx, ebx
mov dword [esp + 0x24], edi
mov edi, edx
movsx esi, word [ebp]
mov eax, dword [esp + 8]
mov dword [eax + edi], ecx
mov dword [eax + edi + 4], ebx
cmp si, 8
jle 0x101f2d9c
lea eax, [eax + edi + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x14]
lea edx, [eax + edi]
lea eax, [esi - 9]
and eax, 0xfffffff8
add edx, eax
mov eax, dword [esp + 0xc]
lea esi, [esi]
mov dword [eax], ecx
add eax, 8
mov dword [eax - 4], ebx
cmp edx, eax
jne 0x101f2d90
add edi, esi
add ecx, 0x1010101
adc ebx, 0x1010101
add ebp, 2
cmp dword [esp + 0x10], ebp
jne 0x101f2d5c
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
lea ebx, [edi + edi]
mov esi, dword [esp + 8]
xor edx, edx
xor eax, eax
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 4]
and ebx, eax
mov ecx, ebx
movzx ebx, byte [esi + edx]
mov byte [ebp + ecx*4 + 2], bl
mov ebx, dword [esp + 4]
lea ecx, [edi + eax]
and ecx, ebx
movzx ebx, byte [esi + edx + 1]
add edx, 2
mov byte [ebp + ecx*4 + 2], bl
mov ebx, dword [esp + 0xc]
add eax, ebx
mov ebx, dword [esp + 4]
and eax, ebx
mov ebx, dword [esp + 0x1c]
cmp edx, ebx
jb 0x101f2dca
jmp 0x101f2cb9
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
mov dword [eax], edi
mov eax, dword [esp + 0x1c]
mov edx, eax
shr eax, 1
shr edx, 3
lea edi, [edx + eax + 3]
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
jmp 0x101f2dbb