Function at 0x6c297ee8
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
cmp dword [ebx + 4], 3
jle 0x6c2982cc
mov edx, dword [ebx + 0x6af90]
mov eax, edx
mov esi, 2
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
nop
test eax, eax
je 0x6c298044
mov ecx, dword [ebx + 0x6af84]
cmp eax, 2
jbe 0x6c297f75
movzx edi, byte [ebx + ecx + 0x1af72]
mov ebp, dword [ebx + 0x6af7c]
shl ebp, 5
xor edi, ebp
and edi, 0x7fff
mov dword [ebx + 0x6af7c], edi
add edi, 0x12bdc
mov dword [esp + 0x28], edi
mov edi, dword [ebx + edi*4]
mov dword [esp + 0x1c], edi
mov ebp, ecx
and ebp, 0x7fff
mov dword [ebx + ebp*4 + 0x2af70], edi
mov edi, dword [esp + 0x28]
mov dword [ebx + edi*4], ecx
mov dword [ebx + 0x6af80], esi
mov ebp, dword [ebx + 0x6af88]
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x6c2980b0
cmp esi, dword [ebx + 0x6af98]
jae 0x6c2980b0
mov edi, ecx
sub edi, dword [esp + 0x1c]
cmp edi, 0x7efa
ja 0x6c2980b0
cmp dword [ebx + 0x6afa0], eax
jbe 0x6c297fb9
mov dword [ebx + 0x6afa0], eax
mov ecx, dword [esp + 0x1c]
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.6c297754
mov edx, dword [ebx + 0x6af90]
cmp eax, edx
mov edi, edx
cmovbe edi, eax
cmp edi, 3
je 0x6c298090
mov esi, dword [ebx + 0x6af80]
mov ecx, dword [ebx + 0x6af84]
nop
cmp esi, 2
jbe 0x6c297ff9
cmp edi, esi
jbe 0x6c298110
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x6c2980bc
inc ecx
mov dword [ebx + 0x6af84], ecx
lea eax, [edx - 1]
mov edx, eax
mov dword [ebx + 0x6af90], eax
mov esi, edi
mov dword [esp + 0x20], 1
cmp eax, 0x105
ja 0x6c297f1c
mov dword [esp], ebx
call fcn.6c297974
mov edx, dword [ebx + 0x6af90]
mov eax, edx
test eax, eax
jne 0x6c297f24
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x6c29829c
mov edx, dword [ebx + 0x6af74]
mov eax, dword [ebx + 0x6af84]
sub eax, edx
test edx, edx
js 0x6c2982c4
lea edx, [ebx + edx + 0x1af70]
mov dword [esp + 0xc], 1
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.6c2974a4
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebx + 0x6af84]
mov eax, ecx
sub eax, dword [ebx + 0x6af88]
mov esi, dword [ebx + 0x6af80]
cmp eax, 0x1000
jbe 0x6c297fec
nop
mov edi, 2
jmp 0x6c297fec
movzx eax, byte [ebx + ecx + 0x1af6f]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6c2968d4
test eax, eax
jne 0x6c298240
mov eax, dword [ebx + 0x6af84]
inc eax
mov dword [ebx + 0x6af84], eax
mov edx, dword [ebx + 0x6af90]
lea eax, [edx - 1]
mov edx, eax
mov dword [ebx + 0x6af90], eax
mov esi, edi
mov dword [esp + 0x20], 1
jmp 0x6c298021
lea edx, [ecx + edx - 3]
mov dword [esp + 0x20], edx
sub esi, 3
mov dword [esp + 8], esi
not ebp
add ecx, ebp
mov dword [esp + 4], ecx
mov dword [esp], ebx
call fcn.6c2968d4
mov dword [esp + 0x2c], eax
mov ecx, dword [ebx + 0x6af80]
mov edx, dword [ebx + 0x6af90]
lea eax, [edx + 1]
sub eax, ecx
mov edx, eax
mov dword [ebx + 0x6af90], eax
sub ecx, 2
mov dword [esp + 0x24], ecx
mov dword [ebx + 0x6af80], ecx
mov esi, dword [ebx + 0x6af84]
mov dword [esp + 0x28], esi
mov ecx, esi
inc ecx
mov esi, dword [esp + 0x24]
mov dword [esp + 0x18], eax
nop
cmp dword [esp + 0x20], ecx
jb 0x6c2981b8
movzx edi, byte [ebx + ecx + 0x1af72]
mov ebp, dword [ebx + 0x6af7c]
shl ebp, 5
xor edi, ebp
and edi, 0x7fff
mov dword [ebx + 0x6af7c], edi
add edi, 0x12bdc
mov ebp, dword [ebx + edi*4]
mov dword [esp + 0x1c], ebp
mov ebp, ecx
and ebp, 0x7fff
mov eax, dword [esp + 0x1c]
mov dword [ebx + ebp*4 + 0x2af70], eax
mov dword [ebx + edi*4], ecx
inc ecx
dec esi
jne 0x6c298170
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x6af80], 0
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
lea ecx, [edi + esi + 1]
mov dword [ebx + 0x6af84], ecx
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x6c298284
mov eax, dword [ebx + 0x6af74]
sub ecx, eax
test eax, eax
js 0x6c2982dc
lea eax, [ebx + eax + 0x1af70]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.6c2974a4
mov eax, dword [ebx + 0x6af84]
mov dword [ebx + 0x6af74], eax
mov edx, dword [ebx + 0x6af90]
mov eax, edx
mov esi, 2
mov dword [esp + 0x20], 0
jmp 0x6c298021
mov edx, dword [ebx + 0x6af74]
mov eax, dword [ebx + 0x6af84]
sub eax, edx
test edx, edx
js 0x6c298298
lea edx, [ebx + edx + 0x1af70]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
call fcn.6c2974a4
mov eax, dword [ebx + 0x6af84]
mov dword [ebx + 0x6af74], eax
jmp 0x6c2980e6
mov esi, 2
mov dword [esp + 0x20], 0
jmp 0x6c298021
xor edx, edx
jmp 0x6c298259
mov eax, dword [ebx + 0x6af84]
movzx eax, byte [ebx + eax + 0x1af6f]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.6c2968d4
jmp 0x6c298050
xor edx, edx
jmp 0x6c29806d
mov dword [esp + 0x50], ebx
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.6c297c48
xor eax, eax
jmp 0x6c2981ff