I'm not sure why it crashes but you don't need:
int * SpeedRun_Time = sys_malloc(sizeof(int));
simply using
int SpeedRun_Time = 0;
works.
remember, you only have to use pointers and allocate memory to them if you are
initializing somthing
which has got a
dynamic size (like dynamic array-sizes) or
a non-fixed size (like BMAP* or STRING*)
inside a functionan int is always 4 bytes big. -> fixed-size -> no need to allocate memory.

(But since I don't know that much about pointers/arrays/memory allocation, someone please correct me if I'm wrong)