Function at 0x40c6f2
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
sub esp, 0x34
push esi
mov esi, ecx
test eax, eax
jbe 0x40ca63
shr eax, 4
cmp byte [esi], 0
push edi
mov edi, eax
je 0x40c722
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call fcn.0040c03c
jmp 0x40ca62
lea eax, [esi + 8]
push 0x10
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0041bb20
add esp, 0xc
mov dword [ebp + 0xc], edi
test edi, edi
jbe 0x40ca51
mov edi, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi + 4]
shl eax, 4
lea eax, [eax + esi + 0x18]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
call fcn.0040c00a
movzx eax, byte [ebp - 0x14]
mov eax, dword [eax*4 + 0x4366c0]
movzx ecx, byte [ebp - 7]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0xa]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 0xd]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0x13]
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 0x10]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 6]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 9]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0xf]
mov dword [ebp - 0x20], eax
movzx eax, byte [ebp - 0xc]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0x12]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 5]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0xb]
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 8]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0xe]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 0x11]
xor eax, dword [ecx*4 + 0x435ac0]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 4]
dec eax
cmp eax, 1
jle 0x40c910
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + esi + 0x18]
dec eax
mov dword [ebp + 0x10], ecx
mov dword [ebp + 8], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040c00a
movzx eax, byte [ebp - 0x14]
mov eax, dword [eax*4 + 0x4366c0]
movzx ecx, byte [ebp - 7]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0xa]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 0xd]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0x13]
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 0x10]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 6]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 9]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0xf]
mov dword [ebp - 0x20], eax
movzx eax, byte [ebp - 0xc]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0x12]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 5]
xor eax, dword [ecx*4 + 0x435ac0]
movzx ecx, byte [ebp - 0xb]
sub dword [ebp + 0x10], 0x10
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebp - 8]
mov eax, dword [eax*4 + 0x4366c0]
xor eax, dword [ecx*4 + 0x4362c0]
movzx ecx, byte [ebp - 0xe]
xor eax, dword [ecx*4 + 0x435ec0]
movzx ecx, byte [ebp - 0x11]
xor eax, dword [ecx*4 + 0x435ac0]
dec dword [ebp + 8]
mov dword [ebp - 0x18], eax
jne 0x40c837
lea eax, [esi + 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0040c00a
movzx eax, byte [ebp - 0x14]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x24], al
movzx eax, byte [ebp - 7]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x23], al
movzx eax, byte [ebp - 0xa]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x22], al
movzx eax, byte [ebp - 0xd]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x21], al
movzx eax, byte [ebp - 0x10]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x20], al
movzx eax, byte [ebp - 0x13]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1f], al
movzx eax, byte [ebp - 6]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1e], al
movzx eax, byte [ebp - 9]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1d], al
movzx eax, byte [ebp - 0xc]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1c], al
movzx eax, byte [ebp - 0xf]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1b], al
movzx eax, byte [ebp - 0x12]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x1a], al
movzx eax, byte [ebp - 5]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x19], al
movzx eax, byte [ebp - 8]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x18], al
movzx eax, byte [ebp - 0xb]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x17], al
movzx eax, byte [ebp - 0xe]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x16], al
movzx eax, byte [ebp - 0x11]
mov al, byte [eax + 0x437ae0]
mov byte [ebp - 0x15], al
lea eax, [esi + 0x18]
push eax
lea eax, [ebp - 0x24]
push eax
push eax
call fcn.0040c00a
cmp byte [esi + 1], 0
je 0x40ca13
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
push eax
call fcn.0040c00a
mov eax, dword [edi]
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
mov dword [ebx], eax
mov eax, dword [ebp - 0x20]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0xc], eax
add edi, 0x10
add ebx, 0x10
dec dword [ebp + 0xc]
jne 0x40c749
pop ebx
push 0x10
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call fcn.0041bb20
add esp, 0xc
pop edi
pop esi
leave
ret 0xc