Function at 0x40c4f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x24
test eax, eax
je 0x40c510
cmp eax, 1
je 0x40c510
cmp eax, 2
je 0x40c510
cmp eax, 3
je 0x40c510
xor eax, eax
add esp, 0x24
ret
mov ecx, dword [0x45770c]
push ebx
push ebp
push esi
test eax, eax
push edi
mov dword [esp + 0x10], ecx
jne 0x40c652
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
xor edx, edx
mov dword [esp + 0x14], edx
lea ebp, [ebx + ecx]
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov edx, ebp
sub edx, ebx
test edx, edx
jle 0x40c5de
jmp 0x40c559
mov ebp, dword [esp + 0x3c]
sub ebp, ebx
cmp ebp, 0x10
jle 0x40c565
mov ebp, 0x10
push 0x4574f8
push 0x4574f8
push 0x457508
call fcn.0040a190
mov ecx, ebp
mov esi, ebx
mov eax, ecx
lea edi, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add esp, 0xc
and ecx, 3
add ebx, ebp
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [eax + 0x4574f8]
mov dl, byte [esp + eax + 0x14]
xor dl, cl
mov byte [esp + eax + 0x14], dl
inc eax
cmp eax, 0x10
jl 0x40c596
mov eax, dword [esp + 0x10]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x14]
mov edi, eax
add eax, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov ecx, edx
sub eax, ebx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jg 0x40c555
mov eax, dword [esp + 0x38]
mov cl, 0x30
mov dl, 0x31
mov byte [esp + 0x25], cl
mov byte [esp + 0x26], cl
mov byte [esp + 0x29], cl
mov cl, 0x63
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2e], cl
mov cl, 0x76
cmp eax, 2
mov byte [esp + 0x24], 0x32
mov byte [esp + 0x27], 0x38
mov byte [esp + 0x28], dl
mov byte [esp + 0x2a], 0x32
mov byte [esp + 0x2b], dl
mov byte [esp + 0x2d], 0x62
mov byte [esp + 0x2f], 0x69
mov byte [esp + 0x30], cl
mov byte [esp + 0x31], cl
mov byte [esp + 0x32], 0x61
mov byte [esp + 0x33], 0x6c
jne 0x40c7c5
mov ecx, dword [esp + 0x40]
lea ebp, [ebx + ecx]
mov eax, ebp
mov dword [esp + 0x3c], ebp
sub eax, ebx
test eax, eax
jle 0x40c880
jmp 0x40c721
cmp eax, 1
jne 0x40c714
mov ebx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
xor ecx, ecx
mov dword [esp + 0x14], ecx
lea ebp, [ebx + edx]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov ecx, ebp
sub ecx, ebx
test ecx, ecx
jle 0x40c5de
jmp 0x40c68e
mov ebp, dword [esp + 0x3c]
sub ebp, ebx
cmp ebp, 0x10
jle 0x40c69a
mov ebp, 0x10
push 0x4574f8
push 0x4574f8
push 0x457508
call fcn.0040a190
mov ecx, ebp
mov esi, ebx
mov edx, ecx
lea edi, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 0xc
and ecx, 3
add ebx, ebp
rep movsb byte es:[edi], byte [esi]
xor eax, eax
mov cl, byte [eax + 0x4574f8]
mov dl, byte [esp + eax + 0x14]
xor dl, cl
mov byte [esp + eax + 0x14], dl
inc eax
cmp eax, 0x10
jl 0x40c6cb
mov eax, dword [esp + 0x10]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x14]
mov edi, eax
add eax, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov ecx, edx
sub eax, ebx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jg 0x40c68a
jmp 0x40c5da
mov ebx, dword [esp + 0x3c]
jmp 0x40c5de
mov ebp, dword [esp + 0x3c]
cmp eax, 0x10
jle 0x40c72d
mov ebp, 0x10
jmp 0x40c72f
sub ebp, ebx
mov ecx, ebp
mov esi, ebx
mov edx, ecx
lea edi, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + eax + 0x24]
mov dl, byte [esp + eax + 0x14]
xor dl, cl
mov byte [esp + eax + 0x14], dl
inc eax
cmp eax, 0x10
jl 0x40c747
lea edx, [esp + 0x14]
lea eax, [esp + 0x14]
push edx
push eax
push 0x457508
call fcn.0040a190
mov eax, dword [esp + 0x1c]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x20]
mov edi, eax
add eax, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x1c], eax
and ecx, 3
mov eax, dword [esp + 0x48]
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
lea esi, [esp + 0x20]
lea edi, [esp + 0x30]
add ebx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
add esp, 0xc
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jg 0x40c71d
mov eax, dword [0x45770c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp eax, 3
jne 0x40c880
mov eax, dword [esp + 0x40]
lea ebp, [ebx + eax]
mov eax, ebp
mov dword [esp + 0x3c], ebp
sub eax, ebx
test eax, eax
jle 0x40c880
jmp 0x40c7eb
mov ebp, dword [esp + 0x3c]
cmp eax, 0x10
jle 0x40c7f7
mov ebp, 0x10
jmp 0x40c7f9
sub ebp, ebx
mov ecx, ebp
mov esi, ebx
mov edx, ecx
lea edi, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
push 0x457508
call fcn.0040b300
add esp, 0xc
xor eax, eax
mov dl, byte [esp + eax + 0x24]
mov cl, byte [esp + eax + 0x14]
xor cl, dl
mov byte [esp + eax + 0x14], cl
inc eax
cmp eax, 0x10
jl 0x40c828
mov eax, dword [esp + 0x10]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x14]
mov edi, eax
add eax, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x10], eax
and ecx, 3
mov eax, dword [esp + 0x3c]
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
mov esi, ebx
lea edi, [esp + 0x24]
add ebx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
sub eax, ebx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
jg 0x40c7e7
mov eax, dword [0x45770c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret