Function at 0x40cd50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee4
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
mov esi, 0x44460c
lea edi, [ebp - 0x11c]
mov ecx, 3
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
movzx eax, word [0x46b0c2]
dec eax
mov dword [ebp - 8], eax
mov edx, dword [ebp - 8]
lea edx, [edx + edx*4]
mov ecx, dword [0x46b1b4]
mov edx, dword [ecx + edx*8 + 0x14]
mov eax, dword [0x46b1bc]
cmp edx, eax
jbe 0x40cd9f
xor eax, eax
jmp 0x40d014
push 0
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.0042e350
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
push 1
push 0x100
lea eax, [ebp - 0x10c]
push eax
call fcn.0042e2b0
add esp, 0x10
cmp byte [ebp - 0x10b], 0x9c
jne 0x40cdda
cmp byte [ebp - 0x10a], 0x60
je 0x40cde1
xor eax, eax
jmp 0x40d014
xor ebx, ebx
mov esi, 3
lea eax, [ebp - 0x108]
cmp byte [eax], 0xf
jne 0x40ce27
cmp byte [eax + 1], 0
jne 0x40ce27
cmp byte [eax + 2], 0
jne 0x40ce27
mov dl, byte [eax - 1]
cmp dl, 0x17
jne 0x40ce10
mov dword [ebp - 4], 0x9f
jmp 0x40ce1c
cmp dl, 0xd2
jne 0x40ce1c
mov dword [ebp - 4], 0xaa4
cmp dword [ebp - 4], 0
je 0x40ce27
mov bl, byte [eax - 2]
jmp 0x40ce31
inc esi
inc eax
cmp esi, 0x80
jl 0x40cdee
test bl, bl
jne 0x40ce3c
xor eax, eax
jmp 0x40d014
add bl, 0x90
add esi, 4
lea eax, [ebp + esi - 0x10c]
cmp esi, 0xa0
jge 0x40ce65
cmp bl, byte [eax]
jne 0x40ce5b
cmp byte [eax + 1], 0x75
je 0x40ce65
inc esi
inc eax
cmp esi, 0xa0
jl 0x40ce51
cmp esi, 0xa0
jne 0x40ce74
xor eax, eax
jmp 0x40d014
add esi, 3
lea edx, [ebp - 0x11c]
mov bl, byte [ebp + esi - 0x10c]
lea edi, [ebp + esi - 0x10c]
xor bl, 0xe8
xor eax, eax
cmp eax, 1
jne 0x40cea6
cmp dword [ebp - 4], 0x9f
jne 0x40cea2
mov cl, 0x51
jmp 0x40cea8
mov cl, 0xd0
jmp 0x40cea8
mov cl, byte [edx]
mov byte [ebp - 9], cl
mov cl, byte [edi]
xor cl, bl
cmp cl, byte [ebp - 9]
jne 0x40cebc
inc eax
inc edi
inc edx
cmp eax, 0xd
jl 0x40ce90
cmp eax, 0xd
jge 0x40cec8
xor eax, eax
jmp 0x40d014
push 1
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00401410
add esp, 0xc
dec eax
je 0x40cee4
xor eax, eax
jmp 0x40d014
mov edx, dword [0x46b1bc]
mov eax, dword [ebp - 8]
add edx, esi
mov dword [0x46b1c4], edx
lea eax, [eax + eax*4]
sub dword [0x46b10c], 0x2000
mov edx, dword [0x46b1b4]
sub dword [edx + eax*8 + 0x10], 0x1200
mov edx, dword [0x46b1b4]
cmp dword [edx + eax*8 + 8], 0x2000
jbe 0x40cf2a
sub dword [edx + eax*8 + 8], 0x2000
jmp 0x40cf38
mov edx, dword [0x46b1b4]
mov ecx, dword [edx + eax*8 + 0x10]
mov dword [edx + eax*8 + 8], ecx
mov eax, dword [ebp - 8]
lea eax, [eax + eax*4]
mov edx, dword [0x46b1b4]
and dword [edx + eax*8 + 0x24], 0x7fffffff
push 0
mov eax, dword [0x46b1c4]
add eax, 0x1b
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0042e350
add esp, 0xc
xor esi, esi
lea edi, [ebp - 0x10c]
mov eax, dword [ebp + 8]
push eax
call fcn.00430138
pop ecx
xor al, bl
mov byte [edi], al
inc esi
inc edi
cmp esi, 4
jl 0x40cf6b
mov edx, dword [ebp - 0x10c]
mov dword [0x46b0e4], edx
push 0
mov ecx, dword [0x46b1b8]
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0042e350
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 0xf8
push 1
push 0x46b0bc
call fcn.0042e540
add esp, 0x10
mov ecx, dword [0x46b1c0]
push 0
push ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0042e350
movzx ecx, word [0x46b0c2]
mov eax, ecx
add esp, 0xc
shl eax, 3
mov edx, dword [ebp + 8]
push edx
mov edx, dword [0x46b1b4]
lea eax, [eax + eax*4]
push eax
push 1
push edx
call fcn.0042e540
add esp, 0x10
mov ecx, dword [0x46b1bc]
mov dword [0x46b1c4], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.00418690
pop ecx
inc eax
jne 0x40d011
or eax, 0xffffffff
jmp 0x40d014
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret