Function at 0x40e69f
Capabilities:
Encode data using xor
Encrypt data using xtea

Disassembly:
sub esp, 0x54
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x58]
push ebx
mov ebx, dword [esp + 0x60]
mov edx, ebx
push ebp
shr edx, 4
xor ebp, ebp
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
push esi
push edi
test edx, edx
je 0x40e7c8
mov dword [esp + 0x18], edx
cmp byte [esp + 0x70], 0
mov esi, eax
mov edi, 0x454960
push 0x30
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [0x454960]
mov ebx, dword [0x454964]
mov esi, dword [esp + 0x78]
je 0x40e745
mov dword [esp + 0x20], ebp
pop edx
mov ecx, ebx
mov eax, ebx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, ebp
and eax, 3
add ecx, ebx
mov eax, dword [esi + eax*4]
add eax, ebp
sub ebp, 0x61c88647
xor ecx, eax
add edi, ecx
mov ecx, edi
mov eax, edi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, ebp
shr eax, 0xb
add ecx, edi
and eax, 3
mov eax, dword [esi + eax*4]
add eax, ebp
xor ecx, eax
add ebx, ecx
sub edx, 1
jne 0x40e6fd
jmp 0x40e791
mov edx, 0xaa66d2b0
pop ebp
mov ecx, edi
mov eax, edi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, edx
shr eax, 0xb
add ecx, edi
and eax, 3
mov eax, dword [esi + eax*4]
add eax, edx
add edx, 0x61c88647
xor ecx, eax
sub ebx, ecx
mov ecx, ebx
mov eax, ebx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, edx
and eax, 3
add ecx, ebx
mov eax, dword [esi + eax*4]
add eax, edx
xor ecx, eax
sub edi, ecx
sub ebp, 1
jne 0x40e74b
mov eax, dword [esp + 0x14]
mov esi, 0x454960
mov dword [0x454960], edi
xor ebp, ebp
mov edi, eax
mov dword [0x454964], ebx
add eax, 0x10
sub dword [esp + 0x18], 1
mov dword [esp + 0x14], eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jne 0x40e6d4
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x6c]
and ebx, 0xf
mov dword [esp + 0x6c], ebx
je 0x40e8ba
shl edx, 4
add eax, edx
push ebx
push eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x28]
push eax
call fcn.0043a5f0
mov edx, dword [esp + 0x2c]
add esp, 0xc
cmp byte [esp + 0x70], 0
mov esi, dword [esp + 0x24]
push 0x20
pop ebx
je 0x40e84b
mov edi, dword [esp + 0x74]
mov ecx, esi
mov eax, esi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, ebp
and eax, 3
add ecx, esi
mov eax, dword [edi + eax*4]
add eax, ebp
sub ebp, 0x61c88647
xor ecx, eax
add edx, ecx
mov ecx, edx
mov eax, edx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, ebp
shr eax, 0xb
add ecx, edx
and eax, 3
mov eax, dword [edi + eax*4]
add eax, ebp
xor ecx, eax
add esi, ecx
sub ebx, 1
jne 0x40e803
jmp 0x40e89c
mov ebp, dword [esp + 0x74]
mov edi, 0xc6ef3720
mov ecx, edx
mov eax, edx
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, edi
shr eax, 0xb
add ecx, edx
and eax, 3
mov eax, dword [ebp + eax*4]
add eax, edi
add edi, 0x61c88647
xor ecx, eax
sub esi, ecx
mov ecx, esi
mov eax, esi
shl eax, 4
shr ecx, 5
xor ecx, eax
mov eax, edi
and eax, 3
add ecx, esi
mov eax, dword [ebp + eax*4]
add eax, edi
xor ecx, eax
sub edx, ecx
sub ebx, 1
jne 0x40e854
mov ebx, dword [esp + 0x6c]
lea eax, [esp + 0x20]
push ebx
push eax
push dword [esp + 0x18]
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], edx
call fcn.0043a5f0
add esp, 0xc
mov ecx, dword [esp + 0x60]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00439ab8
add esp, 0x54
ret