Hi Flybro,
I think you'll find that arg_0 doesn't have a "random" value, but is the memory address where the variable arg_0 is stored. You want 8, the "[contents]" of arg_0... If there were such an instruction:
mov edi, [ebp + [arg_0]]
but there is no such instruction. So you could do:
...
mov eax, [arg_0]
mov edi, [ebp + eax]
...
or, simpler and more usual...
...
mov edi, [ebp + 8]
mov esi, [ebp + 12] ; "arg_1", if we had one...
...
I'm glad to see you've got:
extern "C" void begood(const char *customer);
figured out... to keep C++ from "decorating" (mutilating) your function name (other than prepending the underscore).
That's untested - haven't got a Mac, and I'm not very familiar with C++, but I think it'll work...
Best,
Frank