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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x1029912c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, edx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0xb0], ecx
xor ecx, ecx
mov dword [ebp - 0xa0], edi
mov dl, byte [edi + 0x4c5]
movzx esi, byte [edi + 0x4c9]
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0x98], esi
cmp dl, 1
jne 0x1009795c
movzx eax, word [edi + 0x62c]
mov dword [ebp - 0x8c], eax
test ax, ax
jns 0x10097791
movzx eax, word [edi + 0x4c0]
jmp 0x10097793
xor eax, eax
mov esi, dword [ebp - 0x90]
mov edx, ebx
sub edx, eax
mov dword [ebp - 0xac], 1
dec esi
mov dword [ebp - 0x9c], edx
add esi, edx
test dword [ebp - 0x8c], 0x4000
mov al, byte [esi]
movzx ecx, al
mov byte [ebp - 0x85], al
mov eax, ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0x94], eax
mov dword [ebp - 0xa8], eax
je 0x100978cd
mov ebx, ecx
lea eax, [edx - 1]
sub ebx, edx
mov edx, 0xff
add ebx, dword [ebp - 0x98]
shr ebx, 0x1f
dec bl
cmp eax, edx
cmovg eax, edx
xor edx, edx
mov dword [ebp - 0x8c], eax
test eax, eax
jle 0x10097833
mov edi, eax
mov ah, byte [ebp - 0x85]
nop
mov al, byte [esi]
lea esi, [esi - 1]
sub ecx, edx
xor al, ah
shr ecx, 0x1f
inc edx
dec cl
and cl, al
or bl, cl
mov ecx, dword [ebp - 0xa4]
cmp edx, edi
jl 0x10097810
mov edi, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
sub eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x94]
sub eax, ecx
push 1
push 1
push dword [ebp + 0xc]
dec eax
push ecx
push eax
push dword [ebp - 0x90]
lea eax, [ebp - 0x84]
push eax
mov eax, dword [edi + 0x1b8]
push edi
call eax
mov edx, dword [ebp - 0x9c]
mov edi, eax
mov ecx, dword [ebp - 0x90]
lea eax, [ebp - 0x84]
push eax
mov eax, dword [ebp - 0xa0]
movzx esi, byte [eax + 0x4c9]
push esi
call fcn.10097240
or al, bl
add esp, 0x28
not al
mov cl, al
shr cl, 4
and al, cl
movzx eax, al
mov ecx, eax
shr ecx, 2
and ecx, eax
mov eax, ecx
shr eax, 1
and eax, ecx
dec eax
add eax, edi
jne 0x100979a1
mov edi, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x94]
mov esi, dword [ebp - 0x98]
jmp 0x100979b9
mov esi, dword [ebp - 0x98]
xor ecx, ecx
sub ebx, esi
push 1
push 1
push dword [ebp + 0xc]
lea edx, [ebx - 1]
cmp eax, edx
mov dword [ebp - 0x9c], edx
cmova eax, ecx
cmp dword [ebp - 0xa8], edx
mov dword [ebp - 0x94], eax
mov eax, ebx
cmovbe ecx, dword [ebp - 0xa4]
sub eax, ecx
push ecx
dec eax
push eax
push dword [ebp - 0x90]
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0x1b8]
push edi
call eax
mov edx, dword [ebp - 0x90]
lea ecx, [ebp - 0x44]
sub ebx, dword [ebp - 0x94]
dec edx
push esi
add edx, ebx
mov dword [ebp - 0x8c], eax
call fcn.1008e520
add esp, 0x24
test eax, eax
jne 0x100979a1
cmp dword [ebp - 0x8c], eax
jne 0x100979a1
mov eax, dword [ebp - 0x9c]
cmp dword [ebp - 0xa8], eax
ja 0x100979a1
mov ecx, dword [ebp - 0x94]
jmp 0x100979b9
test dl, dl
jne 0x100979b9
push 1
push 1
push dword [ebp + 0xc]
sub ebx, esi
push 0xffffffffffffffff
push ebx
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0x1b8]
push edi
call eax
mov edx, dword [ebp - 0x90]
lea ecx, [ebp - 0x44]
push esi
mov dword [ebp - 0x8c], eax
lea edx, [ebx + edx]
call fcn.1008e520
add esp, 0x24
test eax, eax
jne 0x100979a1
cmp dword [ebp - 0x8c], eax
je 0x100979b7
pop edi
pop esi
mov eax, 0xfffffecf
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101d506b
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp byte [edi + 0x4c5], 2
jne 0x100979cb
movzx eax, word [edi + 0x4c2]
jmp 0x100979d5
mov eax, dword [ebp - 0xac]
add eax, esi
add eax, ecx
mov ecx, dword [ebp - 0xb0]
pop edi
pop esi
pop ebx
mov dword [ecx], eax
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101d506b
mov esp, ebp
pop ebp
ret