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 


[VB 2008][HELP]WriteProcessMemory or something
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Fri Jul 08, 2011 2:26 am    Post subject: Reply with quote

Most of it was converted from my C# AobScan project which im now converting to VB. I Had to make alot of changes without knowing any Vb though.
I know what you mean about deallocating first and my old source would wait to dealllocate. But i changed it around to check if it failed first.

As for crashing, iv not had that happen yet. iv written to an instruction that was accessed about 200 times a sec without problem.

Try the new source now. I fixed something else aswell. I just noticed if the app stores the original instructions and are not written back before the app closes, it'l have nothing to save. So instead you would write them manually with dealloc, like
Mem.Deallocate(&H9FD306, "0F845C010000")

_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Fri Jul 08, 2011 10:08 am    Post subject: Reply with quote

@Pingo
Thanks! I couldn't PM you because I dont have the privilege yet.. I downloaded your example sources but I don't understand how you did it.. Embarassed Can you explain me more in details?

Thanks!
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Fri Jul 08, 2011 12:40 pm    Post subject: Reply with quote

Which part? All?
The way i do it might not be the best way but thats how i pictured it working when i coded it. Im sure it has room for improvement but atm it works fine for my needs.

I'll put together a text file explaining how it works.
Sorry i never commented it Confused

_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Fri Jul 08, 2011 4:30 pm    Post subject: Reply with quote

eg. In the CrazyH4x0r code, you changed "jmp 004918bd" into e99c160200 and in mine, you changed all the opcodes into "60a1b87cdc008b80780900008b808c0000008b0db87cdc008b89780900" + "008b89880000008b1d5c77dc008983d8430000898bdc430000c783d04300000100000061". That is what I want to know.
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Fri Jul 08, 2011 5:27 pm    Post subject: Reply with quote

Oh, thats just the array of bytes. Use the script you have.
Go to your address 9FD306 in the memory viewer.
When you toggle it, it'l jump to a cave. Then go to that cave in the memory viewer and you'l see the opcodes/bytes you just wrote.
Im just writing it as an array. Converting that string to byte array. Its easier and takes up less space when dealing with huge arrays like the one i used for your injection.
Btw, did you test the app? Just curious if it worked or not.

_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Sun Jul 10, 2011 1:17 pm    Post subject: Reply with quote

Can you change it to opcodes instead of byte array? I want to know how you did it.

Thanks

Edit: Is there a function in VB.NET that we can turn opcodes in array of bytes?
For if it worked or not, my game got patched so it's a new code.
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Sun Jul 10, 2011 8:04 pm    Post subject: Reply with quote

Iv not seen any opcode to byte converters. Iv always used byte arrays which is easy enough to do.
_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Mon Jul 11, 2011 10:45 am    Post subject: Reply with quote

But how do you find byte arrays??
I saw this site: http://www.chilkatsoft.com/faq/dotnetstrtobytes.html
It doesn't help me at all..
Also, could I have your msn? It would be easier to chat

Thanks
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Jul 11, 2011 2:24 pm    Post subject: Reply with quote

Char = Byte
It seems that you have to relearn the basics of programming.
In order to get the bytes for your script, just use CE to write down the script and watch it via memory view at CE.
After you've done that, take all those bytes and gather them as a byte array.
And then use your api to write them to the memory!!!

Unless you want to save all that crap and just learn C which will be lot handier for future use.

_________________
Stylo
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Mon Jul 11, 2011 4:11 pm    Post subject: Reply with quote

Stylo wrote:
Char = Byte
It seems that you have to relearn the basics of programming.
In order to get the bytes for your script, just use CE to write down the script and watch it via memory view at CE.
After you've done that, take all those bytes and gather them as a byte array.
And then use your api to write them to the memory!!!

Unless you want to save all that crap and just learn C which will be lot handier for future use.


Where do I take the bytes and turn them to arrays of bytes??..
In the earlier example, hcavols turn 'jmp 004918bd into {&HE9, &H9C, &H23, &HEC, &HFF}. I want to know how he did it
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Mon Jul 11, 2011 7:56 pm    Post subject: Reply with quote

{&HE9, &H9C, &H23, &HEC, &HFF} = jmp 00353bde from 0049183D
{&HEB, &H7E} = jmp 004918bd from 0049183D
It was late when i added that code, i never noticed mine or hcavols distance was wrong haha
So that app i posted is way way off. Same for hcavols code.

@CrazyH4x0r sorry fella. My example wont work for you. You'l need to change the bytes to.
Code:

        If Not Patch Then
            Mem.Patch(&H49183D, "EB")
            Mem.Patch(&H498ED7, "EB")
        Else
            Mem.Patch(&H49183D, "7E")
            Mem.Patch(&H498ED7, "7E")
        End If
        Patch = Not Patch

Both are the same distance, thats why the bytes are the same.
And you'l only need to change that one byte
Now it'l work for you.

_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Tue Jul 12, 2011 11:01 am    Post subject: Reply with quote

How do you know that {&HE9, &H9C, &H23, &HEC, &HFF} = jmp 00353bde from 0049183D if you don't know which program I am using? Is there a convector?? Or how did you turned
Code:
mov eax,[00DC7CB8]
mov eax,[eax+978]
mov eax,[eax+8C]
mov ecx,[00DC7CB8]
mov ecx,[ecx+978]
mov ecx,[ecx+88]
mov ebx,[00DC775C]
mov [ebx+43D8],eax
mov [ebx+43DC],ecx
mov [ebx+43D0],01
popad
jmp lol1

into "60a1b87cdc008b80780900008b808c0000008b0db87cdc008b89780900" + "008b89880000008b1d5c77dc008983d8430000898bdc430000c783d04300000100000061"
without knowing the program I want to inject in???
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Tue Jul 12, 2011 11:27 am    Post subject: Reply with quote

Did you get my PM? I'll just quickly show you instead of highjacking this thread.
A long jump like that is Destination - StartLocation - 5 and converted to byte array.
so
00353bde - 0049183D - 5 = FFEC239C
FFEC239C to byte array is 9C 23 EC FF
E9 is the long jump so you would write E9 9C 23 EC FF

_________________
Back to top
View user's profile Send private message
sunbinyuan
Newbie cheater
Reputation: 0

Joined: 17 Oct 2008
Posts: 22

PostPosted: Tue Jul 12, 2011 5:31 pm    Post subject: Reply with quote

And how you do with mov eax,[00DC7CB8] ?

My MSN is fucked..
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Wed Jul 13, 2011 9:47 am    Post subject: Reply with quote

sunbinyuan wrote:
And how you do with mov eax,[00DC7CB8] ?

You were already told about 4 times by myself and one other.
Read the replies and stop asking the same thing when the answer is in front of you.

_________________
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  Next
Page 2 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