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 


Need some fresh eyes for asm.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
shadesdude
Newbie cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 18

PostPosted: Sun Jan 07, 2007 5:00 pm    Post subject: Need some fresh eyes for asm. Reply with quote

I know that this function reads a struct from a DMA section but my eyes are starting to blur so if someone is up for it I'd appreciate some help in figuring out how it does it. Thanks

memread:
Code:

push edi
mov edi,[esp+08]
mov eax,[edi+0c]
cmp eax,ff
jne pystring_eq+107
movzx eax,byte ptr [edi+14]
lea ecx,[edi+14]
push esi
mov esi,[edi+08]
lea edx,[edi-01]
shl eax,07
test edx,edx
jnge pystring_eq+f7
push ebx
movzx ebx,byte ptr [ecx]
imul eax,eax,000f4243
xor eax,ebx
add ecx,01
sub edx,01
jns pystring_eq+e3
pop ebx
xor eax,esi
cmp eax,ff
pop esi
jne pysting_eq+104
mov [edi+0c],eax
pop edi
ret
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Sun Jan 07, 2007 8:12 pm    Post subject: Reply with quote

Need more info, Whats it doing in game possibly opcodes too for the instructions.
Back to top
View user's profile Send private message
shadesdude
Newbie cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 18

PostPosted: Sun Jan 07, 2007 9:19 pm    Post subject: Reply with quote

Heh that's what I'm trying to backwards engineer. I think what it does is you pass an offset to it then it reconstructs the data by square brackets. But I'm trying to figure out where it grabs the offsets from.

Example of a graphical struct floating out in DMA:

[1, 212, 15, 8, 0, 0, -1056964609, 0, 0, None, 0, 12, [24, 97, 266], 0, 0, 1, 1, [(1, -1, -1090519040)], 0, False, False, None, None, None, 0, None, False, u'<t>8,264m<t>Asteroid (Dense Veldspar)']

So this should create an object on screen with the text "8,264m Asteroid" (Dense Veldspar) and I'm looking for a way to collect these values.

If this gives you any help this is stuck at the beginning of the allocated space. I checked it out briefly but couldn't really find any specs.

XSLT, XSL Transformations

XSLT (16-Nov-1999) is a W3C Recommendation. It is specified in
http://www.w3.org/TR/xslt/
BASE -- the basic namespace defined by this specification


Edit : Ahhh so it's constructing the screen with XML cool
http://www.w3.org/TR/xslt
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Sun Jan 07, 2007 9:28 pm    Post subject: Reply with quote

Backwards engineer Smile Um no-one is going to steal your work.

By saying asteroids i take it is some kind of space shooter or something,
That might be really hard to get if they are randomly generated you think ?

That could be anywheres between screen resolution pixels with the handle of the object. Unless your meaning the number showing by the asteroid, of the distance or something.
Back to top
View user's profile Send private message
shadesdude
Newbie cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 18

PostPosted: Sun Jan 07, 2007 9:42 pm    Post subject: Reply with quote

It's Eve-Online so it shoud be fun to take apart. I'm not looking to write to it just read the items. Heh I have no idea what any of the constructors are. I think all the data is saved locally and is updated when the server says your character goes into a new "room." I'm making a bot because all the macro bots really suck and loose functionality everytime someone moves something on the screen. The next step is to find where they keep arbitrary values like health, shields, cargo space, and enemies. The DMA is making it pretty hard >.< I also found the memcpy routine which writes the data to the memory but it's pretty long so I may post it later. It sucks typing out asm from hex.


Just a heads up I basically jumped straight into memory editing with this project so I may not pick up on the obvious right away.
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Mon Jan 08, 2007 7:54 am    Post subject: Reply with quote

Well that could prove to be a nice project with some "read byte" coding.
Back to top
View user's profile Send private message
FajarSec
Master Cheater
Reputation: 0

Joined: 06 Jan 2007
Posts: 325

PostPosted: Tue Jan 09, 2007 10:01 am    Post subject: Reply with quote

O.o is that script half of it or the full part because i dont see a Enable and Disable
Back to top
View user's profile Send private message
dezuzi
Expert Cheater
Reputation: 0

Joined: 09 Aug 2006
Posts: 146
Location: In your washing machine

PostPosted: Tue Jan 09, 2007 10:46 am    Post subject: Reply with quote

let me tell you in advance, eve-online is a real challenge and it will take effort Smile and im glad there are people on this forum who dare/bother to try this sort of stuff, props to you shadesdude
_________________
Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime.
Dynamic memory is my playground..
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Tue Jan 09, 2007 12:41 pm    Post subject: Reply with quote

