The engine was compiled with __cdecl as the default calling convention, so it will always be up to the caller to clean up the stack after calling an engine-based function.

Also, console_process_command doesn't take the input buffer as a stack argument, he's doing it correctly with edi. There's only one stack argument for the function, the access flags, and 0 is perfectly fine for the most part.