Argv and environ aren't preserved in all possible situations
Should be something like this:
pop argc
mov argv, esp
lea environ, [esp+4*argc]
; --- 6 bytes (58 89E3 8D0C84 or sth)
(with esp
at its initial value)
Will need some hacks to make it fit again in the headers etc.
Edited by PoroCYon