24h購物| | PChome| 登入
2011-06-02 12:11:10| 人氣7,383| 回應2 | 上一篇 | 下一篇

RO自動芋的算出~舊文章參考看看吧~

推薦 0 收藏 0 轉貼0 訂閱站台

聲明 :以下為轉貼文章

本人沒嘗試過..


來源網站:

http://page.freett.com/shaula/download/rohp.htm

1.抓檔案先

 

2.主程式:C_Rohp.zip

解到桌面上,這是主程式

 

3.工具軟體:Hashed Potato.lzh

(請用WINRAR解壓...)

md5 還有 crc32 每個人的值不一樣所以得自己抓

 

然後因為是日文碼,怕有人看不到(看不懂)所以:

http://ms4.pccu.edu.tw/~s9120640/snap036.jpg

                                                                             

點選"參照" 選取你的Ragexe.exe

然後選單部分請拉到最下面最下面,選取CRC-32

按下計算,算完之後看你的16進位值

打開ROHP內附的roaddr.ini

                                                                              

[Ragexe]

Size=2596959

Crc32=8E92C910----------->crc32的值,看程式算出來的值 16近位大小寫沒差

Md5=A44AE8598BB6F88D72C0E9ECCC35FE6E------>這也要改選項Message Digest 5

 

把此roaddr.ini複製到ro目錄下面

 

4.打開ROHP內附的rohp.ini 修改以下兩各紅色部分

[RoAddr]

;        RoAddr.dll 的所在資料夾

;       設定好的化程式會自動尋找資料夾

;       路徑的最後請加上一個 \

Path=F:\Gravity\RO\

;       測試版dll的使用許可

;       0      詢問我

;       1      直接使用

UseTestVer=1

 

5.roaddr資料

  整個解到ro下面

之後執行rohp.exe在開遊戲(視窗模式)打怪應該就可顯示血量了.


http://rocrazy.tripod.com/doc/autoimoaddr.htm

自動芋のアドレスの算出

最新パッチに即座に対応するために自力のRagaddress.ini更新方法。
なんかうまくいったっぽいんで忘れないためにその流れをメモ。

○逆アセンブラ兼デバッガ
OllyDbg
http://home.t-online.de/home/Ollydbg/
OllyDbgの日本語解説と日本語化パッチ
http://gamereverserz.cjb.net/

まず最初にOllyDbgというソフトで逆アセンブルします。
このソフトは解析界では有名らしいです。

最初にこれからやろうとする流れをまとめると
Ragaddress.iniにあるWeight=の部分に入れるアドレスを知りたいとする。
そこでWeightの格納されてるアドレスを割り出したい。
ゲームを思い出すと、”Weight 1123/4010”のように表示されてたので、
1123の格納されてるアドレスを割り出したいのでまずいっしょに出力されるWeightという文字を検索する。

まず、RagnarokのインストールされてるフォルダにあるRagexe.exeをOllyで開く

http://photo.pchome.com.tw/s13/t/t/ttry420/book7/p130698636351s.jpg


画面が4分割されてます。
これがソフト全体を解析した結果です。

まず、このソフトにある全ての"文字列"というものを引っ張り出してからその中からWeightを検索します。
で、右上の部分で右クリック->Search for->All referenced text stringsを選択。

http://photo.pchome.com.tw/s13/t/t/ttry420/book7/p130698642388s.jpg


んでこういう画面。



新しくでたWindowのなかにある文字列を検索したいと思います。
今回はWeightを検索します。



一番上から検索したいのでバーを上まで持っていって一番上の行を選択し
右クリック->Search for textを選択





Weightの検索ですので、新しく出たWindowにそれを入力します。


こういう行が見つかりました。近くにLvやらHPもありますね。



0044BDB5 | PUSH Ragexe.0054F7BC         | ASCII "Weight : %3d / %3d"
  ↑          ↑                       ↑
メモリアドレス  0054F7BCにあるものをStackに入れろ 0054FCBCにある文字列

おそらくこういう意味だと思います。

次に実際に逆アセンブルした流れをたどっていって
ASCII "Weight : %3d / %3d"の%3dの部分に格納されるアドレスを
探っていきたいと思います。
今いるWindowは全体の中から文字列のみを引き出したWindowです。
はじめに表示されたものが全体を表示したものなのでそのWindowにもどります。
やりたいことは全体の流れの中で0044BDB5にあるアドレス付近の処理を見たいのです。
まず、全体の流れの方のWindowで0044BDB5の位置に移動したいと思います。

さっきの行の上にカーソルを持っていって右クリック->copy to clipboard->addressとします。



全体Windowに戻ってそのアドレスのところに移動したいと思います。
左上の部分で右クリック->Go to->Expressionとして出てきた枠にクリップボードにコピーしたアドレスを入れる。


OKを押すとその位置に移動すると思います。




今の行より少し上の部分の処理がみたいので少し上に移動します。
検索したアドレスにある少し上の部分を抜き出すと

0044BD9B . 8B0D 844B5A00 |MOV ECX,DWORD PTR DS:[5A4B84]
0044BDA1 . 83F9 01       |CMP ECX,1
0044BDA4 . 8BD9        |MOV EBX,ECX
0044BDA6 . 7F 05        |JG SHORT Ragexe.0044BDAD
0044BDA8 . BB 01000000   |MOV EBX,1
0044BDAD > 8B3D 884B5A00|MOV EDI,DWORD PTR DS:[5A4B88]
0044BDB3 . 51          |PUSH ECX
0044BDB4 . 57          |PUSH EDI
0044BDB5 . 68 BCF75400   |PUSH Ragexe.0054F7BC           |ASCII "Weight : %3d / %3d"

どうやら下から4行目のMOV EDI,DWORD PTR DS:[5A4B88] の 5A4B88 が自動芋のWeightに入れる部分のようです。現在の重量
sprintf(buf, "Weight : %3d / %3d", EDI, ECX); を展開すればこうなるようです。
とりあえずこの数字を自動芋の設定ファイルに書いとけば動きます。
こんな風にして他のアドレスも求まるようです。
HPとSPは少しめんどくさいけどよく読めば分かります。
サンプルプログラムを作りましたのでそのソースの一部→


RO....INI網址

RoAddr.ini - Upload & Maker

http://zerodrive.dip.jp/ragnarok/RoAddr/


英文版的

http://www.angelfire.com/rpg2/teartyphoon/rofiles/RoAddr_Guide.html

Every RoAddr.ini is different for each rag/sakexe.  In order to create your own RoAddr.ini, you'll need some tools.  Perfered tools would be a PE Explorer, a hex editor (just in case you need it :P), and a source RoAddr.ini as well as the ragexe it is for.  For this tutorial we will use an RoAddr.ini for kRO 525b which was done by magusro.

 

[ini]
Ver=20040525
MakerVer=525
LangType=0
Sakray=1
http=
URL=
AutoURL=
Auto=0

[sPatch]
Number=544

[RoName]
WindowCaption=Ragnarok
WindowClass=Ragnarok

[Sakexe]
Size=2379861
CRC32=237A3D14
MD5=9A0554CE3AD5125AE77D0DBC950F7EA4

[SakAddress]
MapName=0x00685FE8
MapNameRsw=0x006818E8
CharName=0x00687400
AID=0x006867AC
ZoneBIPAddress=0x00644AE0
WS2_32Recv=0x00644938
Packetlength=0x00644B50
ZoneIPAddress=0x00684698
BaseAddress=0x00685B40
MaxHPIndex=0x00687204
MaxHPTable=0x0068720C
HPIndex=0x006871F8
HPTable=0x0068726C
MaxSPIndex=0x00687208
MaxSPTable=0x0068723C
SPIndex=0x006871FC
SPTable=0x0068729C
BaseLv=0x006867C4
JobLv=0x006867D0
Weight=0x00686870
WeightMax=0x00686878
Zeny=0x00686860
BaseExp=0x006867C0
BaseExpNext=0x006867CC
EffectState=0x006860FC
JobClass=0x006867BC
CartWeightMax=0x00686118
CartWeight=0x00686114
CartNumMax=0x00686110
CartNum=0x0068610C
JobExp=0x0068686C
JobExpNext=0x0068687C
BGMVolume=0x00686128
SCPage=0x00685D20
SNBase=0x00685D28
SLBase=0x00685ED4
EmotionTable=0x00686294
CharIPAddress=0x00684680
PetModified=0x006862A0
PetFullness=0x006862D4
PetRelation=0x006862D8
PetSpriteType=0x006862CC
PetID=0x006862A4
PetName=0x006862A8
PetAccessory=0x006862C8
PetLv=0x006862D0

