Function at 0x40c150
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x22c
push ebx
push ebp
mov ebx, ecx
push esi
mov esi, 2
mov dword [esp + 0x10], ebx
push edi
mov dword [ebx + 0xc0], 0
mov dword [esp + 0x20], esi
jmp 0x40c180
movzx ebp, byte [ebx + esi + 0x2c9c]
lea eax, [ebx + 0x239c]
mov edi, ebp
xor edx, edx
shr edi, 1
and ebp, 1
dec edi
or ebp, 2
mov ecx, edi
mov ebx, esi
shl ebp, cl
lea eax, [eax + ebp*4]
add ebp, esi
mov dword [esp + 0x1c], eax
mov eax, 1
mov dword [esp + 0x10], eax
shl dword [esp + 0x10], cl
mov dword [esp + 0x24], ebp
test edi, edi
je 0x40c203
mov ebp, edx
lea edx, [eax + eax]
mov esi, ebx
mov eax, dword [esp + 0x1c]
and esi, 1
shr ebx, 1
movzx ecx, word [edx + eax]
mov eax, esi
neg eax
shr ecx, 4
shr eax, 4
and eax, 0x7f
xor ecx, eax
mov eax, dword [esp + 0x14]
add ebp, dword [eax + ecx*4 + 0x748]
lea eax, [edx + esi]
dec edi
jne 0x40c1c1
mov esi, dword [esp + 0x20]
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
inc esi
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x20], esi
movzx ecx, word [ecx + eax*2]
mov eax, ecx
xor ecx, 0x7f0
shr eax, 4
shr ecx, 4
mov eax, dword [ebx + eax*4 + 0x748]
mov ecx, dword [ebx + ecx*4 + 0x748]
add eax, edx
mov dword [esp + ebp*4 + 0x3c], eax
add ecx, edx
mov eax, dword [esp + 0x10]
add eax, ebp
mov dword [esp + eax*4 + 0x3c], ecx
cmp esi, 0x40
jb 0x40c180
mov esi, ebx
mov dword [esp + 0x24], 4
lea ebx, [esp + 0x40]
sub ebx, esi
sub ebx, 0x161c
lea eax, [esi + 0x219c]
mov dword [esp + 0x34], ebx
lea ebp, [esi + 0x121c]
mov dword [esp + 0x10], eax
lea edi, [esi + 0x1624]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], edi
mov edx, dword [esi + 0xc8]
inc edx
shr edx, 1
mov dword [esp + 0x38], edx
je 0x40c3c1
mov dword [esp + 0x28], ebp
mov eax, 0x20
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], edx
lea ecx, [ebp + 0x40]
mov dword [esp + 0x20], ecx
jmp 0x40c2b6
mov esi, edi
mov edi, eax
mov ecx, eax
and ecx, 1
shr edi, 1
neg ecx
shr ecx, 4
and ecx, 0x7f
movzx eax, word [ebp + edi*2]
shr eax, 4
xor eax, ecx
mov ecx, edi
and ecx, 1
shr edi, 1
neg ecx
shr ecx, 4
mov ebx, dword [esi + eax*4 + 0x748]
and ecx, 0x7f
movzx eax, word [ebp + edi*2]
shr eax, 4
xor eax, ecx
mov ecx, edi
and ecx, 1
shr edi, 1
neg ecx
shr ecx, 4
add ebx, dword [esi + eax*4 + 0x748]
and ecx, 0x7f
movzx eax, word [ebp + edi*2]
shr eax, 4
xor eax, ecx
add ebx, dword [esi + eax*4 + 0x748]
mov esi, edi
shr edi, 1
and esi, 1
mov eax, edi
neg esi
shr eax, 1
shr esi, 4
movzx ecx, word [ebp + edi*2]
and esi, 0x7f
shr ecx, 4
movzx edx, word [ebp + eax*2]
xor ecx, esi
mov esi, dword [esp + 0x20]
mov eax, edi
mov edi, dword [esp + 0x14]
and eax, 1
neg eax
shr edx, 4
shr eax, 4
and eax, 0x7f
xor edx, eax
mov eax, dword [edi + edx*4 + 0x748]
add eax, dword [edi + ecx*4 + 0x748]
movzx ecx, word [esi]
add ebx, eax
mov edx, dword [esp + 0x28]
mov eax, ecx
shr eax, 4
xor ecx, 0x7f0
shr ecx, 4
add esi, 2
mov dword [esp + 0x20], esi
mov eax, dword [edi + eax*4 + 0x748]
add eax, ebx
mov dword [edx], eax
mov eax, dword [edi + ecx*4 + 0x748]
add eax, ebx
mov dword [edx + 4], eax
add edx, 8
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x28], edx
dec dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
jne 0x40c2b4
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x18]
mov ecx, 7
mov eax, 0x20
cmp edx, ecx
jbe 0x40c3e0
nop
add dword [ebp + ecx*8], eax
add dword [ebp + ecx*8 + 4], eax
inc ecx
add eax, 0x10
cmp ecx, edx
jb 0x40c3d0
mov eax, dword [ebp]
mov esi, 4
mov dword [edi - 8], eax
mov eax, dword [ebp + 4]
mov dword [edi - 4], eax
mov eax, dword [ebp + 8]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], eax
lea eax, [edi + 8]
mov edi, dword [esp + 0x14]
jmp 0x40c410
movzx ecx, byte [edi + esi + 0x2c9c]
lea eax, [eax + 8]
add esi, 2
mov edx, dword [ebp + ecx*4]
mov ecx, dword [ebx + eax - 0xc]
add ecx, edx
mov dword [eax - 8], ecx
mov ecx, dword [ebx + eax - 8]
add ecx, edx
mov dword [eax - 4], ecx
cmp esi, 0x80
jb 0x40c410
mov edi, dword [esp + 0x18]
add ebp, 0x100
sub dword [esp + 0x10], 0xffffff80
add edi, 0x200
mov esi, dword [esp + 0x14]
sub ebx, 0x200
dec dword [esp + 0x24]
mov dword [esp + 0x30], ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x34], ebx
jne 0x40c283
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x22c
ret