Function at 0x66800a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
xor edi, edi
xor esi, esi
mov dword [ebx + 0x6af80], 2
jmp 0x668251
cmp dword [ebx + 0x6af90], 3
jb 0x668088
mov eax, dword [ebx + 0x6af7c]
shl eax, 5
mov edx, dword [ebx + 0x6af84]
xor ecx, ecx
mov cl, byte [ebx + edx + 0x1af72]
xor eax, ecx
and eax, 0x7fff
mov dword [ebx + 0x6af7c], eax
mov eax, dword [ebx + 0x6af7c]
mov edi, dword [ebx + eax*4 + 0x4af70]
mov edx, dword [ebx + 0x6af84]
and edx, 0x7fff
mov dword [ebx + edx*4 + 0x2af70], edi
mov ecx, dword [ebx + 0x6af7c]
mov eax, dword [ebx + 0x6af84]
mov dword [ebx + ecx*4 + 0x4af70], eax
test edi, edi
je 0x6680d0
mov edx, dword [ebx + 0x6af84]
sub edx, edi
cmp edx, 0x7efa
ja 0x6680d0
mov ecx, dword [ebx + 0x6afa0]
cmp ecx, dword [ebx + 0x6af90]
jbe 0x6680b6
mov eax, dword [ebx + 0x6af90]
mov dword [ebx + 0x6afa0], eax
push edi
push ebx
call fcn.00667ce9
add esp, 8
mov esi, eax
cmp esi, dword [ebx + 0x6af90]
jbe 0x6680d0
mov esi, dword [ebx + 0x6af90]
cmp esi, 3
jb 0x6681ce
mov eax, esi
sub eax, 3
push eax
mov edx, dword [ebx + 0x6af84]
sub edx, dword [ebx + 0x6af88]
push edx
push ebx
call fcn.00667435
add esp, 0xc
mov dword [ebp - 4], eax
sub dword [ebx + 0x6af90], esi
cmp esi, dword [ebx + 0x6af98]
ja 0x668179
cmp dword [ebx + 0x6af90], 3
jb 0x668179
dec esi
inc dword [ebx + 0x6af84]
mov ecx, dword [ebx + 0x6af7c]
shl ecx, 5
mov eax, dword [ebx + 0x6af84]
xor edx, edx
mov dl, byte [ebx + eax + 0x1af72]
xor ecx, edx
and ecx, 0x7fff
mov dword [ebx + 0x6af7c], ecx
mov ecx, dword [ebx + 0x6af7c]
mov edi, dword [ebx + ecx*4 + 0x4af70]
mov eax, dword [ebx + 0x6af84]
and eax, 0x7fff
mov dword [ebx + eax*4 + 0x2af70], edi
mov edx, dword [ebx + 0x6af7c]
mov ecx, dword [ebx + 0x6af84]
mov dword [ebx + edx*4 + 0x4af70], ecx
dec esi
jne 0x668110
inc dword [ebx + 0x6af84]
jmp 0x6681f8
add dword [ebx + 0x6af84], esi
xor esi, esi
mov eax, dword [ebx + 0x6af84]
xor edx, edx
mov dl, byte [ebx + eax + 0x1af70]
mov dword [ebx + 0x6af7c], edx
mov ecx, dword [ebx + 0x6af7c]
shl ecx, 5
mov eax, dword [ebx + 0x6af84]
xor edx, edx
mov dl, byte [ebx + eax + 0x1af71]
xor ecx, edx
and ecx, 0x7fff
mov dword [ebx + 0x6af7c], ecx
push str.Call_UPDATE_HASH___MIN_MATCH_3_more_times
push 1
push ebx
call fcn.0066650a
add esp, 0xc
jmp 0x6681f8
mov ecx, dword [ebx + 0x6af84]
xor eax, eax
mov al, byte [ebx + ecx + 0x1af70]
push eax
push 0
push ebx
call fcn.00667435
add esp, 0xc
mov dword [ebp - 4], eax
dec dword [ebx + 0x6af90]
inc dword [ebx + 0x6af84]
cmp dword [ebp - 4], 0
je 0x66823e
push 0
mov edx, dword [ebx + 0x6af84]
sub edx, dword [ebx + 0x6af74]
push edx
cmp dword [ebx + 0x6af74], 0
jl 0x668226
mov ecx, dword [ebx + 0x6af74]
add ecx, ebx
add ecx, 0x1af70
jmp 0x668228
xor ecx, ecx
push ecx
push ebx
call fcn.006671e1
add esp, 0x10
mov eax, dword [ebx + 0x6af84]
mov dword [ebx + 0x6af74], eax
cmp dword [ebx + 0x6af90], 0x106
jae 0x668251
push ebx
call fcn.00667ebf
pop ecx
cmp dword [ebx + 0x6af90], 0
jne 0x668027
push 1
mov edx, dword [ebx + 0x6af84]
sub edx, dword [ebx + 0x6af74]
push edx
cmp dword [ebx + 0x6af74], 0
jl 0x668285
mov eax, dword [ebx + 0x6af74]
add eax, ebx
add eax, 0x1af70
jmp 0x668287
xor eax, eax
push eax
push ebx
call fcn.006671e1
add esp, 0x10
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret