几篇技术帖

天骄2登陆校验图片显示

 

by  GameReverser  QQ: 343538175

天骄2登陆时候接受图片信息

进入输入账号界面,接受到封包 10 0E 02 00 ,其中包含的图片信息为:

起始: addr[0x17]
长度: 0xC0
宽: 0x08,高: 0x24
障碍点表示: 1 
读取方式:word

举例:
接收数据:
01840E98  10 0E 02 00 00 00 00 00 00 00 00 00 44 31 42 35  ............D1B5
01840EA8  42 32 44 31 00 00 00 00 04 80 08 00 00 00 01 00  B2D1............
                               -----
01840EB8  00 00 00 80 02 00 00 00 04 00 00 C0 03 00 00 FD  ................
01840EC8  03 03 00 20 04 80 03 04 02 78 00 10 08 C0 04 08  ... .....x......
01840ED8  02 F8 00 50 08 40 08 00 02 E0 03 10 10 41 48 00  ...P.@.......AH.
01840EE8  02 84 03 10 10 44 08 60 02 30 07 50 20 40 18 98  .....D.`.0.P @..
01840EF8  03 00 0F 10 20 40 10 0C 02 00 0E 20 20 40 10 04  .... @.....  @..
01840F08  00 F8 0F 21 60 88 10 04 00 FC 1F 40 2C 80 10 04  ...!`......@,...
01840F18  00 1E 1F 40 20 C8 10 94 0A 0E 1C 80 14 00 19 04  ...@ ...........
01840F28  47 0E 1C 01 0F 08 8E 0C 02 0E 1C 00 10 00 00 08  G...............
01840F38  02 0E 1E 00 00 00 00 F0 01 1E 0F 80 40 02 20 20  ............@.
01840F48  80 FC 27 00 00 00 82 00 40 F0 03 00 00 00 00 10  ..'.....@.......
01840F58  20 02 00 00 00 00 10 00 00 00 00 00 00 00 00 08   ...............
01840F68  00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00  ................
                         -----
01840F78  00 3D 98 6D 14 10 CD 3D 98 6D 0B 1B 59 01 BB AA  .=.m...=.m..Y...
01840F88  B6 AB B5 E7 D0 C5 A3 BA B8 B2 B8 C7 BB AA B6 AB  ................
01840F98  B5 D8 C7 F8 2C D4 AD BB AA B6 AB 32 A1 A2 35 00  ....,......2..5.
01840FA8  F8 2C D4 AD BD CC D3 FD 31 A1 A2 32 00 35 00 A2  .,......1..2.5..
01840FB8  34 00 00 00 00 0B 00 00 00 01 00 00 04 4D 00 00  4............M..
01840FC8  00 00 00 00 00 00 00 00 00 00 BB AA B6 AB CC EC  ................
01840FD8  BA 

取出图片信息:
0042C100  00 04 80 08 00 00 00 01 00 00 00 00 80 02 00 00  ................
0042C110  00 04 00 00 C0 03 00 00 FD 03 03 00 20 04 80 03  ............ ...
0042C120  04 02 78 00 10 08 C0 04 08 02 F8 00 50 08 40 08  ..x.........P.@.
0042C130  00 02 E0 03 10 10 41 48 00 02 84 03 10 10 44 08  ......AH......D.
0042C140  60 02 30 07 50 20 40 18 98 03 00 0F 10 20 40 10  `.0.P @...... @.
0042C150  0C 02 00 0E 20 20 40 10 04 00 F8 0F 21 60 88 10  ....  @.....!`..
0042C160  04 00 FC 1F 40 2C 80 10 04 00 1E 1F 40 20 C8 10  ....@,......@ ..
0042C170  94 0A 0E 1C 80 14 00 19 04 47 0E 1C 01 0F 08 8E  .........G......
0042C180  0C 02 0E 1C 00 10 00 00 08 02 0E 1E 00 00 00 00  ................
0042C190  F0 01 1E 0F 80 40 02 20 20 80 FC 27 00 00 00 82  .....@.  ..'....
0042C1A0  00 40 F0 03 00 00 00 00 10 20 02 00 00 00 00 10  .@....... ......
0042C1B0  00 00 00 00 00 00 00 00 08 00 00 00 00 80 00 00  ................

最终显示数据:
5600