To the left is the RoAddr file in question (minus the CharServer section).

 

Now, open up PE Explorer (or whatever disassembler you are using) and lets dig into it.  Open your kRO 525b EXE in PE Explorer, then start the disassembler with default options.  Make sure you open the kRO from a suitable RO directory so it has all the DLLs it needs.  You'll be faced with a blue interface with a whole bunch of text, numbers, and hacker type stuff.  It'll open at the function call EntryPoint.  Now open another instance of PE Explorer and open the ragexe you would like to create an RoAddr.ini for and start the dissasembler there too.  In your kRO disassembler, scroll up to the top and click on the first line, and we'll search for out first value.  We'll do the WS2_32Recv entery first, as its also the easiest.

 

Okay, as we can see, WS2_32Recv is at memory address 0x00644938.  Click search menu, then find, then paste in 644938.  You should be taken to a section of code, and if you scroll up, lo, and behold, you'll see a reference to WS32.dll.

 

 

 

0041815E E883BC1B00
00418163 83F8FF
00418166 7435
00418168 85C0
0041816A 7E31
0041816C 8B4E04
0041816F 6A00
00418171 8D85F4F6FFFF
00418177 6800080000
0041817C 50
0041817D 51
0041817E FF1538496400
00418184 83F8FF
00418187 741B
00418189 85C0
0041818B 7E2A
0041818D 8D95F4F6FFFF
00418193 8D4E3C
00418196 52
00418197 50
00418198 E883650000
call
cmp
jz
test
jle
mov
push
lea
push
push
push
call
cmp
jz
test
jle
lea
lea
push
push
call
jmp_WS2_32.dll!WS2_32.18
eax,FFFFFFFFh
L0041819D
eax,eax
L0041819D
ecx,[esi+04h]
00000000h
eax,[ebp-0000090Ch]
00000800h
eax
ecx
[L00644938]
eax,FFFFFFFFh
L004181A4
eax,eax
L004181B7
edx,[ebp-0000090Ch]
ecx,[esi+3Ch]
edx
eax
SUB_L0041E720

 

Now, you need to find a similar section of code in your target ragexe.  My advice, search for the string "jmp_WS2_32.dll!WS2_32.18" in the other dissasembler window you have open.  Continue until you see a section of code that looks very similar as the above.  It won't be exactly the same, but the overal structure will be the same.  The red address is the address for WS2_32Recv, and stick that in it's own entry in your new RoAddr.ini.  Now just do this 20-some more times for each memory address and you'll be ready to go.  Each time you will look for some unique string to search by.  In this case, it was "jmp_WS2_32.dll!WS2_32.18", but it could also be something like "edx,[ebp-0000090Ch]".

A few extra words.  The HP tables and the SP tables use very similar code.  Be careful that you don't mix the two up.  It may take a couple of tries to get it right.  Also, some memory addresses aren't referenced in the disassembly:

SLBase
SNBase
ZoneBIPAddress
Packetlength

You'll have to either set all these to 0x00000000, or extrapilate the values.  If you know assembly, you can probably dig them out, as these addresses may be dynamically allocated or mabey even volatile.  If anyone knows how to find these addresses, clue me in so I can make complete RoAddr.inis.

Thats the end of this guide.  I would go further into it, but this gives you the basics, and if you still don't get it, then you probably shouldn't be trying this anyways.  For those of you who do understand, its be fairly simple, just time consuming.  Take your time and you'll have a nicely done RoAddr.ini to use with Meron, or any other programs that use it.

ShiftFox

台長: 親愛的用戶
人氣(7,383) | 回應(2)| 推薦 (0)| 收藏 (0)| 轉寄
全站分類: 不分類

RO
載點都死了
無法下載

希望能補載點
2011-12-16 09:11:30
威爾剛
很讚的分享~~!


http://www.yyj.tw/
2020-01-10 02:20:58
是 (若未登入"個人新聞台帳號"則看不到回覆唷!)
* 請輸入識別碼:
請輸入圖片中算式的結果(可能為0) 
(有*為必填)
TOP
詳全文