[QUESTION] - exe edits

10/05/2012 09:16 ihatehacks#1
I dont really know anything about editing the exe but,

Im curious if adding (below code) to server & respective code to client is just to make the character able to fish? Or is it actually adding the class itself (like if i was to copy this for the 4 new classes would it just be for fishing or would it allow me to load/play the new chars)?

Code:
00A93026   68 5530A900      PUSH 00A93055                   ; ASCII "ALLOKEN"
00A9302B   8D4C24 08        LEA ECX,DWORD PTR SS:[ESP+8]
00A9302F   E8 ECE996FF      CALL 00401A20
00A93034   50               PUSH EAX
00A93035   8BCE             MOV ECX,ESI
00A93037   E8 24EB96FF      CALL 00401B60
00A9303C   84C0             TEST AL,AL
00A9303E   74 0C            JE SHORT 00A9304C
00A93040   B0 06            MOV AL,6
00A93042   5E               POP ESI
00A93043   81C4 00010000    ADD ESP,100
00A93049   C2 0400          RETN 4
00A9304C  -E9 2A279EFF      JMP 0047577B
00A93051   0000             ADD BYTE PTR DS:[EAX],AL
00A93053   0000             ADD BYTE PTR DS:[EAX],AL
00A93055   41               INC ECX
00A93056   4C               DEC ESP
00A93057   4C               DEC ESP
00A93058   4F               DEC EDI
00A93059   4B               DEC EBX
00A9305A   45               INC EBP
00A9305B   4E               DEC ESI
And just an extra question since i cant compare the last 7 lines to anything, what do they mean? (INC ECX -> DEC ESI)
10/05/2012 09:57 conquer93#2
Thers a tut onbhow to make aloken fish ..
10/05/2012 10:40 ihatehacks#3
Quote:
Originally Posted by conquer93 View Post
Thers a tut onbhow to make aloken fish ..
Yea i know, the fishing part isnt quite what im looking for though.
10/05/2012 12:09 Cataracts#4
Quote:
Originally Posted by ihatehacks View Post
I dont really know anything about editing the exe but,

Im curious if adding (below code) to server & respective code to client is just to make the character able to fish? Or is it actually adding the class itself (like if i was to copy this for the 4 new classes would it just be for fishing or would it allow me to load/play the new chars)?

Code:
00A93026   68 5530A900      PUSH 00A93055                   ; ASCII "ALLOKEN"
00A9302B   8D4C24 08        LEA ECX,DWORD PTR SS:[ESP+8]
00A9302F   E8 ECE996FF      CALL 00401A20
00A93034   50               PUSH EAX
00A93035   8BCE             MOV ECX,ESI
00A93037   E8 24EB96FF      CALL 00401B60
00A9303C   84C0             TEST AL,AL
00A9303E   74 0C            JE SHORT 00A9304C
00A93040   B0 06            MOV AL,6
00A93042   5E               POP ESI
00A93043   81C4 00010000    ADD ESP,100
00A93049   C2 0400          RETN 4
00A9304C  -E9 2A279EFF      JMP 0047577B
00A93051   0000             ADD BYTE PTR DS:[EAX],AL
00A93053   0000             ADD BYTE PTR DS:[EAX],AL
00A93055   41               INC ECX
00A93056   4C               DEC ESP
00A93057   4C               DEC ESP
00A93058   4F               DEC EDI
00A93059   4B               DEC EBX
00A9305A   45               INC EBP
00A9305B   4E               DEC ESI
And just an extra question since i cant compare the last 7 lines to anything, what do they mean? (INC ECX -> DEC ESI)
You'll need a-lot more than one piece of code to make the characters anywhere near playable.
10/05/2012 12:56 HellSpider#5
Quote:
Originally Posted by ihatehacks View Post
And just an extra question since i cant compare the last 7 lines to anything, what do they mean? (INC ECX -> DEC ESI)
Note the address of the "ALLOKEN" string.

OllyDbg just interprets the bytes as code, but they are actually data.

41 = A
4C = L
4C = L
4F = O
4B = K
45 = E
4E = N
10/05/2012 15:01 Ultimo ☼#6
Quote:
Originally Posted by HellSpider View Post
Note the address of the "ALLOKEN" string.

OllyDbg just interprets the bytes as code, but they are actually data.

4A = A
4C = L
4C = L
4F = O
4B = K
45 = E
4E = N
Its 41 in ihatehacks's code o.O
10/05/2012 18:07 ihatehacks#7
Quote:
Originally Posted by HellSpider View Post
Note the address of the "ALLOKEN" string.

OllyDbg just interprets the bytes as code, but they are actually data.

4A = A
4C = L
4C = L
4F = O
4B = K
45 = E
4E = N
Kinda made sense, was wondering why it pushed to there.

Im using horrible terminology atm but,

Do we specify the string ALLOKEN as bytes due to the fact that it isnt coded into the exe from the start?

If i was to follow the PUSH call from 1 of the 6 original classes it has a string ASCII "CLASS_NAME_HERE" where a "command mnemonic" goes.

[Only registered and activated users can see links. Click Here To Register...]



