What's new

Ask me anything

gir489

RCE Fanatics
Talents
Joined
May 8, 2017
Messages
202
Likes
19
Points
18
#21
MangaDrawing post_id=31582 time=1517862174 user_id=685 said:
Hi
I have a one question from assembly.
If we have player health that is float but the health maximum value was 4-byte while they are similar in appearance.
how can get health to maximum with assembly?
TheyCallMeTim13 post_id=31583 time=1517862555 user_id=91 said:
CVTSI2SS https://c9x.me/x86/html/file_module_x86_id_59.html">https://c9x.me/x86/html/file_module_x86_id_59.html
CVTSS2SI https://c9x.me/x86/html/file_module_x86_id_61.html">https://c9x.me/x86/html/file_module_x86_id_61.html
Yes. This approach works just fine

Frost post_id=31605 time=1517880786 user_id=12582 said:
gir489, can you check my PM please!? ...
No.

predprey post_id=31606 time=1517881208 user_id=49 said:
This is a play on letters of "To be or not to be?" I'd have to say I prefer to be. Anyone who says elsewise doesn't appreciate life.
 

TheyCallMeTim13

Wiki Monster
Talents
Fearless Donors
Joined
Mar 3, 2017
Messages
509
Likes
117
Points
43
#22
gir489 post_id=31482 time=1517781712 user_id=3979 said:
TheyCallMeTim13 post_id=31473 time=1517777413 user_id=91 said:
gir489 post_id=31458 time=1517769101 user_id=3979 said:
... I am a heavy proponent of tribalism...
So how do you reconcile tribalism with GMO seeds, or the internet?
You don't. That's just the way it is.
So to me tribalism just seems like a step in the wrong direction. You still just end up with same kind of problems. I mean, I get that when some church or what not is built you get an Irish or what ever neighborhood; but must we really continue to divide based on what ever trivial thing we place importance on at that point in history?
 
Joined
Mar 5, 2017
Messages
29
Likes
1
Points
1
#23
Hi
Other quetion is : why this script can not disable(checkbox not checked but enable then i can not disable script)?
Code:
[ENABLE]
aobscanmodule(HEALTH,DarksidersPC.exe,0F 2F 81 00 01 00 00) // should be unique
alloc(Compare,$1000)

label(code)
label(return)
label(Enemy)
label(Player)
label(En_Phealth)
registersymbol(En_Phealth)
label(En_Ehit)
registersymbol(En_Ehit)

En_Phealth:
dd 0
En_Ehit:
dd 0

Compare:
cmp dword ptr [En_Phealth],1
je Player
cmp dword ptr [En_Ehit],1
je Enemy

Player:
cmp [ecx+02AC],0
je Enemy
fild dword ptr [ecx+01DC]
fstp dword ptr [ecx+0100]


code:
  comiss xmm0,[ecx+00000100]
  jmp return

Enemy:
mov [ecx+0100],(float)1
jmp code


HEALTH:
  jmp Compare
  nop
  nop
return:
registersymbol(HEALTH)

[DISABLE]
HEALTH:
  db 0F 2F 81 00 01 00 00

unregistersymbol(HEALTH)
unregistersymbol(En_Phealth)
unregistersymbol(En_Ehit)
dealloc(Compare)
thanks.
 

SunBeam

RCE Fanatics
Talents
Fearless Donors
Joined
Feb 4, 2018
Messages
743
Likes
401
Points
63
#24
1. Make sure you allocate near the game's module, not randomly in-memory. Here's the difference between:

Code:
alloc(Compare,$1000)
<IMG src="https://i.imgur.com/t5rTBw9.png">


and

Code:
alloc(Compare,$1000,Calculator.exe)
<IMG src="https://i.imgur.com/dnaTypt.png">


See how many bytes instruction eats-up?..

2. Your script doesn't even enable in my test scenario. Before saying anything (such as how I don't have the game or the array) know I've replicated what you look for and changed process name to my test one (Calculator.exe). Script doesn't enable because you need a second label for [DISABLE]:

Code:
[ENABLE]

aobscanmodule( HEALTH, Calculator.exe, 0F2F8100010000 )
registersymbol( HEALTH )
label( HEALTH_orig )
registersymbol( HEALTH_orig )
label( back )
alloc( Hook, 0x1000, Calculator.exe )
label( code )
label( Enemy )
label( Player )
label( En_Phealth )
registersymbol( En_Phealth )
label( En_Ehit )
registersymbol( En_Ehit )

