Jump to content
Tuts 4 You

ASM help


Mr. X

Recommended Posts

Hi,

I am just a newbie and trying to learn ASM language and i have just started with MSG box. I have just used the source code of MSG box for learning purpose to create a msg box. But on execution, i am continuously getting this error. If anyone can provide me any help over this then it would be great. :)

This is the pic of error which i am getting on execution.

2dgkp5z.jpg

Cheers,

Mr. X

Link to comment

Hi,

Problem solved. now its working fine. But want some info.

I have coded this small box

29lmvro.jpg

Now i want that if i should press yes it should go to some specific web page like

www.tuts4you.com

and if i will press no..it should go exit.

Any help ...Just a newbie. Want to become good cracker. :)

Here is my source:

386
.model flat, stdcall
option casemap:none include windows.inc
include kernel32.inc
include user32.inc
includelib kernel32.lib
includelib user32.lib.data
MsgBoxCaption db "Simple MessageBox Program",0
MsgBoxText db "Hello World!",0 .code
start:
invoke MessageBox, 0, addr MsgBoxText, addr MsgBoxCaption, MB_YESNO + MB_ICONASTERISK + MB_DEFBUTTON2
invoke ExitProcess,0
end start

Cheers :rolleyes:

Edited by Mr. X
Link to comment
Now i want that if i should press yes it should go to some specific web page like

www.tuts4you.com

and if i will press no..it should go exit.

Any help ...Just a newbie. Want to become good cracker. :)

Okay, so what you want to do is

  • check the return value of MessageBox
  • call ShellExecute if you get a return value of IDYES

Try this code on for size:

.386
.model flat, stdcall
option casemap:none include windows.inc
include kernel32.inc
include user32.inc
include shell32.inc
includelib kernel32.lib
includelib user32.lib
includelib shell32.lib
.data
MsgBoxCaption db "Simple MessageBox Program",0
MsgBoxText db "Hello World!",0
shellCmd db "www.tuts4you.com", 0
openTxt db "open" .code
start:
invoke MessageBox, 0, addr MsgBoxText, addr MsgBoxCaption, MB_YESNO + MB_ICONASTERISK + MB_DEFBUTTON2
cmp eax, IDYES
jne endProg
invoke ShellExecute, 0, addr openTxt, addr shellCmd, 0, 0, SW_SHOWNORMAL
endProg:
invoke ExitProcess,0
end start
Link to comment
Master Mind

Hi,

I just want to execute this code in a vb application. So before adding this code to application, I just used lorepe and added the import dll shell32 and i used the api shell32.ShellExecuteA. After doing this i saved the changes in lord pe. Now just for a test i run the application to confirm this thing that its working or not ...so that i can insert my code after that But i got this error.

9jouur.jpg

Any idea why this thing happen and how to deal with it. So that application should run fine and i should be able to inject my code in it.

Thanks

Edited by Master Mind
Link to comment

Looking at your error message, are you using the string: "shell32.ShellExecuteA" ?

If so, try removing the "shell32." from the start, so it reads simply "ShellExecuteA".

I didnt know that this kind of patching would work on VB executables too. :)

HR,

Ghandi

Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...