Function at 0x405ecd
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x14], ecx
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x10], ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp + 0x18]
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], 0xf
mov byte [ecx], bl
test edi, edi
je 0x4060fe
mov dword [ebp - 0x28], 0x6172647e
mov dword [ebp - 0x24], 0x7e6e6f47
mov dword [ebp - 0x20], 8
mov dword [ebp - 0xc], 0x5a
test dl, dl
je 0x405f31
mov dword [ebp - 0x27], 0x25374046
mov word [ebp - 0x23], 0x246d
mov dword [ebp - 0xc], 0x71
mov esi, ebx
shr edi, 1
mov eax, ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
je 0x405f9d
sub esp, 0x18
lea ecx, [ebp + 8]
mov eax, esp
push 2
push ebx
push eax
call fcn.00403d20
call fcn.00405dd3
add esp, 0x18
mov byte [ebp - 1], al
cmp esi, dword [ebp - 0x2c]
je 0x405f7a
mov byte [esi], al
inc esi
mov dword [ebp - 0x30], esi
jmp 0x405f8a
lea eax, [ebp - 1]
push eax
push esi
lea ecx, [ebp - 0x34]
call fcn.0040713e
mov esi, dword [ebp - 0x30]
add ebx, 2
sub edi, 1
jne 0x405f51
mov edi, dword [ebp - 0x1c]
xor ebx, ebx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 8], esi
mov al, byte [eax]
lea ecx, [ebp - 0x40]
xor al, byte [ebp - 0xc]
mov byte [ebp - 1], al
lea eax, [ebp - 1]
push eax
push ebx
call fcn.0040713e
mov edx, dword [ebp - 0x34]
xor esi, esi
inc esi
cmp edi, esi
jbe 0x405fed
mov ecx, dword [ebp - 0x3c]
mov ebx, esi
cmp ecx, dword [ebp - 0x38]
je 0x405fd1
mov al, byte [edx + ebx]
mov byte [ecx], al
inc ecx
mov dword [ebp - 0x3c], ecx
jmp 0x405fe6
mov eax, dword [ebp - 0x34]
add eax, ebx
push eax
push ecx
lea ecx, [ebp - 0x40]
call fcn.0040713e
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x34]
inc ebx
cmp ebx, edi
jl 0x405fc1
xor ebx, ebx
mov ecx, dword [ebp - 8]
mov eax, ebx
sub ecx, edx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 8], ecx
cmp ecx, 8
jbe 0x406047
mov esi, dword [ebp - 0x20]
mov ecx, ebx
mov dword [ebp - 0xc], ebx
mov dl, byte [ebp + ecx - 0x28]
mov byte [ebp - 1], dl
cmp eax, dword [ebp - 0x50]
je 0x406021
mov byte [eax], dl
inc eax
mov dword [ebp - 0x54], eax
jmp 0x406034
lea ecx, [ebp - 1]
push ecx
push eax
lea ecx, [ebp - 0x58]
call fcn.0040713e
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, 8
jl 0x40600d
add esi, esi
cmp dword [ebp - 8], esi
ja 0x406008
xor esi, esi
inc esi
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
test edi, edi
je 0x40607f
push edi
lea ecx, [ebp - 0x4c]
call fcn.00406fa9
mov esi, dword [ebp - 0x4c]
push edi
push ebx
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x20], ebx
lea eax, [esi + edi]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x48], eax
call fcn.00406f0f
xor esi, esi
inc esi
cmp edi, esi
jbe 0x40609e
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x58]
mov cl, byte [ebx + esi]
mov eax, dword [ebp - 0x4c]
xor cl, byte [edx + esi - 1]
mov byte [eax + esi - 1], cl
inc esi
cmp esi, edi
jl 0x406089
xor ebx, ebx
dec edi
test edi, edi
jle 0x4060de
mov esi, dword [ebp - 0x40]
mov eax, dword [ebp - 0x4c]
mov cl, byte [esi + ebx]
mov al, byte [eax + ebx]
mov bl, al
movzx edx, al
sub bl, cl
movzx eax, cl
sub edx, eax
lea eax, [ebx - 1]
movzx ecx, al
movzx eax, bl
cmovns ecx, eax
movzx eax, cl
mov ecx, dword [ebp - 0x14]
push eax
call fcn.00401a65
mov ebx, dword [ebp - 0x10]
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, edi
jl 0x4060a6
lea ecx, [ebp - 0x4c]
call fcn.00403d01
lea ecx, [ebp - 0x58]
call fcn.00403d01
lea ecx, [ebp - 0x40]
call fcn.00403d01
lea ecx, [ebp - 0x34]
call fcn.00403d01
lea ecx, [ebp + 8]
call fcn.00401a42
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret