Function at 0xa6c2f84
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
test esi, esi
je 0xa6c2f9e
cmp dword [ebp + 8], 0
je 0xa6c3213
cmp dword [ebp + 0x2c], 0
je 0xa6c3213
cmp dword [ebp + 0x30], 0
je 0xa6c3213
push dword [ebp + 0x24]
call fcn.0a6bfb15
pop ecx
test eax, eax
jne 0xa6c3216
mov ebx, dword [ebp + 0x28]
cmp ebx, 0xffffffff
je 0xa6c2fdb
push ebx
call fcn.0a6bfb15
pop ecx
test eax, eax
je 0xa6c2fe1
jmp 0xa6c3216
mov ebx, dword [ebp + 0x24]
mov dword [ebp + 0x28], ebx
push dword [ebp + 0x20]
call fcn.0a6c2d85
pop ecx
test eax, eax
jne 0xa6c3216
imul eax, ebx, 0x68
push 0
pop ebx
mov edi, dword [eax + 0xa589338]
mov eax, dword [ebp + 0x18]
test al, 7
setne bl
shr eax, 3
add ebx, eax
lea ecx, [edi + edi]
lea eax, [ebx - 2]
cmp ecx, eax
jae 0xa6c320f
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x14], eax
add eax, 0xfffffffe
cmp esi, eax
ja 0xa6c320f
push ebx
call fcn.0a712510
mov esi, eax
push ebx
mov dword [ebp - 0x10], esi
call fcn.0a712510
push edi
mov dword [ebp - 8], eax
call fcn.0a712510
add esp, 0xc
mov dword [ebp - 0xc], eax
test esi, esi
je 0xa6c31ef
cmp dword [ebp - 8], 0
je 0xa6c31e8
test eax, eax
je 0xa6c31e8
cmp dword [ebp + 0x10], 0
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], ebx
push esi
je 0xa6c307b
push dword [ebp + 0x14]
push dword [ebp + 0x10]
jmp 0xa6c307e
push 0
push esi
push dword [ebp + 0x28]
call fcn.0a6c2cd0
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c31c9
mov ecx, dword [ebp - 0x14]
sub ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
sub ecx, 2
push ecx
push eax
mov dword [ebp - 4], edi
lea eax, [esi + edi]
mov dword [ebp - 0x14], ecx
push eax
call fcn.0a709cd0
mov eax, dword [ebp - 4]
add esp, 0xc
add eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov byte [esi + eax], 1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
inc ecx
mov dword [ebp - 4], ecx
test eax, eax
je 0xa6c30e4
push eax
push dword [ebp + 8]
lea eax, [ecx + esi]
push eax
call fcn.0a709750
mov eax, dword [ebp + 0xc]
add esp, 0xc
add dword [ebp - 4], eax
imul eax, dword [ebp + 0x20], 0x28
push dword [ebp + 0x1c]
mov esi, dword [ebp - 0xc]
push edi
push esi
call dword [eax + 0xa58a6c4]
add esp, 0xc
cmp eax, edi
je 0xa6c3105
push 9
pop esi
jmp 0xa6c31c9
mov eax, ebx
sub eax, edi
dec eax
push eax
push dword [ebp - 8]
mov dword [ebp + 0xc], eax
push edi
push esi
push dword [ebp + 0x24]
call fcn.0a6c3c69
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c31c9
mov edx, dword [ebp + 0xc]
test edx, edx
je 0xa6c3145
mov esi, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
sub esi, ecx
mov al, byte [ecx + esi]
xor byte [ecx], al
inc ecx
sub edx, 1
jne 0xa6c3137
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp - 8]
push edx
push dword [ebp - 0x10]
push dword [ebp + 0x24]
call fcn.0a6c3c69
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c31c9
test edi, edi
je 0xa6c3177
mov esi, dword [ebp - 8]
mov ecx, edi
mov edx, dword [ebp - 0xc]
sub esi, edx
mov al, byte [edx + esi]
xor byte [edx], al
inc edx
sub ecx, 1
jne 0xa6c316c
mov esi, dword [ebp + 0x30]
mov ecx, dword [ebp - 0xc]
cmp dword [esi], ebx
jae 0xa6c318a
mov dword [esi], ebx
push 6
jmp 0xa6c30ff
mov eax, dword [ebp + 0x2c]
push edi
push ecx
mov byte [eax], 0
inc eax
push eax
mov dword [ebp - 4], 1
call fcn.0a709750
mov eax, dword [ebp - 4]
push dword [ebp + 0xc]
add eax, edi
push dword [ebp - 0x10]
mov dword [ebp - 4], eax
add eax, dword [ebp + 0x2c]
push eax
call fcn.0a709750
mov eax, dword [ebp - 4]
sub ebx, edi
dec eax
add esp, 0x18
add eax, ebx
mov dword [esi], eax
xor esi, esi
mov dword [ebp - 4], eax
push dword [ebp - 0xc]
call fcn.0a70d852
push dword [ebp - 8]
call fcn.0a70d852
push dword [ebp - 0x10]
call fcn.0a70d852
add esp, 0xc
mov eax, esi
jmp 0xa6c3216
push esi
call fcn.0a70d852
pop ecx
mov eax, dword [ebp - 8]
test eax, eax
je 0xa6c31fd
push eax
call fcn.0a70d852
pop ecx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0xa6c320b
push eax
call fcn.0a70d852
pop ecx
push 0xd
jmp 0xa6c3215
push 0x16
jmp 0xa6c3215
push 0x10
pop eax
pop edi
pop esi
pop ebx
leave
ret