Function at 0x40a310
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20
call fcn.005e38a0
push ebx
push esi
mov esi, dword [ebp + 8]
mov edx, dword [esi + 4]
xor eax, eax
push edi
mov edi, dword [esi + 8]
dec edx
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0x20], ecx
cmp edi, 2
jl 0x40a4e1
mov ecx, dword [esi]
dec edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 8], ecx
xor eax, edx
mov edx, dword [ebp - 8]
mov ecx, dword [edx]
lea esi, [eax - 1]
not eax
shr eax, 0x1f
shr esi, 0x1f
and esi, eax
mov eax, ecx
shr eax, 0x10
mov edi, eax
neg edi
shr edi, 0x1f
neg edi
xor ebx, ebx
neg esi
test ecx, ecx
setne bl
xor eax, ecx
and eax, edi
xor ecx, eax
mov eax, ecx
shr eax, 8
mov edx, edi
and edx, 0x10
add ebx, edx
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor ecx, eax
mov edi, edx
mov eax, ecx
shr eax, 4
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor ecx, eax
mov eax, ecx
shr eax, 2
and edi, 8
add ebx, edi
mov edi, edx
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor eax, ecx
shr eax, 1
neg eax
shr eax, 0x1f
neg eax
and edi, 4
and eax, 1
add ebx, edi
add eax, ebx
and edx, 2
add edx, eax
mov eax, dword [ebp - 4]
mov edi, eax
mov ecx, esi
not ecx
not edi
and ecx, edi
or eax, esi
and ecx, 0x20
add ecx, dword [ebp - 0x14]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x10]
and edx, esi
add ecx, edx
inc eax
xor eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], ecx
lea esi, [eax - 1]
mov edx, dword [ebp - 8]
mov ecx, dword [edx + 4]
not eax
shr eax, 0x1f
shr esi, 0x1f
and esi, eax
mov eax, ecx
shr eax, 0x10
mov edi, eax
neg edi
shr edi, 0x1f
neg edi
xor ebx, ebx
neg esi
test ecx, ecx
setne bl
xor eax, ecx
and eax, edi
xor ecx, eax
mov edx, edi
and edx, 0x10
mov eax, ecx
shr eax, 8
add ebx, edx
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor ecx, eax
mov edi, edx
mov eax, ecx
shr eax, 4
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor ecx, eax
and edi, 8
add ebx, edi
mov edi, edx
mov eax, ecx
shr eax, 2
mov edx, eax
xor eax, ecx
neg edx
shr edx, 0x1f
neg edx
and eax, edx
xor eax, ecx
shr eax, 1
neg eax
shr eax, 0x1f
neg eax
and eax, 1
and edi, 4
add ebx, edi
add eax, ebx
mov ebx, dword [ebp - 4]
and edx, 2
add edx, eax
mov ecx, ebx
mov eax, esi
not eax
not ecx
and eax, ecx
and eax, 0x20
add eax, dword [ebp - 0x18]
and edx, esi
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
or ebx, esi
add eax, 2
add dword [ebp - 8], 8
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x1c]
jl 0x40a354
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x20]
cmp eax, dword [esi + 8]
jge 0x40a597
mov ecx, eax
xor ecx, edx
mov edx, dword [esi]
lea edi, [ecx - 1]
not ecx
shr ecx, 0x1f
shr edi, 0x1f
and edi, ecx
mov ecx, dword [edx + eax*4]
mov esi, ecx
shr esi, 0x10
mov eax, esi
neg eax
shr eax, 0x1f
neg eax
mov dword [ebp + 8], eax
xor edx, edx
neg edi
test ecx, ecx
setne dl
xor esi, ecx
and esi, dword [ebp + 8]
and eax, 0x10
xor ecx, esi
not ebx
add edx, eax
mov eax, ecx
shr eax, 8
mov esi, eax
xor eax, ecx
neg esi
shr esi, 0x1f
neg esi
mov dword [ebp + 8], esi
and eax, dword [ebp + 8]
and esi, 8
xor ecx, eax
mov eax, ecx
add edx, esi
shr eax, 4
mov esi, eax
xor eax, ecx
neg esi
shr esi, 0x1f
neg esi
mov dword [ebp + 8], esi
and eax, dword [ebp + 8]
and esi, 4
xor ecx, eax
mov eax, ecx
add edx, esi
shr eax, 2
mov esi, eax
xor eax, ecx
neg esi
shr esi, 0x1f
neg esi
and eax, esi
xor ecx, eax
shr ecx, 1
neg ecx
shr ecx, 0x1f
neg ecx
and ecx, 1
add ecx, edx
mov edx, dword [ebp - 0xc]
and esi, 2
add ecx, esi
and ecx, edi
not edi
and edi, ebx
and edi, 0x20
add ecx, edi
mov esi, dword [ebp - 0x18]
add esi, dword [ebp - 0x14]
not edx
lea eax, [edx - 1]
shr eax, 0x1f
not edx
shr edx, 0x1f
and eax, edx
add esi, ecx
dec eax
pop edi
and eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret