Function at 0x100463b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
mov eax, ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x20]
sub eax, edi
and eax, 0xfffffffc
cmp eax, 0x80
jle 0x10046441
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
test esi, esi
jle 0x100464be
push ecx
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.100448e0
mov edx, dword [esp + 0x24]
mov eax, esi
mov ebp, dword [esp + 0x28]
mov ecx, ebx
sar eax, 2
add esp, 0x10
sar esi, 1
sub ecx, ebp
add esi, eax
and ecx, 0xfffffffc
mov eax, edx
sub eax, edi
and eax, 0xfffffffc
cmp eax, ecx
mov eax, dword [esp + 0x2c]
push eax
push esi
jge 0x10046421
push edx
push edi
call fcn.100463b0
mov edi, ebp
jmp 0x1004642c
push ebx
push ebp
call fcn.100463b0
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov eax, ebx
sub eax, edi
add esp, 0x10
and eax, 0xfffffffc
cmp eax, 0x80
jg 0x100463d5
cmp edi, ebx
je 0x1004666e
lea esi, [edi + 4]
cmp esi, ebx
je 0x1004666e
mov ecx, 4
sub ecx, edi
mov dword [esp + 0x20], ecx
nop
mov eax, dword [esi]
mov ebp, esi
mov dword [esp + 0x24], eax
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x100ad510]
mov eax, dword [edi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100ad510]
comisd xmm1, xmm0
jbe 0x1004660f
add ecx, 0xfffffffc
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
add eax, 4
push edi
push eax
call fcn.1008bd50
mov eax, dword [esp + 0x30]
add esp, 0xc
mov dword [edi], eax
jmp 0x1004665f
sub ebx, edi
mov eax, ebx
mov dword [esp + 0x24], ebx
sar eax, 2
mov ebp, eax
mov dword [esp + 0x10], eax
sar ebp, 1
test ebp, ebp
jle 0x100465c0
mov ebx, eax
lea esi, [ebx - 1]
sar esi, 1
mov dword [esp + 0x14], esi
mov eax, dword [edi + ebp*4 - 4]
dec ebp
mov dword [esp + 0x20], eax
mov edx, ebp
mov ecx, ebp
cmp ebp, esi
jge 0x10046542
add ecx, ecx
mov eax, dword [edi + ecx*4 + 8]
movd xmm1, eax
shr eax, 0x1f
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x100ad510]
mov eax, dword [edi + ecx*4 + 4]
movd xmm0, eax
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100ad510]
xor eax, eax
comisd xmm1, xmm0
seta al
xor eax, 1
inc eax
add ecx, eax
mov eax, dword [edi + ecx*4]
mov dword [edi + edx*4], eax
mov edx, ecx
cmp ecx, esi
jl 0x100464f5
cmp edx, esi
jne 0x10046555
test bl, 1
jne 0x10046555
mov eax, dword [edi + ebx*4 - 4]
mov dword [edi + edx*4], eax
lea edx, [ebx - 1]
lea ecx, [edx - 1]
sar ecx, 1
cmp ebp, edx
jge 0x100465a5
mov eax, dword [esp + 0x20]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x100ad510]
mov esi, dword [edi + ecx*4]
mov eax, esi
shr eax, 0x1f
movd xmm0, esi
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100ad510]
comisd xmm0, xmm1
jbe 0x100465a1
mov dword [edi + edx*4], esi
mov edx, ecx
dec ecx
sar ecx, 1
cmp ebp, edx
jl 0x10046576
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov dword [edi + edx*4], eax
test ebp, ebp
jg 0x100464e4
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
cmp eax, 2
jl 0x1004666e
nop dword [eax]
mov eax, dword [edi + ebx - 4]
mov dword [esp + 0x24], eax
mov eax, dword [edi]
mov dword [edi + ebx - 4], eax
lea eax, [esp + 0x24]
push ecx
push eax
lea eax, [ebx - 4]
sar eax, 2
push eax
push 0
push edi
call fcn.10044f50
mov ecx, dword [esp + 0x40]
add ebx, 0xfffffffc
mov eax, ebx
add esp, 0x14
and eax, 0xfffffffc
cmp eax, 8
jge 0x100465d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov ecx, dword [esi - 4]
lea edx, [esi - 4]
mov eax, ecx
shr eax, 0x1f
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100ad510]
comisd xmm1, xmm0
jbe 0x10046658
mov dword [ebp], ecx
mov ebp, edx
mov ecx, dword [edx - 4]
sub edx, 4
mov eax, ecx
shr eax, 0x1f
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100ad510]
comisd xmm1, xmm0
ja 0x10046631
mov eax, dword [esp + 0x24]
mov dword [ebp], eax
mov ecx, dword [esp + 0x20]
add esi, 4
cmp esi, ebx
jne 0x10046460
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret