0

How to run another .exe file in assembly code?

I don't have a solid grasp of assembly and how to code in assembly. I just know some basic stuff which doesn't help me much. I need to be able to run an .exe file present somewhere in the computer. Like the equivalent of CreateProcess() or system("path\\file.exe") in c++, or os.startfile(), os.system() in python. I found something online but he was explaining in depth. I need the code snippet to achieve this. If it is not possible ( as I am just asking for the code ), is it possible to find out the assembly code with debugger by writing a simple program in python like, import os path = "path\file.exe" os.startfile(path) ( at the moment i dont have access to a computer so that I'd try and see if i can find out the code, thats why im asking instead of trying to do it in the first place )

30th Dec 2021, 8:39 AM
Mustafa K.
Mustafa K. - avatar
2 Respuestas
0
Martin Taylor, Yes, I am using windows and it's 64-bit. What I am actually trying to do is to change a button functionality in a program that kills another process with the functionality that opens another process instead using hex editor and x64dbg. I don't know how could I do it. I figured maybe if I can find the part that kills another process with debugger then I might be able to change that part of code in the program in hex editor with the assembly equivalent of opening another process.
30th Dec 2021, 9:21 AM
Mustafa K.
Mustafa K. - avatar
0
Martin Taylor, sorry to bother you further but I can't quite get it. I see. At first what I thought I would do wasn't actually that I would call windows api function in assembly to run the .exe (like running c code in python, if thats what you meant) instead it was how it is actually written in assembly. I figured it wouldn't be as simple as a line of op code. As you mention, to my understanding, it requires something to be done (some code) before being able to run the .exe and something else after as well. About the program's name being stored, do you mean like storing it in some .txt ( i didnt quite get that, again sorry if im asking dumb questions i started to feel like im tryna swim in deep ocean without having the proper equipments ) And that thing about not altering the actual .exe, I thought I could do it because I'm not really altering the one loaded to memory instead I opened the .exe with hex editor, wouldn't that allow me to change the actual .exe (after finding where I want to change is)
30th Dec 2021, 11:49 AM
Mustafa K.
Mustafa K. - avatar