• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 471
  • Last Modified:

How to do these things in assembly !?

Hello ,
I'm new to assembly and need to help doing bit small thing, it may be so simple for assembly programmers! But its not for me ! ..

PUSH OFFSET 001E5740                ; ASCII "cmd "
CALL DWORD PTR DS:[1E92B0]

I need to replace the address 001E5740 with a label or a variable how to do this in assembly please give me an example.
Also, the second line the address  [1E92B0] is an address of a library in windows 7, how to get the real address everytime i run the program because its change everytime I run the program.
Note that the previous code is from OllyDBG
Bese regards,
SAM
0
hintco
Asked:
hintco
1 Solution
 
TobiasCommented:
Dear,

This is the sample for storing the variable.

.data
var DWORD 3 ; variable
 
.code
 
push var
push offset var

Open in new window


For the address see this (arwin) example :

http://www.projectshellcode.com/node/18
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now