相关资料:

接受图片信息:

00413BFA   |> /8B45 0C               /mov eax,dword ptr ss:[ebp+C]
00413BFD   |. |6A 00                 |push 0                                              ; 

/Flags = 0
00413BFF   |. |03C3                  |add eax,ebx                                         ; |
00413C01   |. |57                    |push edi                                            ; 

|BufSize
00413C02   |. |50                    |push eax                                            ; 

|Buffer
00413C03   |. |56                    |push esi                                            ; 

|Socket
00413C04   |. |E8 93110000           |call <jmp.&WS2_32.#16>                              ; /recv

图片数据转移:

004131F5     |.  68 C0000000         push 0C0                                   ; /n = C0 (192.)
004131FA     |.  50                  push eax                                   ; |src
004131FB     |.  68 00C14200         push clientsh.0042C100                     ; |dest = 

clientsh.0042C100
00413200     |.  E8 E9AB0000         call <jmp.&MSVCRT.memcpy>                  ; /memcpy


显示图片setpixel:

宽: 0x10,高: 0x18
0040106C     |> /68 22020000      |||push 222
00401071     |>  8B45 FC          |||mov eax,dword ptr ss:[ebp-4]
00401074     |.  FF75 08          |||push dword ptr ss:[ebp+8]
00401077     |.  2BC3             |||sub eax,ebx
00401079     |.  83C0 0F          |||add eax,0F
0040107C     |.  50               |||push eax
0040107D     |.  FF76 04          |||push dword ptr ds:[esi+4]
00401080     |.  FFD7             |||call edi

显示图片:
00401041       C745 F8 00C1420>mov dword ptr ss:[ebp-8],clientsh.0042C100
00401048   |>  8B45 F8         /mov eax,dword ptr ss:[ebp-8]                  ; clientsh.0042C100
0040104B   |.  8365 08 00      |and dword ptr ss:[ebp+8],0
0040104F   |.  8945 F4         |mov dword ptr ss:[ebp-C],eax
00401052   |>  33DB            |/xor ebx,ebx
00401054   |>  6A 01           ||/push 1
00401056   |.  8BCB            |||mov ecx,ebx
00401058   |.  58              |||pop eax
00401059   |.  D3E0            |||shl eax,cl
0040105B   |.  8B4D F4         |||mov ecx,dword ptr ss:[ebp-C]
0040105E   |.  0FB709          |||movzx ecx,word ptr ds:[ecx]


febp_4 = 0;

for (k = 0; k < 4; k++)                 //横着无序画4个字
{
    for (j = 0; j < 24; j++)            //竖着画24行
    {
        for (i = 0; i < 16; i++)        //横着画一行,16个点
        {
            r_ecx = i;
            r_eax = 1;
            r_eax << r_ecx;
            r_ecx = WORD_PTR(addr);
            SetPixel(hdc, febp_4 - i + 0x0F, j, BACK/WHITE)
        }
        addr += 8;
    }
    addr += 2;
    febp_4 += 0x10;
}

 

天骄2计算路途走路方向

天骄2计算路途走路方向

 

by  GameReverser  QQ: 343538175


// addr[]为 23 1E 封包
// output[]为输出

int r_ecx, i;
DWORD r_edx;
BYTE r_cl;

r_edx = 0x0B;
for (i = 0; i < BYTE_PTR(addr[0x0A]); i++)
{
    r_ecx = i;
    r_ecx &= 0x80000001;
    r_cl = BYTE_PTR(addr_ptr[r_edx]);
    if (r_ecx < 0)
    {
        r_ecx --;
        r_ecx |= 0xFFFFFFFE;
        r_ecx ++;
    }
    if (r_ecx == 0)
    {
        r_cl &= 0x0F;
    }
    else{
        r_cl >>= 4;
        r_edx++;
    }
    output = r_cl;
}

测试数据:

接受的23 1E封包:
0012F854  23 1E C2 D1 00 00 C9 00 E5 00 05 56 55 F5 12 00

以上数据经过上面函数计算,其 56 55 F5 12 00 解密得到:  06 05 05 05 05  ,该序列就是走路过程的状

态序列,长度代表步数

路途每步的方向与数值对比:

左:04

右:00

下:06

上:02

左上:03

左下:05

右上:01

右下:07
 
