You've modifications there that I can't tell what are doing. That said, this looks like a problem with binfmt, but again, that shouldn't be necessary. If you're on Apple M1, using an aarch64 VM, armhf should run natively and no emulation should be necessary. Let's debug it further...