Skip to content

Instantly share code, notes, and snippets.

@HorlogeSkynet HorlogeSkynet/blackMagic.c
Last active Aug 21, 2017

What would you like to do?
Simple code to show a pretty funny thing in C with pointers
#include <stdio.h>
void blackMagic(int valeur)
long *p;
p = ((long*)((long)&p + 0x24 + MAINPARAMETERS));
*p = valeur;
int main(int argc, char *argv[])
int var = 0xDEAD;
int nextValue = 0xBABE;
printf("%x\n", var);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.