Function at 0x12975e1
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
xor esi, esi
cmp byte [ecx + 4], 0
push edi
mov dword [ebp - 0x14], ecx
jne 0x1297603
mov dword [ebp + 0x18], 0xc004d101
jmp 0x12977a2
cmp dword [ebp + 8], esi
je 0x1297619
mov eax, dword [ecx]
mov ebx, dword [eax + 0xc]
mov eax, dword [ebp + 0x14]
lea eax, [ebx + eax + 1]
cmp dword [ebp + 0xc], eax
jae 0x1297625
mov dword [ebp + 0x18], 0x80070057
jmp 0x12977a2
mov edi, dword [ebp + 0xc]
sub edi, ebx
dec edi
mov eax, edi
mov dword [ebp - 0x10], eax
add eax, ebx
add eax, edi
add eax, ebx
push eax
mov dword [ebp - 0xc], ebx
call fcn.0106d011
mov esi, eax
pop ecx
test esi, esi
jne 0x1297652
mov dword [ebp + 0x18], 0x8007000e
jmp 0x12977a2
lea eax, [edi + ebx]
add eax, esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
add eax, ebx
add eax, edi
add eax, esi
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 4], edi
test eax, eax
jne 0x1297672
mov eax, esi
push dword [ebp + 0x1c]
push eax
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push esi
call fcn.01297472
mov dword [ebp + 0x18], eax
test eax, eax
jl 0x12977a2
lea eax, [ebx + ebx]
mov ecx, eax
mov eax, dword [ebp + 0xc]
sub eax, ecx
sub eax, dword [ebp + 0x14]
dec eax
dec eax
mov dword [ebp + 0xc], eax
je 0x12976b7
push dword [ebp + 0xc]
mov eax, dword [ebp - 4]
add eax, esi
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [ebp + 0xc]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
push dword [ebp + 0x14]
mov byte [eax + esi], 1
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
add eax, esi
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0x14]
add dword [ebp - 4], eax
add esp, 0xc
lea edx, [edi + esi]
lea ecx, [ebp - 0x24]
call fcn.01284414
lea ecx, [ebp - 0x24]
call fcn.0128441b
push ebx
push ecx
push ecx
mov ecx, esp
and dword [ecx + 4], 0
mov dword [ecx], eax
call fcn.01290ea2
mov dword [ebp + 0x18], eax
test eax, eax
jl 0x12977a2
push dword [ebp - 0x10]
lea eax, [edi + esi]
push ebx
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x18]
mov ecx, dword [eax]
call fcn.012974b2
mov dword [ebp + 0x18], eax
test eax, eax
jl 0x12977a2
test edi, edi
jbe 0x1297748
mov ecx, dword [ebp - 0x18]
mov eax, esi
sub ecx, esi
mov dword [ebp + 0x14], edi
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
dec dword [ebp + 0x14]
jne 0x129773d
push ebx
push edi
push esi
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push dword [ebp - 8]
mov ecx, dword [eax]
call fcn.012974b2
mov dword [ebp + 0x18], eax
test eax, eax
jl 0x12977a2
mov edx, dword [ebp - 0xc]
test edx, edx
jbe 0x129777b
mov eax, dword [ebp - 8]
lea ecx, [edi + esi]
sub ecx, eax
mov bl, byte [ecx + eax]
xor byte [eax], bl
inc eax
dec edx
jne 0x1297772
push dword [ebp - 0xc]
mov ebx, dword [ebp + 8]
push dword [ebp - 8]
lea eax, [ebx + 1]
push eax
mov byte [ebx], 0
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xc]
push edi
lea eax, [ebx + eax + 1]
push esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x18
push esi
call fcn.0106d020
mov eax, dword [ebp + 0x18]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0x18