Copy the source locally, compile it, and use printf("%p") and void* casting on various variables. That will help figure out the required pointer arithmetic.
You will likely encounter stack randomization but there is a way to do it without worrying about that.
You will likely encounter stack randomization but there is a way to do it without worrying about that.