OMg,,,,,,, Im going in STFU mode now cause i was way off lol.
Back to top
View user's profile Send private message
shadesdude
Newbie cheater
Reputation: 0

Joined: 09 Dec 2006
Posts: 18

PostPosted: Tue Jan 09, 2007 8:02 pm    Post subject: Reply with quote

@ FajarSec - I think it's a DMA addressed DMA section on a closer look. A pool of offsets that lead to a pool of offset values >.<. That code takes an offset or a pointer (not sure which) and reads the data for the display functions. Anyway I found the code that creates the structs as well I'll dump that below.

@dezuzi - Thanks for the encourgement nice work on the packets as well Wink I've found it's really python and XML heavy which could either be really good or bad.

@Labyrnth - no worries I appreciate any feed back (Am I attention starved?) and yes as soon as I figure out what' going on it'll all be thrown up here Very Happy

copys incomming packets into local DMA memory... I think
Code:
memcpy
78145020 - push ebp
78145021 - mov ebp,esp
78145023 - push edi
78145024 - push esi
78145025 - mov esi,[ebp+0c]
78145028 - mov ecx,[ebp+10]
7814502b - mov edi,[ebp+08]
7814502e - mov eax,ecx
78145030 - mov edx,ecx
78145032 - add eax,esi
78145034 - cmp edi,esi
78145036 - jna memcpy+20
78145038 - cmp edi,eax
7814503a - jb memcpy+1c4
78145040 - cmp ecx,00000100
78145046 - jb memcpy+47
78145048 - cmp dword ptr [_unguarded_readlc_active+1020],00
7814504f - je memcpy+47
78145051 - push edi
78145052 - push esi
78145053 - and edi,0f
78145056 - and esi,0f
78145059 - cmp edi,esi
7814505b - pop esi
7814505c - pop edi
7814505d - jne memcpy+47
7814505f - pop esi
78145060 - pop edi
78145061 - pop ebp
78145062 - jmp strnicmp+1c9
78145067 - not edi,0003
7814506d - jne memcpy+64
7814506f - shr ecx,02
78145072 - and edx,03
78145075 - cmp ecx,08
78145078 - jb memcpy+84
7814507a - repe movsd
7814507c - jmp dword ptr [edx*4+memcpy+174]
78145083 - nop
78145084 - mov eax,edi
78145086 - mov edx,00000003
7814508b - sub ecx,04
7814508e - jb memcpy+7c
78145090 - and eax,03
78145093 - add ecx,eax
78145095 - jmp dword ptr [eax*4+memcpy+88]
7814509c - jmp dword ptr [ecx*4+memcpy+184]
781450a3 - nop
781450a4 - jmp dword ptr [ecx*4+memcpy+108]
781450ab - nop
781450ac - mov eax,e4781450
781450b1 - push eax
781450b2 - adc al,78
781450b4 - or [ecx+14],dl
781450b7 - js memcpy+bc
781450b9 - ror [edx-75f877fa],1
781450bf - inc esi
781450c0 - add [eax+468a0147],ecx
781450c6 - add al,cl
781450c8 - jmp 7a5bd8cf
781450cd - add esi,03
781450d0 - add edi,03
781450d3 - cmp ecx,08
781450d6 - jb memcpy+84
781450d8 - repe movsd
781450da - jmp dword ptr [edx*4+memcpy+174]
781450e1 - lea ecx,[ecx+00]
781450e4 - and edx,ecx
781450e6 - mov al,[esi]
781450e8 - mov [edi],al
781450ea - mov al,[esi+01]
781450ed - shr ecx,02
781450f0 - mov [edi+01],al
781450f3 - add esi,02
781450f6 - add edi,02
781450f9 - cmp ecx,08
781450fc - jb memcpy+84
781450fe - repe movsd
78145100 - jmp dword ptr [edx*4+memcpy+174]
78145107 - nop
78145108 - and edx,ecx
7814510a - mov al,[esi]
7814510c - mov [edi],al
7814510e - add esi,01
78145111 - shr ecx,02
78145114 - add edi,01
78145117 - cmp ecx,08
7814511a - jb memcpy+84
7814511c - repe movsd
7814511e - jmp dword ptr [edx*4+memcpy+174]
78145125 - lea ecx,[ecx+00]
78145128 - mov edx,[ecx+14]
7814512b - js memcpy+185
7814512d - push ecx
7814512e - adc al,78
78145130 - jo memcpy+163
78145132 - adc al,78
78145134 - push 60781451
78145139 - push ecx
7814513a - adc al,78
7814513c - pop eax
7814513d - push ecx
7814513e - adc al,78
78145140 - push eax
78145141 - push ecx
78145142 - adc al,78
78145144 - dec eax
78145145 - push ecx
78145146 - adc al,78
78145148 - mov eax,[esi+ecx*4-1c]
7814514c - mov [edi+ecx*4-1c],eax
78145150 - mov eax,[esi+ecx*4-18]
78145154 - mov [edi+ecx*4-18],eax
78145158 - mov eax,[esi+ecx*4-14]
7814515c - mov [edi+ecx*4-14],eax
78145160 - mov eax,[esi+ecx*4-10]
78145164 - mov [edi+ecx*4-10],eax
78145168 - mov eax,[esi+ecx*4-0c]
7814516c - mov [edi+ecx*4-0c],eax
78145170 - mov eax,[esi+ecx*4-08]
78145174 - mov [edi+ecx*4-08],eax
78145178 - mov eax,[esi+ecx*4-04]
7814517c - mov [edi+ecx*4-04],eax
78145180 - lea eax,[ecx*4+00000000]
78145187 - add esi,eax
78145189 - add edi,eax
7814518b - jmp dword ptr [edx*4+memcpy+174]
78145192 - mov edi,edi
78145194 - movsb
78145195 - push ecx
78145196 - adc al,78
78145198 - lodsb
78145199 - push ecx
7814519a - adc al,78
7814519c - mov eax,cc781451
781451a1 - push ecx
781451a2 - adc al,78
781451a4 - mov eax,[ebp+08]
781451a7 - pop esi
781451a8 - pop edi
781451a9 - leave
781451aa - ret
781451ab - nop
781451ac - mov al,[esi]
781451ae - mov [edi],al
781451b0 - mov eax,[ebp+08]
781451b3 - pop esi
781451b4 - pop edi
781451b5 - leave
781451b6 - ret
781451b7 - nop
781451b8 - mov al,[esi]
781451ba - mov [edi],al
781451bc - mov al,[esi+01]
781451bf - mov [edi+01],al
781451c2 - mov eax,[ebp+08]
781451c5 - pop esi
781451c6 - pop edi
781451c7 - leave
781451c8 - ret
781451c9 - lea ecx,[ecx+00]
781451cc - mov al,[esi]
781451ce - mov [edi],al
781451d0 - mov al,[esi+01]
781451d3 - mov [edi+01],al
781451d6 - mov al,[esi+02]
781451d9 - mov [edi+02],al
781451dc - mov eax,[ebp+08]
781451df - pop esi
781451e0 - pop edi
781451e1 - leave
781451e2 - ret
781451e3 - nop
781451e4 - lea esi,[ecx+esi-04]
781451e8 - lea edi,[ecx+edi-04]
781451ec - not edi,0003
781451f2 - jne memcpy+1f8
781451f4 - shr ecx,02
781451f7 - and edx,03
781451fa - cmp ecx,08
781451fd - jb memcpy+1ec
781451ff - std
78145200 - repe movsd
78145202 - cld
78145203 - jmp dword ptr [edx*4+memcpy+310]
7814520a - mov edi,edi
7814520c - neg ecx
7814520e - jmp dword ptr [ecx*4+memcpy+2c0]
78145215 - lea ecx,[ecx+00]
78145218 - mov eax,edi
7814521a - mov edx,00000003
7814521f - cmp ecx,04
78145222 - jb memcpy+210
78145224 - and eax,03
78145227 - sub ecx,eax
78145229 - jmp dword ptr [eax*4+memcpy+214]
78145230 - jmp dword ptr [ecx*4+memcpy+310]
78145237 - nop
78145238 - inc esp
78145239 - push edx
7814523a - adc al,78
7814523c - push 90781452
78145241 - push edx
78145242 - adc al,78
78145244 - mov al,[esi+03]
78145247 - and edx,ecx
78145249 - mov [edi+03],al
7814524c - sub esi,01
7814524f - shr ecx,02
78145252 - sub edi,01
78145255 - cmp ecx,08
78145258 - jb memcpy+1ec
7814525a - std
7814525b - repe movsd
7814525d - cld
7814525e - jmp dword ptr [edx*4+memcpy+310]
78145265 - lea ecx,[ecx+00]
78145268 - mov al,[esi+03]
7814526b - and edx,ecx
7814526d - mov [edi+03],al
78145270 - mov al,[esi+02]
78145273 - shr ecx,02
78145276 - mov [edi+02],al
78145279 - sub esi,02
7814527c - sub edi,02
7814527f - cmp ecx,08
78145282 - jb memcpy+1ec
78145284 - std
78145285 - repe movsd
78145287 - cld
78145288 - jmp dword ptr [edx*4+memcpy+310]
7814528f - nop
78145290 - mov al,[esi+03]
78145293 - and edx,ecx
78145295 - mov [edi+03],al
78145298 - mov al,[esi+02]
7814529b - mov [edi+02],al
7814529e - mov al,[esi+01]
781452a1 - shr ecx,02
781452a4 - mov [edi+01],al
781452a7 - sub esi,03
781452aa - sub edi,03
781452ad - cmp ecx,08
781452b0 - jb memcpy+1ec
781452b6 - std
781452b7 - repe movsd
781452b9 - cld
781452ba - jmp dword ptr [edx*4+memcpy+310]
781452c1 - lea ecx,[ecx+00]
781452c4 - in al,52
781452c6 - adc al,78
781452c8 - in al,dx
781452c9 - push edx
781452ca - adc al,78
781452cc - hlt
781452cd - push edx
781452ce - adc al,78
781452d0 - cld
781452d1 - push edx
781452d2 - adc al,78
781452d4 - add al,53
781452d6 - adc al,78
781452d8 - or al,53
781452da - adc al,78
781452dc - adc al,53
781452de - adc al,78
781452e0 - daa
781452e1 - push ebx
781452e2 - adc al,78
781452e4 - mov eax,[esi+ecx*4+1c]
781452e8 - mov [edi+ecx*4+1c],eax
781452ec - mov eax,[esi+ecx*4+18]
781452f0 - mov [edi+ecx*4+18],eax
781452f4 - mov eax,[esi+ecx*4+14]
781452f8 - mov [edi+ecx*4+14],eax
781452fc - mov eax,[esi+ecx*4+10]
78145300 - mov [edi+ecx*4+10],eax
78145304 - mov eax,[esi+ecx*4+0c]
78145308 - mov [edi+ecx*4+0c],eax
7814530c - mov eax,[esi+ecx*4+08]
78145310 - mov [edi+ecx*4+08],eax
78145314 - mov eax,[esi+ecx*4+04]
78145318 - mov [edi+ecx*4+04],eax
7814531c - lea eax,[ecx*4+00000000]
78145323 - add esi,eax
78145325 - add edi,eax
78145327 - jmp dword ptr [edx*4+memcpy+310]
7814532e - mov edi,edi
78145330 - inc eax
78145331 - push ebx
78145332 - adc al,78
78145334 - dec eax
78145335 - push ebx
78145336 - adc al,78
78145338 - pop eax
78145339 - push ebx
7814533a - adc al,78
7814533c - insb
7814533d - push ebx
7814533e - adc al,78
78145340 - mov eax,[ebp+08]
78145343 - pop esi
78145344 - pop edi
78145345 - leave
78145346 - ret
78145347 - nop
78145348 - mov al,[esi+03]
7814534b - mov [edi+03],al
7814534e - mov eax,[ebp+08]
78145351 - pop esi
78145352 - pop edi
78145353 - leave
78145354 - ret
78145355 - lea ecx,[ecx+00]
78145358 - mov al,[esi+03]
7814535b - mov [edi+03],al
7814535e - mov al,[esi+02]
78145361 - mov [edi+02],al
78145364 - mov eax,[ebp+08]
78145367 - pop esi
78145368 - pop edi
78145369 - leave
7814536a - ret
7814536b - nop
7814536c - mov al,[esi+03]
7814536f - mov [edi+03],al
78145372 - mov al,[esi+02]
78145375 - mov [edi+02],al
78145378 - mov al,[esi+01]
7814537b - mov [edi+01],al
7814537e - mov eax,[ebp+08]
78145381 - pop esi
78145382 - pop edi
78145383 - leave
Back to top
View user's profile Send private message
dezuzi
Expert Cheater
Reputation: 0

Joined: 09 Aug 2006
Posts: 146
Location: In your washing machine

PostPosted: Wed Jan 10, 2007 3:28 pm    Post subject: Reply with quote

thats the correct place to be looking, however you're going to have to use pointers, i havnt messed with received packets myself, but i assume writing down the ESP or EBP pointers you get from recv should do fine, then set some breakpoints at
78145310 - mov [edi+ecx*4+08],eax
78145318

or

78145174 - mov [edi+ecx*4-08],eax
7814517c - mov [edi+ecx*4-04],eax

not sure which ones were used

781451cc - mov al,[esi]
781451ce - mov [edi],al
781451d0 - mov al,[esi+01]
781451d3 - mov [edi+01],al
781451d6 - mov al,[esi+02]
781451d9 - mov [edi+02],al

will help too, either make a jump and write a compare for esp or ebp that matches the receive esp or ebp, that should work since it works for send Wink
and remember, theyr encrypted, let it decrypt first

eve-online is truely a masterpiece of coding

_________________
Give a man a fish; you have fed him for today. Teach a man to fish; and you have fed him for a lifetime.
Dynamic memory is my playground..
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