And if i was to add fishing to lets say "HALFBAG" instead of aloken I would PUSH to bytes (see below) right?
Code:
00A93055   48               "w.e command makes 48"
00A93056   41               INC ECX
00A93057   4C               DEC ESP
00A93058   46               "w.e command makes 46"
00A93059   42               "w.e command makes 42"
00A9305A   41               INC ECX
00A9305B   47               "w.e command makes 47"
EDIT: from looking into it some, all the new classes have a push to a set of bytes for the class name.
10/05/2012 20:18 conquer93#8
if u might not kno this searching thing.. this way easy search ^^
just ctrl +F in the box that opens search like btn_tab for dshop tabs then press enter or double click it and it will jumps to that code D:
[Only registered and activated users can see links. Click Here To Register...]
10/05/2012 20:43 ihatehacks#9
Quote:
Originally Posted by conquer93 View Post
if u might not kno this searching thing.. this way easy search ^^
just ctrl +F in the box that opens search like btn_tab for dshop tabs then press enter or double click it and it will jumps to that code D:
[Only registered and activated users can see links. Click Here To Register...]
I know how to search by that method, but I fail to see how this answers my question above.


Unanswered questions:
- Why do we really call "push ___(address to byte set)___"? Is it because the classes werent originally part of the exe, thus making us have to create their ascii sections? (horrible terminology)


New Question:
- When adding fishing to each class the line "MOV AL,06" for aloken would be changed to "MOV AL,08" If we were talking about riper? More specifically im trying to ask if the byte identifier after "AL," is the class type number?
10/05/2012 22:01 HellSpider#10
Quote:
Originally Posted by Ultimo ☼ View Post
Its 41 in ihatehacks's code o.O
Obviously my typo.

Quote:
Originally Posted by ihatehacks View Post
I know how to search by that method, but I fail to see how this answers my question above.


Unanswered questions:
- Why do we really call "push ___(address to byte set)___"? Is it because the classes werent originally part of the exe, thus making us have to create their ascii sections? (horrible terminology)


New Question:
- When adding fishing to each class the line "MOV AL,06" for aloken would be changed to "MOV AL,08" If we were talking about riper? More specifically im trying to ask if the byte identifier after "AL," is the class type number?
You're pushing the address of the string. Everything in the executable consists of just bytes. The bytes can be treated as data or instruction opcodes. Even though Olly might show the bytes as instructions it doesn't mean they get executed, it's just because data should not exist in the first PE section which is only for code.

The procedures return values in EAX register. In this case the return value is a BYTE so only AL is used. The procedure parses a string and returns the PCClass value that corresponds to the string.
10/06/2012 00:36 Decima#11
let me dumb it down a bit

the 'strings' he is refering to, is nothing more then text in the exe, that address just points to the address that the text its self starts at, so the string 'ALLOKEN' starts at the address that is being pushed, its nothing more then text, doesnt do anything special for anything else, it looks for the text that is supplied by the CSV file, if its there, it executes that procedure, if it doesnt exsist, then the procudure ends and the server errors.
10/06/2012 06:10 ihatehacks#12
Quote:
Originally Posted by HellSpider View Post
You're pushing the address of the string. Everything in the executable consists of just bytes. The bytes can be treated as data or instruction opcodes. Even though Olly might show the bytes as instructions it doesn't mean they get executed, it's just because data should not exist in the first PE section which is only for code.

The procedures return values in EAX register. In this case the return value is a BYTE so only AL is used. The procedure parses a string and returns the PCClass value that corresponds to the string.
Big tnx, not that truly understanding what im doing is important if it works but id rather understand what im looking at and this was very informative :)









Next question:
- When adding the entire class you add just these things in db?
-- WEAPON STYLE
-- PCCLASS IDENTIFIER
-- FISHING
-- Mesh/tpack
-- Class icon for hp bar
-- add extension to parties so parties dont crash

Is that it exe wise? or am i missing something/adding something that isnt exe related to the list.
10/06/2012 08:33 HellSpider#13
Quote:
Originally Posted by ihatehacks View Post
Next question:
- When adding the entire class you add just these things in db?
-- WEAPON STYLE
-- PCCLASS IDENTIFIER
-- FISHING
-- Mesh/tpack
-- Class icon for hp bar
-- add extension to parties so parties dont crash

Is that it exe wise? or am i missing something/adding something that isnt exe related to the list.
DB:

Default character
SP_CHAR_CREATE

EXE:

Skill class parse
Skill weapon parse
Itemupgrade
Itemsocket
Default Mesh/Tpack
Fishing
Weapon style
Party classicon

I probably forgot quite a lot of things but those are at least good to have.
10/06/2012 08:35 kokamentos#14
Quote:
Originally Posted by HellSpider View Post
DB:

Default character
SP_CHAR_CREATE

EXE:

Skill class parse
Skill weapon parse
Itemupgrade
Itemsocket
Default Mesh/Tpack
Fishing
Weapon style
Party classicon

I probably forgot quite a lot of things but those are at least good to have.
And Costume for new class:D
10/06/2012 14:04 Cataracts#15
Quote:
Originally Posted by kokamentos View Post
And Costume for new class:D
Things you NEED. Costumes are not needed to
Make a class work.