Function at 0x40c860
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [0x429758]
sub esp, 0x38
push ebx
push esi
mov esi, dword [ecx*4 + 0x429510]
test esi, esi
je 0x40cacf
mov edx, dword [ecx*4 + 0x429450]
xor eax, eax
test edx, edx
jbe 0x40c8a4
mov bl, byte [eax + esi]
mov cl, al
add cl, 0x41
xor bl, cl
mov byte [eax + esi], bl
mov edx, dword [0x429758]
inc eax
cmp eax, dword [edx*4 + 0x429450]
jb 0x40c887
xor eax, eax
mov ax, word [esi]
add esi, 2
test eax, eax
jbe 0x40cacf
push ebp
mov dword [esp + 0x28], eax
push edi
mov ebp, dword [esi]
mov bl, byte [esi + 4]
add esi, 4
or ecx, 0xffffffff
inc esi
xor eax, eax
mov edi, esi
mov dword [esp + 0x14], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esi + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov dword [esp + 0x1c], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [edx + ecx + 1]
or ecx, 0xffffffff
mov edi, edx
mov dword [esp + 0x28], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ebp, 0x10
lea esi, [edx + ecx + 1]
jb 0x40c90b
mov eax, dword [0x424048]
mov dword [esp + 0x18], eax
jmp 0x40c916
mov eax, dword [ebp*4 + 0x424044]
mov dword [esp + 0x18], eax
test bl, 4
je 0x40c98b
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x40c95d
cmp byte [edi], 0
je 0x40c95d
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push edx
push eax
call dword [0x42102c]
test eax, eax
jne 0x40cabe
mov eax, dword [esp + 0x10]
push edi
push eax
call dword [0x42101c]
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x421018]
jmp 0x40cabe
mov ecx, dword [0x4296fc]
test ecx, ecx
je 0x40c97a
mov edx, dword [esp + 0x14]
push edx
push eax
call fcn.0040c770
add esp, 8
jmp 0x40cabe
mov ecx, dword [esp + 0x14]
push ecx
push eax
call dword [section..rdata]
jmp 0x40cabe
test bl, 1
je 0x40ca1f
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0x20019
push 0
push ecx
push eax
mov dword [esp + 0x44], 0
call dword [0x421024]
test eax, eax
jne 0x40ca06
test bl, 2
mov dword [esp + 0x24], 1
mov dword [esp + 0x20], 0x14
je 0x40c9da
mov eax, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], eax
lea edx, [esp + 0x20]
lea eax, [esp + 0x30]
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x28]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 0
push edx
push eax
call dword [0x421030]
mov ecx, dword [esp + 0x10]
push ecx
call dword [0x421018]
test bl, 2
je 0x40ca13
mov eax, dword [esp + 0x30]
test eax, eax
jmp 0x40ca19
mov al, byte [esp + 0x30]
test al, al
jne 0x40cabe
mov edx, dword [esp + 0x28]
push 0xffdc
push edx
push 0
call fcn.0040c440
mov edi, eax
lea eax, [edi + edi + 1]
push eax
call fcn.004190e0
mov edx, dword [esp + 0x38]
lea ecx, [edi + 1]
mov ebp, eax
push ecx
push edx
push ebp
call fcn.0040c440
add esp, 0x1c
mov dword [esp + 0x28], 1
test bl, 2
je 0x40ca72
push ebp
call fcn.0041970d
mov edi, 4
add esp, 4
mov dword [ebp], eax
mov dword [esp + 0x28], edi
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
push ecx
push edx
call dword [0x421010]
test eax, eax
jne 0x40cab5
mov eax, dword [esp + 0x28]
cmp eax, 1
jne 0x40ca95
inc edi
mov ecx, dword [esp + 0x10]
push edi
push ebp
push eax
mov eax, dword [esp + 0x28]
push 0
push eax
push ecx
call dword [0x421020]
mov edx, dword [esp + 0x10]
push edx
call dword [0x421018]
push ebp
call fcn.00419243
add esp, 4
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x40c8ba
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x38
ret