Function at 0x40e880
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
push 0x268
mov ebx, ecx
mov edi, edx
push 0
push ebx
mov dword [esp + 0x30], ebx
call fcn.004a3c90
add esp, 0xc
lea esi, [ebx + 0x148]
cmp dword [0x4dcbd0], 0
xorps xmm0, xmm0
movups xmmword [esp + 0x28], xmm0
je 0x40e8de
lea eax, [esi + 0xc]
mov dword [esi], 1
push ecx
mov edx, edi
mov dword [esi + 8], eax
mov ecx, esi
mov dword [esi + 4], 0xe
call fcn.0040caf0
add esp, 4
test eax, eax
jne 0x40eab1
lea eax, [esp + 0x28]
mov ecx, esi
push eax
mov edx, eax
call fcn.0040da40
add esp, 4
test eax, eax
jne 0x40eab1
movzx esi, byte [esp + 0x28]
xor edx, edx
movzx eax, byte [esp + 0x29]
mov ebp, 4
movzx ecx, byte [esp + 0x2c]
movzx edi, byte [esp + 0x30]
shl esi, 8
or esi, eax
shl ecx, 8
movzx eax, byte [esp + 0x2a]
shl esi, 8
or esi, eax
shl edi, 8
movzx eax, byte [esp + 0x2b]
shl esi, 8
or esi, eax
mov dword [ebx + 0x98], 0
movzx eax, byte [esp + 0x2d]
or ecx, eax
mov dword [ebx + 0xdc], esi
movzx eax, byte [esp + 0x2e]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x9c], 0
movzx eax, byte [esp + 0x2f]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x18], 0
movzx eax, byte [esp + 0x31]
or edx, ecx
movzx ecx, byte [esp + 0x34]
or edi, eax
movzx eax, byte [esp + 0x32]
shl edi, 8
or edi, eax
shl ecx, 8
movzx eax, byte [esp + 0x33]
shl edi, 8
or edi, eax
mov dword [esp + 0x14], edx
movzx eax, byte [esp + 0x35]
xor edx, edx
or ecx, eax
mov dword [ebx + 0x5c], edi
movzx eax, byte [esp + 0x36]
shl ecx, 8
or ecx, eax
mov dword [ebx + 0x1c], 0
movzx eax, byte [esp + 0x37]
shl ecx, 8
or ecx, eax
or edx, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov dword [ebx + 0x58], edx
mov dword [ebx + 0xd8], ecx
shrd dword [esp + 0x10], edi, 1
shl ecx, 0x1f
and edx, 1
shr edi, 1
xor eax, eax
or dword [esp + 0x10], eax
or edi, ecx
mov ecx, dword [esp + 0x14]
imul edx, edx, 0xe1000000
shrd ecx, esi, 1
mov dword [ebx + ebp*8 + 0x1c], edi
shr esi, 1
xor ecx, eax
mov dword [ebx + ebp*8 + 0x98], ecx
xor esi, edx
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x10]
mov dword [ebx + ebp*8 + 0x18], edx
mov dword [ebx + ebp*8 + 0x9c], esi
sar ebp, 1
test ebp, ebp
jg 0x40e9d0
mov ebp, 2
mov dword [esp + 0x14], ebp
lea edi, [ebp + 0x13]
mov eax, dword [ebx + edi*8]
lea edi, [ebx + edi*8]
mov dword [esp + 0x10], eax
lea ecx, [ebp + 3]
mov eax, dword [edi + 4]
lea ecx, [ebx + ecx*8]
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
cmp ebp, 1
jle 0x40eaa0
lea eax, [ebx + 0x20]
sub edi, ecx
lea ebx, [ebp - 1]
mov ebp, dword [esp + 0x10]
lea esi, [ecx + 8]
mov edx, dword [eax + 0x80]
lea eax, [eax + 8]
mov ecx, dword [eax + 0x7c]
lea esi, [esi + 8]
xor ecx, dword [esp + 0x18]
xor edx, ebp
mov dword [edi + esi - 8], edx
mov dword [edi + esi - 4], ecx
mov edx, dword [eax - 8]
mov ecx, dword [eax - 4]
xor edx, dword [esp + 0x1c]
xor ecx, dword [esp + 0x20]
mov dword [esi - 8], edx
mov dword [esi - 4], ecx
sub ebx, 1
jne 0x40ea62
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
add ebp, ebp
mov dword [esp + 0x14], ebp
cmp ebp, 0x10
jl 0x40ea27
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret