just noticed something about that code
if you call it with a pointer to a null string...
mov edx, [esp+4]
xor ecx, ecx
movzx eax, BYTE PTR [edx]
test eax, eax
jz quit
;
;
quit:
lea eax, [ecx]
ret 4you probably meant to branch to the RET 4
my bad - it doesn't crash - just noticed it's an LEA :P