just so you know - MS did not implement inline asm in x64 because it is 'unsafe'. apparently they are very concerned about noobs who have no clue what they are doing. they did same with default values for methods in c# - no such thing there because 'it might confuse programmer'.
regarding inline asm 'black box' theory - is all crap. i made a testcase just to see this, because it even sounds so much unreasonable.
Code:
00FD1045 sub edi,1
while(i != 0)
00FD1048 jne main+22h (0FD1022h)
}
__asm xor ebx, ebx // should be restored after asm block
00FD104A xor ebx,ebx
char naughtyNumber[255];
itoa(a + b, naughtyNumber, 16);
00FD104C push 10h
00FD104E lea eax,[esp+10h]
00FD1052 push eax
00FD1053 add esi,ecx
00FD1055 push esi
00FD1056 call _itoa (0FD7258h)
00FD105B add esp,0Ch
as you see i xored ebx and compiler has no intention to restore it. now maybe i am missing something.. but ebx is non-volatile register - if msvc compiler really did 'black box' tricks then register should be restored.