Hook:
cmp dword ptr [En_Phealth],1
je Player

cmp dword ptr [En_Ehit],1
je Enemy

Player:
cmp [ecx+2AC],0
je Enemy
  fild dword ptr [ecx+1DC]
  fstp dword ptr [ecx+100]

code:
  comiss xmm0,[ecx+100]
  jmp back

Enemy:
mov [ecx+100],(float)1
jmp code

En_Phealth:
dd 0
En_Ehit:
dd 0

HEALTH:
HEALTH_orig:
jmp Hook
db 90 90
back:

[DISABLE]

HEALTH_orig:
db 0F 2F 81 00 01 00 00

unregistersymbol( En_Ehit )
unregistersymbol( En_Phealth )
dealloc( Hook )
unregistersymbol( HEALTH_orig )
unregistersymbol( HEALTH )
- enabled:

<IMG src="https://i.imgur.com/QHMKoxM.png">


- disabled:

<IMG src="https://i.imgur.com/BIsiyre.png">


And if you want the jumps shorter, use 'short' (keep in mind if you have a lot of code, some 'short' ones will exceed the max. for short jumps - EB xx vs. 0F 8x xx xx xx). Example:

Code:
[ENABLE]

aobscanmodule( HEALTH, Calculator.exe, 0F2F8100010000 )
registersymbol( HEALTH )
label( HEALTH_orig )
registersymbol( HEALTH_orig )
label( back )
alloc( Hook, 0x1000, Calculator.exe )
label( code )
label( Enemy )
label( Player )
label( En_Phealth )
registersymbol( En_Phealth )
label( En_Ehit )
registersymbol( En_Ehit )

Hook:
cmp dword ptr [En_Phealth],1
je short Player

cmp dword ptr [En_Ehit],1
je short Enemy

Player:
cmp [ecx+2AC],0
je short Enemy
  fild dword ptr [ecx+1DC]
  fstp dword ptr [ecx+100]

code:
  comiss xmm0,[ecx+100]
  jmp back

Enemy:
mov [ecx+100],(float)1
jmp short code

En_Phealth:
dd 0
En_Ehit:
dd 0

HEALTH:
HEALTH_orig:
jmp Hook
db 90 90
back:

[DISABLE]

HEALTH_orig:
db 0F 2F 81 00 01 00 00

unregistersymbol( En_Ehit )
unregistersymbol( En_Phealth )
dealloc( Hook )
unregistersymbol( HEALTH_orig )
unregistersymbol( HEALTH )
<IMG src="https://i.imgur.com/2t9xHYs.png">


Also, I apply the FIFO rule, whereas I alloc/dealloc or register/unregister in the order of occurrence, and not randomly/chaotically (am aware CE can parse content regardless of order).

Peace,
Sun
 
Joined
Mar 5, 2017
Messages
29
Likes
1
Points
1
#25
when [Enable] have registersymbol so [Disable] should have unregistersymbol
why you not use from unregistersymbol in [Disable]?
thanks.
 

SunBeam

RCE Fanatics
Talents
Fearless Donors
Joined
Feb 4, 2018
Messages
743
Likes
401
Points
63
#26
See above edited post. Because [DISABLE] doesn't know where exactly HEALTH's position is; that location comes as the result of an aobscanmodule, not a label definition:

label(HEALTH)
registersymbol(HEALTH)

vs.

aobscanmodule(HEALTH,...) // label not set
registersymbol(HELATH)

Your registersymbol(HEALTH) works only for [ENABLE] section; [DISABLE] doesn't know how to interpret it.
 

SunBeam

RCE Fanatics
Talents
Fearless Donors
Joined
Feb 4, 2018
Messages
743
Likes
401
Points
63
#28
I showed you with pictures that this works:

Code:
[ENABLE]

aobscanmodule( HEALTH, Calculator.exe, 0F2F8100010000 )
registersymbol( HEALTH )
label( HEALTH_orig )
registersymbol( HEALTH_orig )
label( back )
alloc( Hook, 0x1000, Calculator.exe )
label( code )
label( Enemy )
label( Player )
label( En_Phealth )
registersymbol( En_Phealth )
label( En_Ehit )
registersymbol( En_Ehit )

Hook:
cmp dword ptr [En_Phealth],1
je Player

cmp dword ptr [En_Ehit],1
je Enemy

Player:
cmp [ecx+2AC],0
je Enemy
  fild dword ptr [ecx+1DC]
  fstp dword ptr [ecx+100]

