Function at 0x40d660
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov dword [esp + 0x20], ecx
mov eax, dword [ecx + 0x80]
mov dword [esp + 0x1c], eax
mov word [esp], 0x2523
mov byte [esp + 2], 0x3e
mov dword [esp + 3], 0
mov byte [esp + 7], 0
xor ebx, ebx
nop
movzx eax, byte [esp + ebx]
mov edi, 0x181425ca
sub edi, ebx
or edi, eax
mov ecx, 0xca
sub ecx, ebx
and ecx, eax
not edi
or edi, ecx
lea ebp, [edi + 0x36]
mov ecx, 1
sub ecx, edi
not ecx
or ecx, edi
and ecx, 1
mov eax, 9
sub eax, edi
and eax, 0xda
and ebp, 0x25
or ebp, eax
xor ebp, 0xdb
lea eax, [ecx*2]
add eax, ebp
mov byte [esp + ebx], al
mov eax, ebx
and eax, 1
xor ebx, 1
lea ebx, [ebx + eax*2]
cmp ebx, 8
jb 0x40d690
mov dword [esp + 0x10], 0x4a444822
mov word [esp + 0x14], 0x5f46
mov dword [esp + 0x16], 0
mov byte [esp + 0x1a], 0
xor edi, edi
xor ebx, ebx
nop
nop
movzx ecx, byte [esp + ebx + 0x10]
mov eax, ebx
xor eax, 0x6fced5ef
add eax, edi
xor eax, ecx
mov ecx, eax
and ecx, 1
or eax, 1
add eax, ecx
add al, 0x54
mov byte [esp + ebx + 0x10], al
inc ebx
add edi, 2
cmp ebx, 0xb
jne 0x40d710
mov dword [esp + 0x24], 0xec397775
mov dword [esp + 0x28], 0xf107e9ee
mov dword [esp + 0x2c], 0xe224cf4
mov dword [esp + 0x30], 0xfcf9f5f3
mov dword [esp + 0x34], 0xfc07fd01
mov dword [esp + 0x38], 0xf9b233fe
mov dword [esp + 0x3c], 0xbafb0703
mov dword [esp + 0x40], 0xfa0ef4f0
mov dword [esp + 0x44], 0xfe0cb9c7
mov dword [esp + 0x48], 0xa5dff8f1
mov byte [esp + 0x4c], 0x80
mov dword [esp + 0x4d], 0
xor ebx, ebx
xor ebp, ebp
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + ebp + 0x24]
mov eax, ebx
and eax, 0x54
mov ecx, ebp
xor ecx, 0xbd089ea
add ecx, eax
mov eax, ecx
and eax, edx
add edx, ecx
mov edi, edx
not edi
lea eax, [edi + eax*2]
and eax, ecx
mov edi, eax
and edi, 0xbd08bfd
mov esi, eax
and esi, 2
mov ecx, eax
or ecx, 0xfffffffd
inc ecx
imul ecx, edi
or eax, 2
imul eax, esi
sub ecx, eax
add ecx, edx
mov eax, ecx
and eax, 0x6d
xor ecx, 0x6d
lea eax, [ecx + eax*2]
inc al
mov byte [esp + ebp + 0x24], al
inc ebp
add ebx, 2
cmp ebp, 0x2d
jne 0x40d7a0
mov ebp, dword [esp + 0x68]
add ebp, dword [esp + 0x1c]
mov word [esp + 8], 0x9495
mov byte [esp + 0xa], 0xce
mov word [esp + 0xb], 0
xor edi, edi
nop
nop
nop
nop
nop
nop
movzx ecx, byte [esp + edi + 8]
mov eax, 0x601ca7ad
sub eax, edi
xor eax, ecx
mov ecx, 0xe08f4664
sub ecx, eax
mov edx, ecx
and edx, 1
add eax, 0x1b
and eax, 0x35
and ecx, 0xca
or ecx, eax
xor ecx, 0x34
lea eax, [ecx + edx*2]
mov byte [esp + edi + 8], al
mov eax, edi
and eax, 1
xor edi, 1
lea edi, [edi + eax*2]
cmp edi, 5
jb 0x40d820
movzx ecx, byte [esp + 8]
mov edi, ebp
test cl, cl
je 0x40d88b
lea ebx, [esp + 9]
mov edi, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40d880
mov byte [edi], 0
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax + 0x60]
test cl, cl
mov esi, dword [esp + 0x6c]
je 0x40d8bd
lea ebx, [eax + 0x61]
mov edx, dword [esp + 0x70]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40d8b0
jmp 0x40d8c1
mov edx, dword [esp + 0x70]
mov byte [edi], 0
movzx ecx, byte [esp + 0x24]
test cl, cl
je 0x40d8eb
lea ebx, [esp + 0x25]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [ebx]
inc ebx
test cl, cl
jne 0x40d8e0
mov byte [edi], 0
movzx ecx, byte [esi]
test cl, cl
je 0x40d90b
inc esi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x40d900
mov byte [edi], 0
movzx ecx, byte [esp + 0x10]
test cl, cl
je 0x40d92b
lea esi, [esp + 0x11]
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [esi]
inc esi
test cl, cl
jne 0x40d920
mov byte [edi], 0
movzx ecx, byte [edx]
test cl, cl
je 0x40d94b
inc edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40d940
mov byte [edi], 0
movzx ecx, byte [esp]
test cl, cl
je 0x40d96b
lea edx, [esp + 1]
nop
nop
nop
nop
nop
nop
mov byte [edi], cl
inc edi
movzx ecx, byte [edx]
inc edx
test cl, cl
jne 0x40d960
mov byte [edi], 0
sub edi, ebp
add dword [eax + 0x80], edi
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret 0xc