Werror overwrite make CFLAGS=-Wno-error
Include path (print)
gcc -xc -E -v -
gcc -xc++ -E -v -
#define dbgprint(X,...) printf(X, ##__VA_ARGS__) :
variadic argument macro
# operator is called the
stringifier
__declspec(dllexport) # windows : export function in
dll
__debugbreak() # Set breakpoint
offsetof(struct_t, elt_t) # Get elemenet
offset
extern int const iPi = 3.1415926535
#pragma pack(1) # to let the structure without
aligning each field
__FILE__ # Name of the file.c
__LINE__ # Current line
__FUNCTION__ # Name of current function
Jump to arbitrary addr
void (*foo)(void) = 0xcacacaca; foo();
#include <time.h>
srand(time(NULL));
# Set seed
rand();
# Get Randomtypedef int(__cdecl callback_t)(HANDLE h_process);int __usercall fct1@<eax>(int p1@<ecx>, int p2@<edx>, int p3) {return p1 + p2 + p3;}
The called function is cleaning the stack
The caller is correcting the stack (because
HE knows : printf)
Rcx contains first var. The callee is cleaning the pile