Programming & Debugging: C to Assembly
Loading...
14,807
Uploader Comments (youhakim)
Top Comments
-
"gcc -S -masm=intel file.c"
This generates a Intel syntaxe file. =)
-
u got sexy accent :)
see all
All Comments (22)
-
you speak french? Parlez-vous Francias?
-
thanks brother
-
ollydebug FTW!! =)
-
GCC -S option... soooo usefulll.... can make faster programs using this :)
-
@Gr8gabe all translate to machine code.
-
lol
"we don't need this code, i dont' nkwo what it does" infact ill remove it, *dellete*" "now computer "compile(he measn assemble)!" *pc crashes" "oh... god....shit...."
-
egh i hate ur voice
Loading...
how to change the assembly code in one memory adress using C??
lets say i got the adress 0x5412
and i wanna use nop(0x90)
im trying it with writeprocessmemory() but the program crash any solution??
DarkInjection 3 years ago
Hi,
You don't use any special function for that, you just open the executable file in binary, read, write mode using the fopen function and ... look for what you need to replace and replace it.
file_pointer = fopen("file.exe", "r+ b");
r+ : to open an existant file in read and write mode.
b : to open a file in binary mode.
youhakim 3 years ago
well can u give me an example?
i have try it with fopen,strstr and fputs but i cant make it work
DarkInjection 3 years ago
Ok, I've decided to make a video to demonstrate that, so stay tuned!
youhakim 3 years ago
Oops! I didn't answer your question, did I?
I didn't ignore your real question, I just assumed without reading carefully that you were talking about how to patch a program, but you were talking about how to program a "Trainer" which "changes parts of memory used by a game to for example gain more money, [weapons,] etc", I don't know where was my mind? I'll try to answer you in a future video, and if it won't fit in 10 minutes I'll send you the source code of the "trainer" I'll try to write! OK?
youhakim 3 years ago
Gcc uses a line feed as the end of the line not a carriage return, line feed! it is Windows who uses carriage return, line feed.
Mac uses a carriage return.
sorry for the mistake!
youhakim 3 years ago