code:
  comiss xmm0,[ecx+100]
  jmp back

Enemy:
mov [ecx+100],(float)1
jmp code

En_Phealth:
dd 0
En_Ehit:
dd 0

HEALTH:
HEALTH_orig:
jmp Hook
db 90 90
back:

[DISABLE]

HEALTH_orig:
db 0F 2F 81 00 01 00 00

unregistersymbol( En_Ehit )
unregistersymbol( En_Phealth )
dealloc( Hook )
unregistersymbol( HEALTH_orig )
unregistersymbol( HEALTH )
What's the problem now?.. Change 'Calculator.exe' to 'DarksidersPC.exe' and test.
 
Joined
Mar 5, 2017
Messages
29
Likes
1
Points
1
#30
for writing teleport script usually use from empty 32-bit registers and XMM registers.
for example eax = 00000000 and use in push eax ,...
now if eax,... and XMM registers not equal with 0 how to write teleport.
example:
Code:
00727365 - 57 - push edi
00727366 - 8B F9  - mov edi,ecx
00727368 - D9 5F 60  - fstp dword ptr [edi+60] <<
0072736B - D9 40 04  - fld dword ptr [eax+04]
0072736E - D9 5F 64  - fstp dword ptr [edi+64]

EAX=08CD0230
EBX=21FC2C80
ECX=05C4AA08
EDX=00D69D14
ESI=05C4AA08
EDI=05C4AA08
ESP=0012FA38
EBP=0012FA80
EIP=0072736B
teleport assembly script:
Code:
[ENABLE]
alloc(teleportmem,2048)
registersymbol(s_enable)
registersymbol(l_enable)
registersymbol(u_enable)
label(returnteleport)
label(originalcodeteleport)
label(exitteleport)
label(z_coord)
label(x_coord)
label(y_coord)
label(z_coord_undo)
label(x_coord_undo)
label(y_coord_undo)
label(save_coord)
label(load_coord)
label(undo_coord)
label(s_enable)
label(l_enable)
label(u_enable)

"DarksidersPC.exe"+327368:
jmp teleportmem
nop
returnteleport:

teleportmem:
cmp [s_enable],1
je save_coord

cmp [l_enable],1
je load_coord

cmp [u_enable],1
je undo_coord

jmp originalcodeteleport

save_coord:
mov [s_enable],0
fld dword [edi+60]
fstp dword [x_coord]
fld dword [edi+64]
fstp dword [z_coord]
fld dword [edi+68]
fstp dword [y_coord]
jmp originalcodeteleport

load_coord:
mov [l_enable],0
cmp [z_coord],0
je originalcodeteleport
// Save actual Position (for UNDO TELEPORT) when press LOAD POSiTiON
fld dword [edi+60]
fstp dword [x_coord_undo]
fld dword [edi+64]
fstp dword [z_coord_undo]
fld dword [edi+68]
fstp dword [y_coord_undo]
// Save actual Position (for UNDO TELEPORT) when press LOAD POSiTiON
fld dword [x_coord]
fstp dword [edi+60]
fld dword [z_coord]
fstp dword [edi+64]
fld dword [y_coord]
fstp dword [edi+68]
jmp originalcodeteleport

undo_coord:
mov [l_enable],0
mov [s_enable],0
mov [u_enable],0
cmp [z_coord_undo],0
je originalcodeteleport
fld dword [x_coord_undo]
fstp dword [edi+60]
fld dword [z_coord_undo]
fstp dword [edi+64]
fld dword [y_coord_undo]
fstp dword [edi+68]

originalcodeteleport:
fstp dword ptr [edi+60]
fld dword ptr [eax+04]

exitteleport:
jmp returnteleport


x_coord:
dd 0
z_coord:
dd 0
y_coord:
dd 0
s_enable:
dd 0
l_enable:
dd 0
x_coord_undo:
dd 0
z_coord_undo:
dd 0
y_coord_undo:
dd 0
u_enable:
dd 0
//>>>--Teleport--//


 
[DISABLE]
dealloc(teleportmem)
dealloc(newmem)
Unregistersymbol(s_enable)
Unregistersymbol(l_enable)
Unregistersymbol(u_enable)
"DarksidersPC.exe"+327368:
fstp dword ptr [edi+60]
fld dword ptr [eax+04]
//Alt: db D9 5F 60 D9 40 04
 

SunBeam

