Function at 0xa6c1c78
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 0xa6c1c92
cmp dword [ebp + 8], 0
je 0xa6c1f07
cmp dword [ebp + 0x2c], 0
je 0xa6c1f07
cmp dword [ebp + 0x30], 0
je 0xa6c1f07
push dword [ebp + 0x24]
call fcn.0a6be80d
pop ecx
test eax, eax
jne 0xa6c1f0a
mov ebx, dword [ebp + 0x28]
cmp ebx, 0xffffffff
je 0xa6c1ccf
push ebx
call fcn.0a6be80d
pop ecx
test eax, eax
je 0xa6c1cd5
jmp 0xa6c1f0a
mov ebx, dword [ebp + 0x24]
mov dword [ebp + 0x28], ebx
push dword [ebp + 0x20]
call fcn.0a6c1a79
pop ecx
test eax, eax
jne 0xa6c1f0a
imul eax, ebx, 0x68
push 0
pop ebx
mov edi, dword [eax + 0xa589308]
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 0xa6c1f03
mov eax, ebx
sub eax, ecx
mov dword [ebp - 0x14], eax
add eax, 0xfffffffe
cmp esi, eax
ja 0xa6c1f03
push ebx
call fcn.0a711250
mov esi, eax
push ebx
mov dword [ebp - 0x10], esi
call fcn.0a711250
push edi
mov dword [ebp - 8], eax
call fcn.0a711250
add esp, 0xc
mov dword [ebp - 0xc], eax
test esi, esi
je 0xa6c1ee3
cmp dword [ebp - 8], 0
je 0xa6c1edc
test eax, eax
je 0xa6c1edc
cmp dword [ebp + 0x10], 0
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], ebx
push esi
je 0xa6c1d6f
push dword [ebp + 0x14]
push dword [ebp + 0x10]
jmp 0xa6c1d72
push 0
push esi
push dword [ebp + 0x28]
call fcn.0a6c19c4
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c1ebd
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.0a708a10
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 0xa6c1dd8
push eax
push dword [ebp + 8]
lea eax, [ecx + esi]
push eax
call fcn.0a708490
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 + 0xa58a694]
add esp, 0xc
cmp eax, edi
je 0xa6c1df9
push 9
pop esi
jmp 0xa6c1ebd
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.0a6c295d
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c1ebd
mov edx, dword [ebp + 0xc]
test edx, edx
je 0xa6c1e39
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 0xa6c1e2b
mov edx, dword [ebp + 0xc]
push edi
push dword [ebp - 8]
push edx
push dword [ebp - 0x10]
push dword [ebp + 0x24]
call fcn.0a6c295d
mov esi, eax
add esp, 0x14
test esi, esi
jne 0xa6c1ebd
test edi, edi
je 0xa6c1e6b
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 0xa6c1e60
mov esi, dword [ebp + 0x30]
mov ecx, dword [ebp - 0xc]
cmp dword [esi], ebx
jae 0xa6c1e7e
mov dword [esi], ebx
push 6
jmp 0xa6c1df3
mov eax, dword [ebp + 0x2c]
push edi
push ecx
mov byte [eax], 0
inc eax
push eax
mov dword [ebp - 4], 1
call fcn.0a708490
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.0a708490
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.0a70c592
push dword [ebp - 8]
call fcn.0a70c592
push dword [ebp - 0x10]
call fcn.0a70c592
add esp, 0xc
mov eax, esi
jmp 0xa6c1f0a
push esi
call fcn.0a70c592
pop ecx
mov eax, dword [ebp - 8]
test eax, eax
je 0xa6c1ef1
push eax
call fcn.0a70c592
pop ecx
mov eax, dword [ebp - 0xc]
test eax, eax
je 0xa6c1eff
push eax
call fcn.0a70c592
pop ecx
push 0xd
jmp 0xa6c1f09
push 0x16
jmp 0xa6c1f09
push 0x10
pop eax
pop edi
pop esi
pop ebx
leave
ret