Function at 0x40ec40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
mov ebx, dword [ebp + 0x10]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x10]
mov edx, eax
shr edx, 3
and edx, 0x3f
lea ecx, [eax + ebx*8]
lea eax, [ebx*8]
mov dword [edi + 0x10], ecx
cmp ecx, eax
mov ecx, dword [edi + 0x14]
jae 0x40ec74
inc ecx
mov eax, ebx
mov esi, 0x40
shr eax, 0x1d
sub esi, edx
add eax, ecx
mov dword [edi + 0x14], eax
cmp ebx, esi
jb 0x40ee9f
push esi
push dword [ebp + 0xc]
lea eax, [edi + 0x18]
add eax, edx
push eax
call fcn.00415600
lea eax, [edi + 0x18]
push eax
push edi
call fcn.0040ea90
lea edx, [esi + 0x40]
mov dword [ebp - 0xc], esi
add esp, 0x14
mov dword [ebp - 0x24], edx
cmp edx, ebx
ja 0x40ee9d
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov ebx, dword [edi + 8]
mov edi, dword [edi + 0xc]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0xc]
add ecx, 0xffffffc0
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x2c], ecx
nop dword [eax]
movups xmm0, xmmword [ecx + edx]
mov dword [ebp - 8], 0
movups xmmword [ebp - 0x6c], xmm0
movups xmm0, xmmword [ecx + edx + 0x10]
movups xmmword [ebp - 0x5c], xmm0
movups xmm0, xmmword [ecx + edx + 0x20]
movups xmmword [ebp - 0x4c], xmm0
movups xmm0, xmmword [ecx + edx + 0x30]
movups xmmword [ebp - 0x3c], xmm0
nop word [eax + eax]
mov edx, dword [ebp - 8]
mov esi, eax
not esi
mov dword [ebp - 0x10], edi
mov ecx, ebx
and esi, edi
and ecx, eax
mov edi, ebx
or esi, ecx
mov ebx, eax
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx + 0x433c68]
add ecx, dword [ebp + edx - 0x6c]
mov edx, dword [ebp - 0x10]
add ecx, esi
add ecx, dword [ebp - 4]
rol ecx, 7
add eax, ecx
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
cmp ecx, 0x40
jb 0x40ed10
mov dword [ebp - 0x10], 0x433ca8
mov dword [ebp - 8], 0x51
nop
mov edx, dword [ebp - 0x10]
mov esi, edi
add dword [ebp - 0x10], 4
not esi
mov ecx, edi
mov dword [ebp - 0x28], edi
and ecx, eax
and esi, ebx
or esi, ecx
mov edi, ebx
mov ecx, dword [ebp - 8]
mov ebx, eax
and ecx, 0xf
mov ecx, dword [ebp + ecx*4 - 0x6c]
add ecx, dword [edx]
mov edx, dword [ebp - 0x28]
add ecx, esi
add ecx, dword [ebp - 4]
rol ecx, 0xc
add eax, ecx
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 8]
add ecx, 5
mov dword [ebp - 8], ecx
cmp ecx, 0xa1
jb 0x40ed60
mov ecx, 0x65
mov dword [ebp - 8], 0x433ce8
mov dword [ebp - 0x10], ecx
and ecx, 0xf
mov edx, edi
xor edx, ebx
mov esi, edi
xor edx, eax
mov edi, ebx
mov ebx, eax
mov ecx, dword [ebp + ecx*4 - 0x6c]
add ecx, edx
mov edx, dword [ebp - 8]
add ecx, dword [ebp - 4]
mov dword [ebp - 4], esi
add ecx, dword [edx]
add edx, 4
ror ecx, 0xf
add eax, ecx
mov dword [ebp - 8], edx
mov ecx, dword [ebp - 0x10]
add ecx, 3
mov dword [ebp - 0x10], ecx
cmp ecx, 0x95
jb 0x40edb6
mov ecx, 0x150
mov dword [ebp - 0x10], 0xc0
mov dword [ebp - 8], ecx
mov esi, dword [ebp - 0x10]
and ecx, 0xf
add dword [ebp - 8], 7
mov edx, edi
not edx
mov dword [ebp - 0x28], edi
or edx, eax
mov edi, ebx
mov ecx, dword [ebp + ecx*4 - 0x6c]
xor edx, ebx
add ecx, dword [esi + 0x433c68]
mov ebx, eax
add ecx, edx
mov edx, dword [ebp - 0x28]
add ecx, dword [ebp - 4]
ror ecx, 0xa
add eax, ecx
mov dword [ebp - 4], edx
mov ecx, esi
add ecx, 4
mov dword [ebp - 0x10], ecx
cmp ecx, 0x100
mov ecx, dword [ebp - 8]
jb 0x40ee01
mov ecx, dword [ebp - 0x14]
add ecx, edx
add dword [ebp - 0xc], 0x40
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], ecx
mov dword [edx], ecx
mov ecx, dword [ebp - 0x18]
add ecx, eax
mov dword [edx + 4], ecx
mov eax, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x1c]
add ecx, ebx
mov dword [edx + 8], ecx
mov ebx, ecx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x20]
add ecx, edi
mov dword [edx + 0xc], ecx
mov edi, ecx
mov edx, dword [ebp - 0x24]
add edx, 0x40
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x24], edx
cmp edx, dword [ebp + 0x10]
jbe 0x40ece0
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
xor edx, edx
mov eax, dword [ebp - 0xc]
sub ebx, eax
add eax, dword [ebp + 0xc]
push ebx
push eax
lea eax, [edi + 0x18]
add eax, edx
push eax
call fcn.00415600
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret