And if more than 32 bits ? This function needs to be redone. But for this you need 2 more functions. Adding points and duplicating points are not the same thing.
all you need is point multiplication function that includes point add already on script.
this script actually can brute force any puzzle until 128 bits, the 32
BYTE privkey is only to work with point multiplication function, that is NOT 32 Bit puzzle. very different things.