| View previous topic :: View next topic |
| Author |
Message |
ogpayne Cheater
Reputation: 0
Joined: 08 Dec 2014 Posts: 45
|
Posted: Mon Sep 12, 2016 8:46 pm Post subject: Help understand some asm |
|
|
Hi everyone, it has been a really long time since I have bothered with any asm and I just need some help understanding what is happening here. Now this function that is highlighted is increasing by 1 for everyone portion of the map you find in an arpg. So when you discover a new part of the map it adds 1 to something in the memory and it saves that part of the map as identified. I'm trying to make it so the full map is already identified. I also dont understand why it is adding "1BC" to esi. What is "1BC"? If you can interpret anything else from this picture please explain so I can understand, thank you very much! Also if you need more pictures to see what is happening, let me know!
|
|
| Back to top |
|
 |
sbryzl Master Cheater
Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Mon Sep 12, 2016 11:05 pm Post subject: |
|
|
[esi + 1c4] is a pointer, as indicated by the brackets, whose pointed to value is moved into edx. then edx is tested to be equal to zero and if it is then it jumps directly to your op which increments the value pointed to by [esi+1bc].
esi is the register which looks to be holding a base address and the program is working with information at offsets like 1bc from the base address which likely means there is a data table there containing information or flags.
|
|
| Back to top |
|
 |
rog9001 Expert Cheater
Reputation: 2
Joined: 22 Dec 2015 Posts: 214 Location: Jupiter
|
Posted: Tue Sep 13, 2016 11:18 am Post subject: |
|
|
well esi is the register and 1BC is the offset.
If you have used the dissect data structure tool you will know what I am talking about.
In the data structure it goes like this (obviously):
| Code: |
00000004 - float ADDRESS: 4.0001
00000008 - double ADDRESS: -9.3702
0000000C - 4 bytes ADDRESS: 2000
00000010 - float ADDRESS: 5.097E4
.
.
.
000001BC - 4 bytes ADDRESS: 920
|
basically you can also write it like this:
| Code: |
[esi+00000004] - float ADDRESS: 4.0001
[esi+00000008] - double ADDRESS: -9.3702
[esi+0000000C] - 4 bytes ADDRESS: 2000
[esi+00000010] - float ADDRESS: 5.097E4
.
.
.
[esi+000001BC] - 4 bytes ADDRESS: 920
|
so lets say that the value at [esi+000001BC] is 920. inc [esi+000001BC] means that the value which is stored in [esi+000001BC] is having 1 added to it (920+1=921).
(sorry if I am bad at explaining things xD )
|
|
| Back to top |
|
 |
ogpayne Cheater
Reputation: 0
Joined: 08 Dec 2014 Posts: 45
|
Posted: Wed Sep 14, 2016 3:28 pm Post subject: |
|
|
| Okay I see, thanks guys. But how could I make this inc by more than 1?
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Sep 14, 2016 7:01 pm Post subject: |
|
|
|
|
|
| Back to top |
|
 |
ogpayne Cheater
Reputation: 0
Joined: 08 Dec 2014 Posts: 45
|
Posted: Wed Sep 14, 2016 8:11 pm Post subject: |
|
|
Ah thank you, sorry for the stupid questions it has been like a year since I have messed with any asm. Anyways, the address that deals with adding to the map also apparently has a lot more functions. The top 3 really high values in this photo are constantly being accessed. I don't know what they are though. The other lower values are being added everytime I find new areas of the map, but what is odd is that it will add one address and inc by 1 but then when I find more of the map it will add another address and inc that one by 1 plus the last one by one and it will continue doing that which is why all of the numbers are higher.. What is happening here? I don't understand how this game is storing the map information.. (one value is 69 because I tried adding 50 to it to see what would happen, nothing happened)
|
|
| Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Sep 14, 2016 10:09 pm Post subject: |
|
|
Try taking one of the address related to the map and find out what accesses this address.
See what instructions pop up when you open the map or something.
If an instruction pops up, find out what addresses that instruction accesses.
When you open the map, if it touches a lot of zeroes, try changing their value and seeing if it alters your map.
|
|
| Back to top |
|
 |
|