三转形象,请看大多数人使用的代码:
00406A75 /$ 55 push ebp
00406A76 |. 8BEC mov ebp, esp
00406A78 |. 83EC 08 sub esp, 8
00406A7B |. 817D 08 AD000>cmp dword ptr ss:[ebp+8], 0AD
00406A82 |. 72 02 jb short 00406A86
00406A84 |. EB 6E jmp short 00406AF4
00406A86 |> 8B4D 08 mov ecx, dword ptr ss:[ebp+8]
00406A89 |. 6BC9 48 imul ecx, ecx, 48
00406A8C |. 81C1 681B4A00 add ecx, 004A1B68
00406A92 |. E8 79FBFFFF call 00406610
00406A97 |. 8845 F8 mov byte ptr ss:[ebp-8], al
00406A9A |. 25 FF000000 and eax, 0FF
00406A9F |. 99 cdq
00406AA0 |. B9 03000000 mov ecx, 3
00406AA5 |. F7F9 idiv ecx
00406AA7 |. 8955 FC mov dword ptr ss:[ebp-4], edx
00406AAA |. 8B55 08 mov edx, dword ptr ss:[ebp+8]
00406AAD |. 8A82 166B4000 mov al, byte ptr ds:[edx+406B16]
00406AB3 |. 3C 07 cmp al, 7
00406AB5 |. 73 39 jnb short 00406AF0
00406AB7 |. FF2485 FA6A40>jmp dword ptr ds:[eax*4+406AFA]
00406ABE |> 8B45 FC mov eax, dword ptr ss:[ebp-4]
00406AC1 |. 04 35 add al, 35
00406AC3 |. EB 31 jmp short 00406AF6
00406AC5 |> 8B45 FC mov eax, dword ptr ss:[ebp-4]
00406AC8 |. 04 38 add al, 38
00406ACA |. EB 2A jmp short 00406AF6
00406ACC |> 8B45 FC mov eax, dword ptr ss:[ebp-4]
00406ACF |. 04 3B add al, 3B
00406AD1 |. EB 23 jmp short 00406AF6
00406AD3 |> 8B45 FC mov eax, dword ptr ss:[ebp-4]
00406AD6 |. 04 3E add al, 3E
00406AD8 |. EB 1C jmp short 00406AF6
00406ADA |> 8B45 FC mov eax, dword ptr ss:[ebp-4]
00406ADD |. 04 41 add al, 41
00406ADF |. EB 15 jmp short 00406AF6
00406AE1 |> 8B45 F8 mov eax, dword ptr ss:[ebp-8]
00406AE4 |. 3C 28 cmp al, 28
00406AE6 |. 72 04 jb short 00406AEC
00406AE8 |. B0 45 mov al, 45
00406AEA |. EB 0A jmp short 00406AF6
00406AEC |> B0 44 mov al, 44
00406AEE |. EB 06 jmp short 00406AF6
00406AF0 |> 04 3F add al, 3F
00406AF2 |. EB 02 jmp short 00406AF6
00406AF4 |> B0 FF mov al, 0FF
00406AF6 |> 8BE5 mov esp, ebp
00406AF8 |. 5D pop ebp
00406AF9 \. C3 retn
00406AFA . F46A4000 dd Ekd5.00406AF4 ; 分支表 被用于 00406AB7
00406AFE . BE6A4000 dd Ekd5.00406ABE
00406B02 . C56A4000 dd Ekd5.00406AC5
00406B06 . CC6A4000 dd Ekd5.00406ACC
00406B0A . D36A4000 dd Ekd5.00406AD3
00406B0E . DA6A4000 dd Ekd5.00406ADA
00406B12 . E16A4000 dd Ekd5.00406AE1
后面的分支表分别指向不同的图片,最简单的就是增加分支表指向,至于代码,看规则都知道就不多说了。紫色部份是三转形象(01~05),蓝色部份是诸葛亮的,这个有点特殊,其实就是说岳中老牛的二转代码,指定人物为前28个兵种(三转+西凉)为一个形象,指定人物为后面兵种时是另一个形象(西凉以后)。
[ 本帖最后由 沈浪 于 2011-7-1 19:10 编辑 ]