相关资料
 
处理23 1E :

0044ABA7     |> /0FB746 02             movzx eax,word ptr ds:[esi+2]    ;  Case 1E of switch 

00449D59
0044ABAB     |.  50                    push eax
0044ABAC     |.  E8 0FE7FEFF           call TJ2Clien.004392C0
0044ABB1     |.  8BF8                  mov edi,eax
0044ABB3     |.  83C4 04               add esp,4
0044ABB6     |.  3BFB                  cmp edi,ebx

具体计算:

004461B0     |> /8BC8                /mov ecx,eax
004461B2     |. |81E1 01000080       |and ecx,80000001
004461B8     |. |79 05               |jns short TJ2Clien.004461BF
004461BA     |. |49                  |dec ecx
004461BB     |. |83C9 FE             |or ecx,FFFFFFFE
004461BE     |. |41                  |inc ecx
004461BF     |> |8A0A                |mov cl,byte ptr ds:[edx]
004461C1     |. |75 05               |jnz short TJ2Clien.004461C8
004461C3     |. |80E1 0F             |and cl,0F
004461C6     |. |EB 04               |jmp short TJ2Clien.004461CC
004461C8     |> |C0E9 04             |shr cl,4
004461CB     |. |42                  |inc edx
004461CC     |> |880C30              |mov byte ptr ds:[eax+esi],cl
004461CF     |. |0FB64F 0A           |movzx ecx,byte ptr ds:[edi+A]
004461D3     |. |40                  |inc eax
004461D4     |. |3BC1                |cmp eax,ecx
004461D6     |.^/7C D8               /jl short TJ2Clien.004461B0

030A19CB     CC                        int3
030A19CC     CB                        retf
030A19CD     38EF                      cmp bh,ch

030A28C1     CC                        int3
030A28C2     C010 03                   rcl byte ptr ds:[eax],3
030A28C5     B1 54                     mov cl,54
030A28C7   ^ E9 D1FDFFFF               jmp 030A269D



英雄王座官方小帮手窗口化功能分析

英雄王座官方小帮手窗口化功能分析

 

by GameReverser    QQ: 343538175

 

获取窗口句柄分析:

00405423       .  68 43775500    push 王座小帮.00557743                   ; /Title = "TRAVIA"
00405428       .  68 33775500    push 王座小帮.00557733                   ; |Class = "ZEMI_ONLINE_RPG"
0040542D       .  E8 BC0E1500    call 王座小帮.005562EE                   ; /FindWindowA
00405432       .  85C0           test eax,eax
00405434       .  74 10          je short 王座小帮.00405446

参数为窗口标题与类


窗口化主函数:


640 * 480

0040606E       .  68 E0010000    push 1E0                             ; /640 * 480
00406073       .  B9 80020000    mov ecx,280                          ; |
00406078       .  B2 01          mov dl,1                             ; |
0040607A       .  8BC6           mov eax,esi                          ; |
0040607C       .  E8 37F4FFFF    call 王座小帮.004054B8                   ; /窗口化
00406081       .  5E             pop esi
00406082       .  5B             pop ebx
00406083       .  C3             retn


800 * 600

00406092       .  68 58020000    push 258                             ; 800 * 600
00406097       .  B9 20030000    mov ecx,320                          ; |
0040609C       .  B2 01          mov dl,1                             ; |
0040609E       .  8BC6           mov eax,esi                          ; |
004060A0       .  E8 13F4FFFF    call 王座小帮.004054B8                   ; /王座小帮.004054B8
004060A5       .  5E             pop esi
004060A6       .  5B             pop ebx
004060A7       .  C3             retn


1024 * 768

004060B6       .  68 00030000    push 300                             ; 1024 * 768
004060BB       .  B9 00050000    mov ecx,500                          ; |
004060C0       .  B2 01          mov dl,1                             ; |
004060C2       .  8BC6           mov eax,esi                          ; |
004060C4       .  E8 EFF3FFFF    call 王座小帮.004054B8                   ; /王座小帮.004054B8
004060C9       .  5E             pop esi
004060CA       .  5B             pop ebx
004060CB       .  C3             retn


进入主函数,具体实现如下:

004054CC      |.  6A EC          push -14                             ; /Index = GWL_EXSTYLE
004054CE      |.  53             push ebx                             ;游戏窗口句柄
004054CF      |.  E8 3A0F1500    call 王座小帮.0055640E                   ; /GetWindowLongA
004054D4      |.  8BF0           mov esi,eax
004054D6      |.  81CE 00010400  or esi,40100
004054DC      |.  56             push esi                             ; 主函数参数,如 1E0 / 258 /300
004054DD      |.  6A EC          push -14                             ; |Index = GWL_EXSTYLE
004054DF      |.  53             push ebx                             ; |hWnd
004054E0      |.  E8 CD101500    call 王座小帮.005565B2                   ; /SetWindowLongA
004054E5      |.  6A 40          push 40                              ; /Flags = SWP_SHOWWINDOW
004054E7      |.  8B45 08        mov eax,dword ptr ss:[ebp+8]         ; |
004054EA      |.  50             push eax                             ; |Height
004054EB      |.  57             push edi                             ; |Width
004054EC      |.  6A 00          push 0                               ; |Y = 0
004054EE      |.  6A 00          push 0                               ; |X = 0
004054F0      |.  6A FE          push -2                              ; |InsertAfter = HWND_NOTOPMOST
004054F2      |.  53             push ebx                             ; |hWnd
004054F3      |.  E8 C6101500    call 王座小帮.005565BE     ; /SetWindowPos,窗口所在位置。
004054F8      |.  6A 01          push 1                               ; /ShowState = SW_SHOWNORMAL
004054FA      |.  53             push ebx                             ; |hWnd
004054FB      |.  E8 E8101500    call 王座小帮.005565E8                   ; /ShowWindow
00405500      |.  33C0           xor eax,eax
00405502      |.  EB 27          jmp short 王座小帮.0040552B
00405504      |>  50             push eax                             ; /Newvalue
00405505      |.  6A F0          push -10                             ; |Index = GWL_STYLE
00405507      |.  53             push ebx                             ; |hWnd
00405508      |.  E8 A5101500    call 王座小帮.005565B2                   ; /SetWindowLongA
0040550D      |.  56             push esi                             ; /Newvalue
0040550E      |.  6A EC          push -14                             ; |Index = GWL_EXSTYLE
00405510      |.  53             push ebx                             ; |hWnd
00405511      |.  E8 9C101500    call 王座小帮.005565B2                   ; /SetWindowLongA
00405516      |.  6A 40          push 40                              ; /Flags = SWP_SHOWWINDOW
00405518      |.  8B55 08        mov edx,dword ptr ss:[ebp+8]         ; |
0040551B      |.  52             push edx                             ; |Height
0040551C      |.  57             push edi                             ; |Width
0040551D      |.  6A 00          push 0                               ; |Y = 0
0040551F      |.  6A 00          push 0                               ; |X = 0
00405521      |.  6A FE          push -2                              ; |InsertAfter = HWND_NOTOPMOST
00405523      |.  53             push ebx                             ; |hWnd
00405524      |.  E8 95101500    call 王座小帮.005565BE                   ; /SetWindowPos
00405529      |.  B0 01          mov al,1
0040552B      |>  5F             pop edi
0040552C      |.  5E             pop esi
0040552D      |.  5B             pop ebx
0040552E      |.  8BE5           mov esp,ebp
00405530      |.  5D             pop ebp
00405531      /.  C2 0400        retn 4
 

 

英雄王座菜单结构整理

英雄王座菜单结构整理

 

by GameReverser   QQ: 343538175

1. 概述

本文档介绍菜单项目的结构。在与NPC对话等处需要该结构及相应表。
本文档写于版本:ver . 0.001. 026。
2005-1-15日。

2. 正文

本章节阐述与NPC对话的封包以及里面需要确定的某位。

(1) 与NPC对话封包

 Send:
命令 59 01 
内容 精灵传送师ID,点选项的第几个 
例子 59 01 00 00 00 00 5A 02 00 00 34 F0 FF FF D5 17 00 00 01 85 47 05 
说明 59 01 命令(2个BYTE) 00 00 00 00 定值(4个BYTE) 5A 02 00 00 定值(4个BYTE,本地查找计算得出) 34 F0 FF FF 精灵传送师ID(4个BYTE) D5 17 00 00从上面RECV发下来的值(4个BYTE) 01 点选项的第几个(1个BYTE) 85 47 不确定(2个BYTE) 05 定值(1个BYTE) 
备注 此包长度为22个BYTE 
其中数据:“5A 02 00 00”尚未确定,本文档讨论如何计算该数据。

(2) 计算该数据
查找该数据,主函数:
00414FA2   mov ecx,eax                            ; |
00414FA4   mov byte ptr ss:[ebp-4],dl             ; |
00414FA7   call Travia.00402C80          ;设定封包内容
00414FAC   call Travia.00436D30
00414FB1   lea edx,dword ptr ss:[ebp-14]
00414FB4   push edx                    ;封包内容
00414FB5   push 14                      ;封包长度
00414FB7   push 159                     ;封包指令
00414FBC   mov ecx,eax                            ; |
00414FBE   call Travia.004374C0    ;发送封包主函数

(3) 求该4位数据
其中,
00414FA7   call Travia.00402C80
用来设定封包中尚未确定的4位。
假定现在需要确定封包:
00 00 00 00 5A 02 00 00 34 F0 FF FF D5 17 00 00 01 85 47 05
该封包中,“34 F0 FF FF”为NPC的ID,“D5 17 00 00”来自服务器。
未曾确定的数据为“5A 02 00 00”。

进入该函数,如下:

00402CA2   mov dword ptr ds:[ecx],eax             ;  发送的前4个字节
00402CA4   mov dword ptr ss:[ebp-4],eax
00402CA7   jle short Travia.00402D1D
00402CA9   lea esp,dword ptr ss:[esp]
00402CB0   mov edx,dword ptr ss:[ebp+10]
00402CB3   mov eax,dword ptr ss:[ebp-4]
00402CB6   mov dword ptr ds:[edx],eax
00402CB8   xor ebx,ebx
00402CBA    lea ebx,dword ptr ds:[ebx]
00402CC0   mov ecx,dword ptr ds:[edi+E8]
00402CC6   test ecx,ecx
00402CC8   je short Travia.00402D0A
00402CCA   mov eax,dword ptr ds:[edi+EC]
00402CD0   sub eax,ecx
00402CD2   sar eax,2
00402CD5   cmp ebx,eax      ;eax为表的大小
00402CD7   jnb short Travia.00402D0A
00402CD9   mov esi,dword ptr ds:[ecx+ebx*4]     ;  ecx为表1基地址
00402CDC   cmp dword ptr ds:[esi],1
00402CDF   jnz short Travia.00402D07
00402CE1   mov edx,dword ptr ss:[ebp+8]     ;  服务器返回的该NPC信息
00402CE4   cmp dword ptr ds:[esi+C],edx
00402CE7   jnz short Travia.00402D07
00402CE9   mov eax,dword ptr ss:[ebp+C]         ;  第2个参数
00402CEC   cmp dword ptr ds:[esi+10],eax
00402CEF   jnz short Travia.00402D07
00402CF1   mov ecx,dword ptr ss:[ebp+10]        ;  ????第3个参数
00402CF4   mov eax,dword ptr ds:[ecx]
00402CF6   cmp eax,dword ptr ds:[esi+8]
00402CF9   jnz short Travia.00402D07
00402CFB   push eax                             ; /Arg1
00402CFC   mov ecx,edi                          ; |
00402CFE   call Travia.004042A0                 ; /Travia.004042A0
00402D03   test eax,eax
00402D05   jnz short Travia.00402D3A
00402D07   inc ebx
00402D08   jmp short Travia.00402CC0
00402D0A   mov edx,dword ptr ss:[ebp-4]
00402D0D   push edx                              ; /Arg1
00402D0E   mov ecx,edi                           ; |
00402D10   call Travia.004042F0                  ; /Travia.004042F0
00402D15   cmp eax,-1
00402D18   mov dword ptr ss:[ebp-4],eax
00402D1B   jg short Travia.00402CB0
00402D1D   mov edx,dword ptr ss:[ebp+14]
00402D20   mov eax,dword ptr ss:[ebp+10]
00402D23   mov dword ptr ds:[edx],0
00402D29   mov dword ptr ds:[eax],0
00402D2F   pop edi
00402D30   pop esi
00402D31   xor eax,eax
00402D33   pop ebx
00402D34   mov esp,ebp
00

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值