News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

finding programs entry point

Started by smoalne, February 10, 2019, 05:27:22 AM

Previous topic - Next topic

smoalne

Hello !
I'm interested in trying to find out how to get a programs start address ?  I have found a couple of hints, but haven't been able to put it together successfully yet.  I tried using "offset" and "$" to assign the address to a variable but haven't ( to the best of my knowledge ) gotten anywhere.  any help would be appreciated !

thanks,
Jeff

jj2007

mov eax, offset start?

include \masm32\include\masm32rt.inc ; plain Masm32 for the fans of pure assembler

.code
AppName db "Masm32:", 0

start: MsgBox 0, hex$(offset start), addr AppName, MB_OK
exit

end start

hutch--

The location of the program entry point is in the PE header of the executable file but there is little reason to need that access unless you want to modify a PE header or insert malicious code to replace it which is how old style viruses were triggered. Read the forum rules on any form or cracking, virus, trojan or similar activity.

Raistlin

#3
Dear Smoalne, the entry point of an EXE or COM or anything else; does not require Assembly Language to muck with directly or indirectly unless in very strange circumstances.  Easy enough to read the ISO/IEEE/Microsoft documentation (2500+ A4 pages of facinating specifications, if otherwise interested)

Astoundingly, I do believe hutch did, and is declining to share without being able to trust you on face value.
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...