Yes, neither can I, so I made it to work
Note that I didn't bother optimizing (or changing requirements) for loading constants, since any place where that is critical has to have a loop keeping the constants in registers.
There is also a s2 shortstring parameter, which is redundant and only a buffer for testing.
The requirement for storing the SIMD register and retrieving is a bit convoluted, I now simply dumped it over the original string, but for a real solution you will probably read first dword, vppermd and then move the another.
procedure binstringtointmathman(const s:shortstring;var x :dword; var s2:shortstring);assembler;
// s must contain 16 characters either 1 or 0
// works, but result is bit reversed
asm
mov r10d,$01020102
vmovq xmm0,r10
vpbroadcastd xmm1,xmm0
mov r11,$0101010101010101
vmovq xmm0,r11
vpbroadcastq xmm4,xmm0
mov r11,$0001000400010004
vmovq xmm0,r11
vpbroadcastq xmm5,xmm0
mov r11,$0001001000010010
vmovq xmm0,r11
vpbroadcastq xmm6,xmm0
movdqu xmm2,[rcx+1]
pand xmm2,xmm4
pmaddubsw xmm2,xmm1
pmaddwd xmm2,xmm5
packusdw xmm2,xmm2
pmaddwd xmm2,xmm6
movdqu [rcx+1],xmm2
mov eax,[rcx+1]
mov r10d,[rcx+5]
shl rax,8
add rax,r10
mov [rdx],rax
end;