Hi Jun,
During the development we tried to resort to ASM code only when
absolutely necessary, but I cannot exclude that some of the ASM
functions in the current version of HyperDbg can be safely rewritten
in C.
The Cm*Lock() functions implement a simple spin-lock to guard accesses
to the COM port.
However, at this point I am not really sure this stuff is really
needed.. Probably we can just drop these functions, as there should be
not concurrency issues in root mode.
Cheers,
Roberto
--
Roberto Paleari