RCE Fanatics
Talents
Fearless Donors
Joined
Feb 4, 2018
Messages
743
Likes
401
Points
63
#31
Read about this one: https://c9x.me/x86/html/file_module_x86_id_208.html">https://c9x.me/x86/html/file_module_x86_id_208.html.

You can do something like this in two instructions:

store:
movups xmm0,[r32+offset]
movups [store],xmm0

restore:
movups xmm0,[store]
movups [r32+offset],xmm0

Why movups and not movaps? Simple. You're required to have the stack 16-bytes aligned stack if you want to use the "a" version. (a = aligned; u = unaligned). Also, keep in mind movups will move 16 bytes (4 DWORDs). XYZ occupy 3 DWORDs, but then again you don't care about the 4th (it's usually a normalizer).

BR,
Sun
 

gir489

RCE Fanatics
Talents
Joined
May 8, 2017
Messages
202
Likes
19
Points
18
#32
TheyCallMeTim13 post_id=31612 time=1517892812 user_id=91 said:
gir489 post_id=31482 time=1517781712 user_id=3979 said:
You don't. That's just the way it is.
So to me tribalism just seems like a step in the wrong direction. You still just end up with same kind of problems. I mean, I get that when some church or what not is built you get an Irish or what ever neighborhood; but must we really continue to divide based on what ever trivial thing we place importance on at that point in history?
Again, going back to the book Beyond Good and Evil, any animal wants to feel superior to another. Asking humans to do otherwise is to deny what we are, which is just animals. Thinking that we can move past this and have a wholesome society of everyone loves each other is just nonsense. You're saying a step in the wrong direction like we fucking chose this. It was chosen for us, we just have to deal with the cards we were dealt. I have no idea what you're talking about, but that sounds like segregation. That's not the same as tribalism. You will always resort to a them vs us debate, it's inevitable. It has to, because that's the inherent binary nature of our universe. For one thing to exist, another anti version of it must exist.

"At the end of the day, as long as there's two people left on the planet, someone is gonna want someone dead."
 

STN

Pleb
Staff member
Administrator
Joined
Mar 2, 2017
Messages
3,154
Likes
192
Points
63
#33
gir489 post_id=31167 time=1517510778 user_id=3979 said:
Ask me anything.
Do you have a girlfriend?
ETH or BTC or STNCoin?
Do you do drugs?
Why are you so mean to (some) people?

You said ask anything :p
 

gir489

RCE Fanatics
Talents
Joined
May 8, 2017
Messages
202
Likes
19
Points
18
#35
STN post_id=31655 time=1517930773 user_id=48 said:
Do you have a girlfriend?
ETH or BTC or STNCoin?
Do you do drugs?
Why are you so mean to (some) people?

You said ask anything :p
Yes.
Ethereum all the fucking way to the MOON! Not only is it better than any other coin, it has a Turing-complete system. You could write any program and run it on the block chain. How fucking crazy is that?!
I used to smoke weed, but not anymore. Maybe I will again once it becomes legal.
It's my way of expressing disdain for that person.

Great questions.

Lightningreed post_id=31658 time=1517931169 user_id=7172 said:
How to export an art from Adobe Illustrator without Base64 <(")
You could use SVG, if you hate Base64 for some reason.
 
Joined
Jul 14, 2017
Messages
6
Likes
3
Points
3
#36
gir489 post_id=31659 time=1517931241 user_id=3979 said:
STN post_id=31655 time=1517930773 user_id=48 said:
Do you have a girlfriend?
ETH or BTC or STNCoin?
Do you do drugs?
Why are you so mean to (some) people?

You said ask anything :p
Yes.
Ethereum all the fucking way to the MOON! Not only is it better than any other coin, it has a Turing-complete system. You could write any program and run it on the block chain. How fucking crazy is that?!
I used to smoke weed, but not anymore. Maybe I will again once it becomes legal.
It's my way of expressing disdain for that person.

Great questions.

Lightningreed post_id=31658 time=1517931169 user_id=7172 said:
How to export an art from Adobe Illustrator without Base64 <(")
You could use SVG, if you hate Base64 for some reason.
I am already using SVG but the tool is exporting base64 on blurred objects
 

gir489

RCE Fanatics
Talents
Joined
May 8, 2017
Messages
202
Likes
19
Points
18
#37
I can't say for sure unless I look at the individual work you're trying to do. But it sounds like a masking problem that's confusing the exporter.
 

TheyCallMeTim13

Wiki Monster
Talents
Fearless Donors
Joined
Mar 3, 2017
Messages
509
Likes
117
Points
43
#38
gir489 post_id=31651 time=1517927333 user_id=3979 said:
...Again, going back to the book Beyond Good and Evil, any animal wants to feel superior to another. Asking humans to do otherwise is to deny what we are, which is just animals...
Yes, but chimps sit around and throw shit at each other, and this sounds like it would suck.
EDIT:
And by this I just mean, yeah lets not forget what we are, but I don't wish to be the same person I was before learning and growing.

gir489 post_id=31651 time=1517927333 user_id=3979 said:
...Thinking that we can move past this and have a wholesome society of everyone loves each other is just nonsense...
Yeah I totally agree.

gir489 post_id=31651 time=1517927333 user_id=3979 said:
...You're saying a step in the wrong direction like we fucking chose this. It was chosen for us, we just have to deal with the cards we were dealt...
I just meant moving forward more or less, The law of entropy and what not so there is no going back, but perhaps I have placed my own bias view on the concept of tribalism.

gir489 post_id=31651 time=1517927333 user_id=3979 said:
...I have no idea what you're talking about, but that sounds like segregation. That's not the same as tribalism...
Again perhaps I have placed my own bias view on the concept of tribalism, but it seems like that's where it tends to go in the conversations I have had in the past with others. That's why I was a little surprised to see you talking about it, after reading so many of your posts it just didn't seem to fit to me. But I really can't say I know a whole lot about tribalism either, more just what people who say they follow or are proponents of tribalism tell me. I just tend to ask questions to find out.

gir489 post_id=31651 time=1517927333 user_id=3979 said:
...You will always resort to a them vs us debate, it's inevitable. It has to, because that's the inherent binary nature of our universe. For one thing to exist, another anti version of it must exist...
Yeah, perhaps this is where the aforementioned bias views stem from.

gir489 post_id=31651 time=1517927333 user_id=3979 said:
..."At the end of the day, as long as there's two people left on the planet, someone is gonna want someone dead."...
Yeah that sounds about right, unless they're attracted to each other then they will probable want to try some thing else first, then murder each other latter.
 

gir489

RCE Fanatics
Talents
Joined
May 8, 2017
Messages
202
Likes
19
Points
18
#39
TheyCallMeTim13 post_id=31706 time=1517961120 user_id=91 said:
Yes, but chimps sit around and throw shit at each other, and this sounds like it would suck.
I highly suggest you watch the Twilight Zone episode "Walking Distance." It demonstrates the constant inner struggle of humanity to be something we're not. Even being conscience of this, we still fall in to the trap of GIAG syndrome. We're doomed to repeat it. We always want more, never content with what we have. This sense of need for greater purpose is what's killing us as a society.

If throwing shit is what we're good at, I don't see why that's a problem. Then throwing shit is our purpose. I'd have it no other way.
 

TheyCallMeTim13

Wiki Monster
Talents
Fearless Donors
Joined
Mar 3, 2017
Messages
509
Likes
117
Points
43
#40
gir489 post_id=31752 time=1518012810 user_id=3979 said:
TheyCallMeTim13 post_id=31706 time=1517961120 user_id=91 said:
Yes, but chimps sit around and throw shit at each other, and this sounds like it would suck.
I highly suggest you watch the Twilight Zone episode "Walking Distance." It demonstrates the constant inner struggle of humanity to be something we're not. Even being conscience of this, we still fall in to the trap of GIAG syndrome. We're doomed to repeat it. We always want more, never content with what we have. This sense of need for greater purpose is what's killing us as a society.

If throwing shit is what we're good at, I don't see why that's a problem. Then throwing shit is our purpose. I'd have it no other way.
I'm pretty sure that the episode was about growing up, not living in the past and missing what's here and now kinda thing. The monologue near the end from the Dad character kinda says this exactly, but it's art so what you take from it will tend to be subjective.

But what you're saying is if I want to do some thing or I'm "good" at it (not really sure how to measure that, being it's so subjective), then I should just do it to my hearts content even if it conflicts with others and their wishes or needs? So if I'm a good hit man then I should just kill because I'm "good" at it? And your use of "purpose" in your last statement seems to imply that you think you have some higher purpose other than just being some random animal?

EDIT:
Thinking more about the word "good", I fined it funny that this seems it could be some thing people made up, very likely while trying to better them selves.
 

Top Bottom