It does not crash at A.call() anymore (however, I have not changed anything).
I had this function:
DWORD obf_write_memory(X86Assembler *A, UINT8 *data, DWORD len)
{
DWORD off;
if (!len) {
obf_error("Writing memory of zero bytes");
}
off = A->getCodeSize();
for (unsigned i = 0; i < len; i++) {
A->_emitByte(data[i]);
}
return off;
}
it crashed on _emitByte (but not the first call), I replaced it with A->data() and it works fine. I remember having this issue before, however I simply used A.nop() instead of emitByte because it was for uninitialized data.