Log in

View Full Version : BackstabFix


Drag
04.03.2008, 21:54
asm, katek... resp xD

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

roxaz
04.03.2008, 21:54
funny thing.. kation tells me all the time that coding in c++ is better than coding in asm, and here we go - he posts asm code ^^

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

Kation
04.03.2008, 21:54
Yes, most of my extender is written in c++ got 2 or 3 hooks in asm, but there are some things that cant be done via c++ or are much better/easier in asm (example if you need to get something from xmm2 etc), i cant see where's the point in forcing extender to be c++ only. For most cases for me coding in c++ is just faster and sometimes safer than doing that in asm.


p.s GotDamageBy is not getting only 2 parameters(pCreature/pEnemy) ;P.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

Morte
04.03.2008, 21:54
Quote:


Originally Posted by Kation
View Post (https://postpacific.mmorpg-game.online/showpost.php?p=1002964)

p.s GotDamageBy is not getting only 2 parameters(pCreature/pEnemy) ;P.

am yes.. it also gets' an int and a bool in the end... wtf are they? )

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

humordwarf
04.03.2008, 21:54
Code:

double Creature::GotDamageBy(CCreature* creature, CCreature* attacker, double damage, int dmgType, bool dmgFlag);

and what?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

Ascian
04.03.2008, 21:54
CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

mov ebx, r9d
movsd xmm6, xmm2
mov rsi, rdx
mov rbp, rcx

EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

humordwarf
04.03.2008, 21:54
Quote:


Originally Posted by Ascian
View Post (https://postpacific.mmorpg-game.online/showpost.php?p=1002967)

CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

mov ebx, r9d
movsd xmm6, xmm2
mov rsi, rdx
mov rbp, rcx

EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

(screams like that master yoda) use the force, my young jedi... look for 5th parameter on the stack and let the force be with you...

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

Morte
04.03.2008, 21:54
Quote:


Originally Posted by Ascian
View Post (https://postpacific.mmorpg-game.online/showpost.php?p=1002967)

CCreature::GotDamageBy only has 4 arguments not 5. Where'd you get the 5th?

Code:

mov ebx, r9d
movsd xmm6, xmm2
mov rsi, rdx
mov rbp, rcx

EDIT: Nevermind, you just have an extra CCreature where there shouldn't be Wink

Code:

.text:00000000007AF6B8 mov byte ptr [rsp+20h], 1 ;unk2
.text:00000000007AF6BD mov r9d, 1 ;unk1
.text:00000000007AF6C3 movsd xmm2, dDamage
.text:00000000007AF6C7 mov rdx, pSource
.text:00000000007AF6CA mov rcx, pTarget
.text:00000000007AF6CD mov rax, [rax+5F8h]
.text:00000000007AF6D4 call rax

5 parameters ) yet as far as i understood, none of them controls whether damage is done to HP or CP. all this stuff is checked later in GotDamageBy @514DB6

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (2 Weeks Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

songaiyun
15.03.2008, 21:54
nice share,but why c++ much harder?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (3 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).

testdude
15.03.2008, 21:54
Quote:


Originally Posted by songaiyun
View Post (https://postpacific.mmorpg-game.online/showpost.php?p=1002970)

nice share,but why c++ much harder?

well what if u need something from a register that isnt an argument register or on the stack? u cant get it with C++... with 32bit you could use inline asm and get it but not with 64bit...


example

http://www.postpacific.com/forums/sh...ad.php?t=10239 (https://postpacific.mmorpg-game.online/showthread.php?t=10239)


now you could do some of that code with C++...


void AVE_Hook(int idontcare, wchar_t *wcSkillBuffer)

{

if (!wcscmp(wcSkillBuffer, L"ave_stealth"))

{

// now what?

}

}


but now what do u do? u cant get rbp (CSkillInfo pointer) so u cant set the abnormal ID


for fixing packets and making it so u can connect the new chronicle clients u can easily do most of it with just C++, but for adding the new stuff that is needed to make a real extender... u NEED asm...

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (3 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235438id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124809).