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 


[TUT][v1] DLL's
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
akinos
Grandmaster Cheater
Reputation: 0

Joined: 11 Jan 2007
Posts: 534
Location: St-Low

PostPosted: Thu Aug 14, 2008 5:41 pm    Post subject: Reply with quote

Nice
_________________
200 Posts: [X]
400 Posts: [X]
500 Posts: [X]

www.myspace.com/dakee_
Back to top
View user's profile Send private message MSN Messenger
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Sat Aug 16, 2008 2:28 am    Post subject: Reply with quote

mrkrishan wrote:
when is tommorow Sad

I agree with mrkrishan, it has been tomorrow for too long now...
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sat Aug 16, 2008 2:43 am    Post subject: Reply with quote

No real point in using __asm like that, just makes it less readable.
You might, however, want to make it more readable using a __declspec(naked) function and memcpy'ing it.

For example,
Code:

void __declspec(naked) Swear_Enable() {
    __asm {
        nop
        nop
    }
}
char Swear_Disable[32];

int main()
{
    void *ptr = 0046f0aa;

    //enable
    memcpy(Swear_Disable, ptr, 2);
    memcpy(ptr, Swear_Enable, 2);

    //disable
    memcpy(ptr, Swear_Disable, 2);

    return 0;
}


This will make it much nicer when working with big complicated hacks that you are actually developing instead of cut&pasting Very Happy.

~nog_lorp

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Sat Aug 16, 2008 5:44 am    Post subject: Reply with quote

Uh.. norg what you posted is a console app. Naked functions and memcpy only work (directly) in another process if injected.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sat Aug 16, 2008 4:21 pm    Post subject: Reply with quote

Meh, ignore the int main then, that was just to stop people from putting code in static context. Pretend it's in your dllmain or some thread it makes.

BTW, if you wanna be cool use MessageBoxW since MessageBoxA is just a wrapper to MessageBoxW (Well, its actually: MessageBoxA calls MessageBoxExA calls MessageBoxTimeoutA calls MessageBoxTimeoutW). In general, calling W functions removes a call or two and some conversion. Meanwhile, ASCII is more compact then UNICODE. So there is a slight size tradeoff (negligible) vs a pretty significant speed tradeoff.

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
中国&
Cheater
Reputation: 0

Joined: 21 Aug 2008
Posts: 34

PostPosted: Thu Aug 21, 2008 9:04 pm    Post subject: THANK YOU Reply with quote

THANK YOU
just what i needed
=D
Back to top
View user's profile Send private message
igoticecream
Grandmaster Cheater Supreme
Reputation: 0

Joined: 23 Apr 2006
Posts: 1807
Location: 0x00400000

PostPosted: Sun Aug 24, 2008 3:53 pm    Post subject: Re: [TUT][v1] DLL's Reply with quote

at the "*(DWORD*)address = 0x9090" part... isn't WORD? you are writting 2 bytes so...
_________________
+~
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 Previous  1, 2, 3
Page 3 of 3

 
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