Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's handwritten and hand-obfuscated assembly, the author didn't know the effect of the carry but knew it was deterministic; and the code worked.

Though it's not clear to me where the corruption after the second MLA instruction comes from, because the second block of three instructions should produce the same output as the first. It is possible that it was copied/pasted incorrectly.



Are you sure it's handwritten or obfuscated?

I remember from when I used to disassemble compiled ARM code (not on the NDS though) that it was common to see CMP, followed by a bunch of instructions with one condition predicate, followed by a bunch of instructions with the opposite predicate.

In this case, it's subtly wrong to use that pattern, but only on older versions of ARM. That could reflect a very sneaky attempt to break emulators… but it could also just be a compiler bug.

That said, I too don't understand how corruption could be produced unless there was a copy/paste mistake.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: