Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Asm delphi help
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Wed Jun 17, 2009 10:40 pm    Post subject: Asm delphi help Reply with quote

How do I run the asm script that edit other application memory.
I don't 1 to use a dll and inject to the process but I have a external application.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jun 18, 2009 6:49 am    Post subject: Reply with quote

write the asm in a procedure. get the address of that procedure and how long it is. then use writeprocessmemory with those parameters
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Thu Jun 18, 2009 11:33 am    Post subject: Reply with quote

Slugsnack wrote:
write the asm in a procedure. get the address of that procedure and how long it is. then use writeprocessmemory with those parameters

Assuming it's a codecave, I doubt you can just use WPM. You'll have to use VirtualAllocEx. Thought you said you knew WinAPIS?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jun 18, 2009 11:56 am    Post subject: Reply with quote

assuming it's a codecave i doubt he can just use VirtualAllocEx. i guess he gotta get the handle first, one way would be EnumProcesses. thought you said you knew winapis ?!
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Thu Jun 18, 2009 12:39 pm    Post subject: Reply with quote

Never said I did. You just contradicted yourself, you said use WriteProcessMemory which requires the process's handle which of course if you are making a codecave you'll need VirtualAllocEx also.

http://msdn.microsoft.com/en-us/library/ms682629(VS.85).aspx

Don't see how EnumProcess will directly get you the handle, it will only give you an array of the a bunch of PIDs.

EnumProcess will indirectly give you the handle once you call OpenProcess, that is if you somehow can get the PID of the process you want using EnumProcess.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Thu Jun 18, 2009 2:08 pm    Post subject: Reply with quote

omg you're a complete retard.. it's like if someone told you to get a fruit seed and i told you to get an apple then you'd be like OMG BUT I ONLY GET AN APPLE I NEED A SEED !!!

if we're gonna use your point that X implies Y then writing a procedure to another process implies allocating memory first. i just assumed not everybody is like you and needs each baby step given to them. i gave him the main concept expecting him to figure the rest out which was self-explanatory and follows from what i gave him

i guess a 'coder' like you would prefer a picture tutorial though..
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Thu Jun 18, 2009 9:00 pm    Post subject: Reply with quote

Slugsnack wrote:
omg you're a complete retard.. it's like if someone told you to get a fruit seed and i told you to get an apple then you'd be like OMG BUT I ONLY GET AN APPLE I NEED A SEED !!!

if we're gonna use your point that X implies Y then writing a procedure to another process implies allocating memory first. i just assumed not everybody is like you and needs each baby step given to them. i gave him the main concept expecting him to figure the rest out which was self-explanatory and follows from what i gave him

i guess a 'coder' like you would prefer a picture tutorial though..


...Soooo you're just going to write a procedure to an address of the process? Make sure it's in one of the process's running thread so it'll even run, also make sure it throw any exceptions either, you should know exception handling right? You were bragging about it on GzN. Ohhhh or are you saying you inject the procedure into an allocated memory? That's like buying house and not buying the land, fucking useless. BTW apples have seeds in them.
Back to top
View user's profile Send private message
gunminiho
Expert Cheater
Reputation: 0

Joined: 15 Dec 2008
Posts: 144
Location: peru

PostPosted: Thu Jun 18, 2009 11:13 pm    Post subject: Reply with quote

i think hes trying to make a trainer with a asm instruction, im not sure about it but you can write your code cave and your jumo to ur function and do CreateRemoteThread to inject your code Rolling Eyes well its a idea since, im trying to do that for a dll.

Code:
function CreateRemoteThread (hProcess : Integer;
    var lpThreadAttributes : SECURITY_ATTRIBUTES;
    dwStackSize : Integer;
    var lpStartAddress : Integer;
    var lpParameter : Pointer;
    dwCreationFlags : Integer;
    var lpThreadId : Integer) : Integer;
    stdcall; external 'kernel32' name 'CreateRemoteThread'


but i use CreateThread for do that Rolling Eyes so if you're using a standalone app you can try that
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Jun 19, 2009 10:20 am    Post subject: Reply with quote

gunminiho wrote:
i think hes trying to make a trainer with a asm instruction, im not sure about it but you can write your code cave and your jumo to ur function and do CreateRemoteThread to inject your code Rolling Eyes well its a idea since, im trying to do that for a dll.

Code:
function CreateRemoteThread (hProcess : Integer;
    var lpThreadAttributes : SECURITY_ATTRIBUTES;
    dwStackSize : Integer;
    var lpStartAddress : Integer;
    var lpParameter : Pointer;
    dwCreationFlags : Integer;
    var lpThreadId : Integer) : Integer;
    stdcall; external 'kernel32' name 'CreateRemoteThread'


but i use CreateThread for do that Rolling Eyes so if you're using a standalone app you can try that


...wat? You wouldn't write a whole procedure for one asm instruction...
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Jun 19, 2009 3:53 pm    Post subject: Reply with quote

ignore the idiot in the post above me. of course an asm procedure doesn't imply more than 1 asm instruction Rolling Eyes

i guess void's type require a picture tutorial to handhold them through that complex concept though.. as i said ignore him, he's talking out of his ass
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Jun 19, 2009 8:31 pm    Post subject: Reply with quote

Slugsnack wrote:
ignore the idiot in the post above me. of course an asm procedure doesn't imply more than 1 asm instruction Rolling Eyes

i guess void's type require a picture tutorial to handhold them through that complex concept though.. as i said ignore him, he's talking out of his ass
How am I talking out of my ass, everything I said was true. Even the part where you needed VirtuaAllocEx to write a codecave, an idiot like you can't comprehend that?
Back to top
View user's profile Send private message
gunminiho
Expert Cheater
Reputation: 0

Joined: 15 Dec 2008
Posts: 144
Location: peru

PostPosted: Fri Jun 19, 2009 9:37 pm    Post subject: Reply with quote

OK OK guys stop fighting and help him Rolling Eyes

you ; are saying that he needs to call VirtualAllocEx ( since hes working in another process ) and after what?


and Slugsnack, are you telling him that do:

procedure lol; stdcall;

asm
<code>
end;

then do a change of bytes of addy ( the one will jump to codecave ) ?
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Fri Jun 19, 2009 10:09 pm    Post subject: Reply with quote

gunminiho wrote:
OK OK guys stop fighting and help him Rolling Eyes

you ; are saying that he needs to call VirtualAllocEx ( since hes working in another process ) and after what?


and Slugsnack, are you telling him that do:

procedure lol; stdcall;

asm
<code>
end;

then do a change of bytes of addy ( the one will jump to codecave ) ?


No it need's to be naked.
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Fri Jun 19, 2009 10:19 pm    Post subject: Reply with quote

no it doesn't i'll code an example for you tomorrow, it's 5:10am here and i need to start packing my shit
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Fri Jun 19, 2009 10:21 pm    Post subject: Reply with quote

; wrote:
gunminiho wrote:
OK OK guys stop fighting and help him Rolling Eyes

you ; are saying that he needs to call VirtualAllocEx ( since hes working in another process ) and after what?


and Slugsnack, are you telling him that do:

procedure lol; stdcall;

asm
<code>
end;

then do a change of bytes of addy ( the one will jump to codecave ) ?


No it need's to be naked.



Why don't you stop posting in a Delphi topic since you obviously know nothing about it.

1. Delphi doesn't have naked functions.
2. Any functions in delphi whose calling convention is stdcall, and who doesn't have any parameters does not contain a preamble
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites