Function at 0x40c6f0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [0x427644]
sub esp, 0x28
push ebx
mov ebx, dword [ecx*4 + 0x4273d0]
test ebx, ebx
je 0x40c965
mov edx, dword [ecx*4 + 0x427310]
xor eax, eax
test edx, edx
jbe 0x40c733
mov dl, byte [eax + ebx]
mov cl, al
add cl, 0x42
xor dl, cl
mov byte [eax + ebx], dl
mov edx, dword [0x427644]
inc eax
cmp eax, dword [edx*4 + 0x427310]
jb 0x40c716
xor eax, eax
mov ax, word [ebx]
add ebx, 2
test eax, eax
jbe 0x40c965
push ebp
push esi
push edi
mov dword [esp + 0x2c], eax
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
add ebx, 4
mov dword [esp + 0x18], eax
add ebx, 9
mov dword [esp + 0x14], ecx
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
mov ebp, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebp
lea edx, [ebx + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov esi, edx
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x18]
not ecx
dec ecx
lea ebx, [edx + ecx + 1]
mov edx, dword [0x4271bc]
mov dword [esp + 0x34], ebx
push edx
add ebx, edi
call fcn.0040c2e0
push 0xffdc
push esi
push 0
call fcn.0040bd90
mov ebp, eax
add esp, 0x14
test ebp, ebp
mov dword [esp + 0x34], ebp
je 0x40c953
lea eax, [ebp + ebp + 1]
push eax
call fcn.00418c70
lea ecx, [ebp + 1]
mov dword [esp + 0x2c], eax
push ecx
push esi
push eax
call fcn.0040bd90
mov edx, dword [0x4271bc]
push 2
push edx
call fcn.00401040
mov esi, eax
add esp, 0x18
cmp esi, 0xffffffff
mov dword [esp + 0x1c], esi
je 0x40c946
cmp dword [esp + 0x18], 0xffffffff
jne 0x40c915
test edi, edi
je 0x40c93d
push esi
call fcn.004011c0
add esp, 4
cmp eax, 0x8000
mov esi, eax
jb 0x40c817
mov esi, 0x8000
sub eax, esi
mov ebp, eax
lea eax, [esp + 0x10]
push eax
push esi
mov dword [esp + 0x28], ebp
call fcn.004020c0
add esp, 8
test eax, eax
je 0x40c939
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
push esi
push ecx
push edx
call fcn.004010c0
add esp, 0xc
mov dword [esp + 0x24], 0
mov eax, esi
test ebp, ebp
mov edx, 0x4000
jne 0x40c860
sub eax, edi
inc eax
mov edx, eax
mov eax, dword [esp + 0x10]
test edx, edx
je 0x40c88a
jmp 0x40c86e
mov edi, dword [esp + 0x14]
mov ecx, edi
mov edi, dword [esp + 0x30]
mov esi, eax
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x40c882
inc eax
dec edx
jne 0x40c86a
jmp 0x40c886
test edx, edx
jne 0x40c8e1
mov ebp, dword [esp + 0x20]
test ebp, ebp
je 0x40c8f7
mov edi, dword [esp + 0x10]
mov ecx, 0x1000
lea esi, [edi + 0x4000]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x24]
mov esi, 0x4000
add ecx, esi
cmp ebp, esi
mov dword [esp + 0x24], ecx
ja 0x40c8b4
mov esi, ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
add eax, 0x4000
push esi
push eax
push ecx
call fcn.004010c0
mov edi, dword [esp + 0x20]
add esp, 0xc
sub ebp, esi
lea eax, [esi + 0x4000]
mov dword [esp + 0x20], ebp
jmp 0x40c852
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
sub eax, esi
add eax, edx
add eax, ecx
mov dword [esp + 0x18], eax
lea edx, [esp + 0x10]
push edx
call fcn.00402140
mov eax, dword [esp + 0x1c]
add esp, 4
cmp eax, 0xffffffff
je 0x40c939
mov ebp, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push eax
push esi
call fcn.00401160
mov ecx, dword [esp + 0x30]
push ebp
push ecx
push esi
call fcn.00401100
push 0
push esi
call fcn.004011a0
add esp, 0x1c
jmp 0x40c93d
mov esi, dword [esp + 0x1c]
push esi
call fcn.004012c0
add esp, 4
mov edx, dword [esp + 0x28]
push edx
call fcn.00418dd3
add esp, 4
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x40c74a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret