≈※爖※≈ 发表于 2009-1-12 11:10:10

请教下汇编写游戏CALL问题

这两天做了个AU3的写游戏CALL汇编,但遇到了一个问题,我用VirtualAllocEx创建的内存空间为010C0000位置,代码也是写在这个位置上,但用CreateRemoteThread执行线程时,为什么总是跑到别的地方去了呢?.
CreateRemoteThread的参数:
$RThwnd = CreateRemoteThread($h, 0, 0, $tmp_Addr, 0, 0, 0)

我把参数后面的0改成4就不会有这种现象,但CALL又不成功!
$RThwnd = CreateRemoteThread($h, 0, 0, $tmp_Addr, 0, 4, 0)

如图:

[ 本帖最后由 ≈※爖※≈ 于 2009-1-14 14:10 编辑 ]

≈※爖※≈ 发表于 2009-1-14 14:11:29

自已解决了!原来是我的在写CALL时把一个代码给搞错了!
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include "汇编模块.au3"

run("游戏找CALL练习实例one.exe")
Dim $pid,$id,$Win="写CALL测试"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate($Win, 330, 228, 193, 125)
$Button1 = GUICtrlCreateButton("取PID", 120, 24, 75, 25, 0)
$Button2 = GUICtrlCreateButton("吃红", 56, 80, 75, 25, 0)
$Button3 = GUICtrlCreateButton("吃蓝", 56, 112, 75, 25, 0)
$Button4 = GUICtrlCreateButton("回城", 176, 80, 75, 25, 0)
$Button5 = GUICtrlCreateButton("冰系", 56, 160, 75, 25, 0)
$Button6 = GUICtrlCreateButton("火系", 176, 160, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1                       
                        $Hawd=WinGetHandle("游戏找CALL练习实例one")
                        If $Hawd<>0 Then                                               
                                GetWindowThreadProcessId($Hawd,$Pid)
                                $hd=OpenProcess($PROCESS_ALL_ACCESS, False,$pid)
                                If $hd=0 Then
                                        MsgBox(0,$Win,"打不开进程")
                                Else
                                        MsgBox(0,"取窗口ID","窗口句柄:"&$Hawd&" 窗口PID:"&$pid&" 打开进程:"&$hd)                                       
                                EndIf
                                CloseHandle($hd)
                        Else
                                MsgBox(0,$Win,"找不到 游戏找CALL练习实例one 的进程ID")
                        EndIf                       
                Case $Button2
                        If $pid<>"" Then
                                Pushad()                               
                                MOV_EBX (0x00d547fc)
                                Mov_EAX_DWORD_Ptr_EBX_Add(0x124)
                                Mov_EDX_DWORD_Ptr_EBX_Add(0x120)                               
                                Call_EDX()
                                Popad()
                                Ret()
                                Run_ASM($pid)
                                TrayTip($Win,"吃红",5)
                        Else
                                TrayTip($Win,"未获取PID",5)
                        EndIf
                Case $Button3
                                If $pid<>"" Then                       
                                Pushad()                                       
                                MOV_EBX (0x00D5450C)
                                Mov_EAX_DWORD_Ptr_EBX_Add(0x124)
                                Mov_EDX_DWORD_Ptr_EBX_Add(0x120)
                                Call_EDX()
                                Popad()
                                Ret()
                                Run_ASM ($pid)       
                                TrayTip($Win,"吃蓝",5)
                                Else
                                TrayTip($Win,"未获取PID",5)
                        EndIf
                        Case $Button4
                                If $pid<>"" Then
                                Pushad()                                       
                                MOV_EBX (0x00D5412C)
                                Mov_EAX_DWORD_Ptr_EBX_Add(0x124)
                                Mov_EDX_DWORD_Ptr_EBX_Add(0x120)
                                Call_EDX()
                                Popad()
                                Ret()
                                Run_ASM ($pid)       
                                TrayTip($Win,"回城",5)
                                Else
                                TrayTip($Win,"未获取PID",5)
                        EndIf
                        Case $Button5       
                                If $pid<>"" Then                       
                                Pushad()                                       
                                MOV_EBX (0x00D54EB0)
                                Mov_EAX_DWORD_Ptr_EBX_Add(0x124)
                                Mov_EDX_DWORD_Ptr_EBX_Add(0x120)
                                Call_EDX()
                                Popad()
                                Ret()
                                Run_ASM ($pid)       
                                TrayTip($Win,"冰系",5)
                                Else
                                TrayTip($Win,"未获取PID",5)
                                EndIf
                        Case $Button6
                                If $pid<>"" Then
                                Pushad()                                       
                                MOV_EBX (0x00D552D4)
                                Mov_EAX_DWORD_Ptr_EBX_Add(0x124)
                                Mov_EDX_DWORD_Ptr_EBX_Add(0x120)
                                Call_EDX()
                                Popad()
                                Ret()
                                Run_ASM ($pid)       
                                TrayTip($Win,"火系",5)
                                Else
                                TrayTip($Win,"未获取PID",5)
                                EndIf
        EndSwitch       
WEnd

[ 本帖最后由 ≈※爖※≈ 于 2009-1-14 14:39 编辑 ]

sxd 发表于 2009-1-14 17:26:48

可以嵌入汇编?看来是时候学找call来做个小外挂玩玩了
努力学习去:face (36):

[ 本帖最后由 sxd 于 2009-1-14 17:35 编辑 ]

≈※爖※≈ 发表于 2009-1-14 18:53:09

这个汇编模块是自己写的~!不是调用DLL的!你可以到这个帖里看看!有我做出来的写CALL测试~
http://www.autoitx.com/forum.php?mod=viewthread&tid=4768&extra=page%3D1

ruiban 发表于 2009-3-2 23:02:15

求共享"汇编模块"...........

xrbenbeba 发表于 2009-3-4 10:19:57

支持楼主:face (33):

处女 发表于 2010-11-25 04:26:53

请问QQ游戏的窗口句并怎么获得呢?
页: [1]
查看完整版本: 请教下汇编写游戏CALL问题