News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Looking for programs entry point?

Started by jamesmustain, February 22, 2021, 04:41:39 PM

Previous topic - Next topic

jamesmustain

#Garbage Dispatcher Edit#
#Removed Full Page Advertisement for Vaccuum Cleaner#

jj2007

That's easy: mov eax, offset start

What do you need it for?

TouEnMasm


lea eax(rax) ,start (mai,WinMain)  is more secured.
The start adress is dynamically allowed by the linker,the use of offset had good chance to be false.
Fa is a musical note to play with CL

jj2007

Quote from: TouEnMasm on February 22, 2021, 07:04:04 PMthe use of offset had good chance to be false.

Interesting, can you post an example?

TimoVJL

https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization

Address of entry point is in PE-header.
May the source be with you

BogdanOntanu

Quote from: TimoVJL on February 22, 2021, 07:58:24 PM
https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization

Address of entry point is in PE-header.

Not really, the offset of _start symbol will ALSO be adjusted by the PE loader IF ASLR is used on a PE :D

So mov eax,offset start
is safe to use with ASLR[/code]
Ambition is a lame excuse for the ones not brave enough to be lazy, www.oby.ro

jj2007


Gunther

I agree with Jochen: Welcome back Bogdan. We've missed you.

Gunther
You have to know the facts before you can distort them.

six_L

Hi,BogdanOntanu
we are glad to see you are back. :biggrin:
the developer of Sol_OS/Sol_asm, the Steel Soldier.
Say you, Say me, Say the codes together for ever.

BogdanOntanu

Hi all,

Thanks for your nice words ;)
Ambition is a lame excuse for the ones not brave enough to be lazy, www.oby.ro