Use ulong for hacky pointer arithmetic, instead of just int