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 


I want my code to be an injectable dll

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Shikakapoop
Expert Cheater
Reputation: 2

Joined: 29 Nov 2006
Posts: 128

PostPosted: Wed Jan 10, 2007 4:08 am    Post subject: I want my code to be an injectable dll Reply with quote

But I don't know exactly how to create a dll.


Here's my code I'd like to inject into starcraft
Code:

alloc(newmem,2048)
label(returnhere)
label(exit)

004F288B:
jmp newmem
nop
nop
returnhere:

newmem:
mov [eax*4+0057e0b8],1000

exit:
jmp returnhere

//----------------------------------------

alloc(newmem1,2048)
label(returnhere1)
label(exit1)

004f28d7:
jmp newmem1
nop
nop
returnhere1:

newmem1:
mov [eax*4+0057e0e8],1000

exit1:
jmp returnhere1


Any help would be greatly appreciated! :]

_________________
Back to top
View user's profile Send private message
idster
Expert Cheater
Reputation: 0

Joined: 22 Aug 2006
Posts: 100
Location: RIGHT BEHIND YOU!!!!

PostPosted: Wed Jan 10, 2007 5:09 am    Post subject: Reply with quote

are you familiar with C++ or VB.net coding?
_________________
hackpacks broken/corrupted/overloaded = 44

latest hackpack broken= my own
SA HP (not posted on CE)

Halo 2 MLG rank: 14473



dont belive me? www.ipchicken.com
Back to top
View user's profile Send private message
icsiwtf
Cheater
Reputation: 0

Joined: 19 May 2006
Posts: 47

PostPosted: Wed Jan 10, 2007 6:16 am    Post subject: Reply with quote

how can you convert an asm script like that into a dll using c++? I know c++ =D
Back to top
View user's profile Send private message
idster
Expert Cheater
Reputation: 0

Joined: 22 Aug 2006
Posts: 100
Location: RIGHT BEHIND YOU!!!!

PostPosted: Wed Jan 10, 2007 6:44 am    Post subject: Reply with quote

not sure about c++ class libraries but vb.net does them, if you can translate the above code into a class library, your pretty much done
_________________
hackpacks broken/corrupted/overloaded = 44

latest hackpack broken= my own
SA HP (not posted on CE)

Halo 2 MLG rank: 14473



dont belive me? www.ipchicken.com
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Wed Jan 10, 2007 7:28 am    Post subject: Reply with quote

just use something like that (got from detour source)
Code:

#include "windows.h"
void WriteMem(DWORD MemOffset, DWORD DataPtr, DWORD dataLen)
{
  DWORD OldProt;
  VirtualProtect((void*) MemOffset, dataLen, PAGE_EXECUTE_READWRITE, &OldProt);
  RtlMoveMemory((void*) MemOffset, (const void*) DataPtr, dataLen);
  VirtualProtect((void*) MemOffset, dataLen, OldProt, &OldProt);
  }
  void EnableCheat(BYTE* AddrToChange, BYTE* To, DWORD len)
  {
    for(DWORD i = 0; i < len; i++)
    WriteMem((DWORD)AddrToChange+i, (DWORD)To+i, 1);
  }

bool WINAPI DllMain(HMODULE hModule, DWORD Reason, PVOID pvReserved)
{
if(Reason == DLL_PROCESS_ATTACH)
{
DWORD MyAddr=0x00123456;
BYTE NewCode[]={0x90,0x90};
EnableCheat((BYTE*)MyAddr,NewCode,2);
}
return true;
}

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
idster
Expert Cheater
Reputation: 0

Joined: 22 Aug 2006
Posts: 100
Location: RIGHT BEHIND YOU!!!!

PostPosted: Fri Jan 12, 2007 8:56 am    Post subject: Reply with quote

sweet code, but 'enable cheat' would need another set of code aswell

something like this:
Code:
 system.process.read(process as string)
dim 'cheat' as boolean
response.system.write = true(dll filepath as string)


note: i came up with this code in like 8mins so don't expect it to work

_________________
hackpacks broken/corrupted/overloaded = 44

latest hackpack broken= my own
SA HP (not posted on CE)

Halo 2 MLG rank: 14473



dont belive me? www.ipchicken.com
Back to top
View user's profile Send private message
Shadowx53
How do I cheat?
Reputation: 0

Joined: 26 Nov 2006
Posts: 5

PostPosted: Sun Jan 14, 2007 1:48 pm    Post subject: Reply with quote

Now that you've posted the code, everyone will probaily come and leech from it. But seriously, if you use VB, It'll work smooth and you can use it as the injectiable DLL as you want it to be.
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 Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
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