现在我自己写的汇编自己都看不懂
从addkdef的定义来看游泳的鱼是曾经定出了一套标准的,但是现在很多修改方案已经偏离了这个标准
:sub_1c
; 取当前人物的战斗序号
; arg_0 变量
8b 44 24 04 ;mov eax, [esp + arg_0]
0f bf 0d *5a300 ;movsx ecx, word ptr [5a300]
66 89 0c 45 *120000 ;mov [eax*2+120000],cx
c3 ;retn
:sub_1d
; 选择目标
;arg_0 type
;arg_4 战斗id
;arg_8 步数
;arg_c 保存选择的目标战斗id
;arg_10 是否显示选择画面
53 ;push ebx
56 ;push esi
57 ;push edi
55 ;push ebp
83 7c 24 24 00 ;cmp dword ptr [esp+arg_10],0
75 'loc_sub_1d_1 ;jnz short 0005ddf1
6a 00 ;push 0
ff 74 24 18 ;push dword ptr [esp+arg_0]
ff 74 24 20 ;push dword ptr [esp+arg_4]
e8 "sub_getValue ;call sub_getValue
83 c4 0c ;add esp,c
8b f0 ;mov esi,eax
6a 01 ;push 1
ff 74 24 18 ;push dword ptr [esp+arg_0]
ff 74 24 24 ;push dword ptr [esp+arg_8]
e8 "sub_getValue ;call sub_getValue
83 c4 0c ;add esp,c
8b f8 ;mov edi,eax
6a 00 ;push 0
6a 01 ;push 1
57 ;push edi
56 ;push esi
e8 &36afe ;call 00036afe 选择目标子程
83 c4 10 ;add esp,10
loc_sub_1d_1:
0f bf 1d *556dc ;movsx ebx,word ptr [556dc]
c1 e3 07 ;shl ebx,7
0f bf 05 *556da ;movsx eax,word ptr [556da]
0f bf 84 43 *1e4a04 ;movsx eax,word ptr [ebx+eax*2+e4a04]
8b 4c 24 20 ;mov ecx,[esp+arg_c]
66 89 04 4d *120000 ;mov [ecx*2+120000],ax
5d ;pop ebp
5f ;pop edi
5e ;pop esi
5b ;pop ebx
c3 ;retn
:sub_1e
; 读取人物战斗属性
; arg_0 type
; arg_4 战斗id
; arg_8 偏移
; arg_c 变量号
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+arg_0]
ff 74 24 30 ;push [dword ss:esp+arg_4]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f8 ;mov edi, eax
6a 01 ;push 1
ff 74 24 28 ;push [dword ss:esp+arg_0]
ff 74 24 34 ;push [dword ss:esp+arg_8]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
6b ff 1c ;imul edi, edi, 1c
81 c7 2c *dc72c ;add edi, dc72c
03 f8 ;add edi, eax
0f bf 4c 24 30 ;movsx ecx, [word ss:esp+arg_c]
66 8b 07 ;mov ax, [word ds:edi]
66 89 04 4d *120000 ;mov [word ds:ecx*2+120000], ax
61 ;popad
c3 ;retn
:sub_1f
; 写入人物战斗属性
; arg_0 type
; arg_4 战斗id
; arg_8 偏移
; arg_c 数值
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+arg_0]
ff 74 24 30 ;push [dword ss:esp+arg_4]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f8 ;mov edi, eax
6a 01 ;push 1
ff 74 24 28 ;push [dword ss:esp+arg_0]
ff 74 24 34 ;push [dword ss:esp+arg_8]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f0 ;mov esi, eax
6a 02 ;push 2
ff 74 24 28 ;push [dword ss:esp+arg_0]
ff 74 24 38 ;push [dword ss:esp+arg_c]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b c8 ;mov ecx, eax
6b ff 1c ;imul edi, edi, 1c
81 c7 *dc72c ;add edi, dc72c
03 fe ;add edi, esi
66 89 0f ;mov [word ds:edi], cx
61 ;popad
c3 ;retn
:sub_2c
;播放效果
; arg_0 type
; arg_4 战斗id
; arg_8 动作类型
; arg_c 效果编号
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 30 ;push [dword ss:esp+30]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f8 ;mov edi, eax
6a 01 ;push 1
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 34 ;push [dword ss:esp+34]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f0 ;mov esi, eax
6a 02 ;push 2
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 38 ;push [dword ss:esp+38]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
83 fe 00 ;cmp esi, 0
7c 'loc_2c_2 ;jl short loc_2c_2
50 ;push eax
56 ;push esi
57 ;push edi
e8 &3859e ;call 0003859e 武功动画
83 c4 0c ;add esp, c
eb 'loc_2c_1 ;jmp short loc_2c_1
:loc_2c_2
50 ;push eax
e8 &3884a ;call 0003884a 暗器动画
83 c4 04 ;add esp, 4
:loc_2c_1
61 ;popad
c3 ;retn
:sub_2d
;显示数字
; arg_0 type
; arg_4 数字颜色
; arg_8 是否闪烁
; arg_c 闪烁颜色
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 30 ;push [dword ss:esp+30]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f8 ;mov edi, eax
6a 01 ;push 1
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 34 ;push [dword ss:esp+34]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f0 ;mov esi, eax
6a 02 ;push 2
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 38 ;push [dword ss:esp+38]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
66 89 3d *556d4 ;mov [word ds:556f4], di
66 a3 *e6ebc ;mov [word ds:e6ebc], ax
56 ;push esi
e8 &38910 ;call 00038910
83 c4 04 ;add esp, 4
66 c7 05 *556f4 00 00 ;mov [word ds:556f4], 0
61 ;popad
c3 ;retn
:sub_2e
;设定效果层
; arg_0 type
; arg_4 x起始
; arg_8 y起始是否闪烁
; arg_c x长度
; arg_10 y长度
; arg_14 数值
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 30 ;push [dword ss:esp+30]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f8 ;mov edi, eax
6a 01 ;push 1
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 34 ;push [dword ss:esp+34]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b f0 ;mov esi, eax
6a 02 ;push 2
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 38 ;push [dword ss:esp+38]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b e8 ;mov ebp, eax
6a 03 ;push 3
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 3c ;push [dword ss:esp+3c]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b d8 ;mov ebx, eax
6a 04 ;push 4
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 40 ;push [dword ss:esp+40]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
:loc_2e_1
83 fd 00 ;cmp ebp, 0
7e 'loc_2e_4 ;jle short 0005e746
53 ;push ebx
56 ;push esi
:loc_2e_2
83 fb 00 ;cmp ebx, 0
7e 'loc_2e_3 ;jle short 0005e740
8b ce ;mov ecx, esi
c1 e1 07 ;shl ecx, 7
66 89 84 79 *1dea04 ;mov [word ds:ecx+edi*2+dea04], ax
46 ;inc esi
4b ;dec ebx
:loc_2e_3
eb 'loc_2e_2 ;jmp short 0005e72a
47 ;inc edi
4d ;dec ebp
5e ;pop esi
5b ;pop ebx
eb 'loc_2e_1 ;jmp short 0005e723
:loc_2e_4
61 ;popad
c3 ;retn
:sub_2f
;恢复静止贴图
; arg_0 type
; arg_4 战斗序号
60 ;pushad
6a 00 ;push 0
ff 74 24 28 ;push [dword ss:esp+28]
ff 74 24 30 ;push [dword ss:esp+30]
e8 "sub_getValue ;call 0005d148
83 c4 0c ;add esp, c
8b e8 ;mov ebp, eax
55 ;push ebp
e8 &3b1d6 ;call 0003b1e6 计算人物静止贴图
83 c4 04 ;add esp, 4
6b ed 1c ;imul ebp, ebp, 1c
66 89 85 *1d73c ;mov [word ss:ebp+dc73c], ax
e8 &2d653 ;call 0002d653 清屏
61 ;popad
c3 ;retn
:sub_31
; 调用任意子程
; arg_0 子程地址低位
; arg_4 子程地址高位
; arg_8 起始参数
; arg_c 参数个数
; arg_10 返回值
60 ;pushad
8b 44 24 28 ;mov eax, [dword ss:esp+arg_4]
c1 e0 10 ;shl eax, 10
33 db ;xor ebx, ebx
66 8b 5c 24 24 ;mov bx, [word ss:esp+arg_0]
03 c3 ;add eax, ebx
05 *feff0000 ;add eax, fffe0000
8b e8 ;mov ebp, eax
8b 4c 24 2c ;mov ecx, [dword ss:esp+arg_8]
8b 74 24 30 ;mov esi, [dword ss:esp+arg_c]
6b fe 04 ;imul edi, esi, 4
83 fe 00 ;cmp esi, 0
74 'loc_31_1 ;je short 0005e6a8
:loc_31_1
0f bf 04 4d *120000 ;movsx eax, [word ds:ecx*2+120000]
50 ;push eax
41 ;inc ecx
4e ;dec esi
83 fe 00 ;cmp esi, 0
75 'loc_31_1 ;jnz short 0005e698
:loc_31_2
ff d5 ;call near ebp
03 e7 ;add esp, edi
8b 4c 24 34 ;mov ecx, [dword ss:esp+arg_10]
66 89 04 4d *120000 ;mov [word ds:ecx*2+120000], ax
61 ;popad
c3 ;retn
|