因為使用的是vb.net有很多call改完都會出現問題目前有幾個問題無法解決,麻煩各位達人幫忙。
1我在抓取怪物資訊有很多無法正常出現,怪物名稱會是亂碼,
2未神麼ReadProcessMemory(hProcess, a , b, 4, 0)之後a的值就變掉
3走路call座標如果是負數會溢位
4怪物的id不是負數嗎我的不是負數ll注入會沒反應,以下是我的call麻煩各位達人
==環境列表===================================
ReadProcessMemory(hProcess, tmp2 + 4 * i, W2I_ENV_MONSTER_ADDR, 4, 0) '讀取怪物偏移
If W2I_ENV_MONSTER_ADDR > 0 Then
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_ADDR + &H4, W2I_ENV_MONSTER_OBJ, 4, 0)
Single_Mod.ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H3C, GwX, 4, 0)
Single_Mod.ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H44, GwY, 4, 0)
Single_Mod.ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H40, GwZ, 4, 0)
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &HB4, GwZl, 4, 0) 'type
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H120, GwClass, 4, 0)
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H124, GwLv, 2, 0)
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H134, GwHP, 4, 0)
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H14C, GwHPMAX, 4, 0) '怪物血值上限&H15C--154
Single_Mod.ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H254, GwJl, 4, 0) '人與怪物距離
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H11C, GwId, 4, 0)
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &HE8, W2I_MONSTER_NUM, 4, 0) '相對編號
ReadProcessMemory(hProcess, W2I_ENV_MONSTER_OBJ + &H238, W2I_ENV_MONSTER_NAME_ADDR, 4, 0)
byte_Mod.ReadProcessMemory(hProcess, W2I_ENV_MONSTER_NAME_ADDR, GwNameb(0), 64, 0)
gwname = System.Text.UnicodeEncoding.Unicode.GetString(GwNameb)
==選怪======================
Private Sub Call_setMons(ByVal monsSN As Long)
Dim asm As New Project1.Class1 '使用 clsASM 類別模組
With asm ' asm
.Pushad()
.Push(monsSN)
'.Mov_EDI(monsSN)
.Mov_EAX_DWORD_Ptr(PW_Base)
.Mov_ECX_DWORD_Ptr_EAX_Add(&H20)
.Add_ECX(&HEC)
.Mov_EAX(&H5B0110)
'.Push_EDI()
.Call_EAX()
.Popad()
.ret()
End With ' end
asm.inject(hProcess)
asm.Run_ASM(hProcess, 0)
asm.free(hProcess, 0)
End Sub
==走路======================================
Public Sub Call_Walk(ByVal x As Single, ByVal Y As Single, ByVal z As Single, ByVal ProcessID As Long)
'Dim asm As New Project1.Class1Class 'ClsASM.ASM
Dim xxx As Integer = 1
If xxx = 0 Then
Exit Sub
End If
Dim asm As New Project1.Class1
Const Address1 = &H4626E0
Const Address2 = &H466160
Const Address3 = &H462AE0
With asm
.Pushad()
.Mov_EAX_DWORD_Ptr(PW_Base)
.Mov_EBX_DWORD_Ptr_EAX_Add(&H1C)
.Mov_EBX_DWORD_Ptr_EBX_Add(&H20)
.Mov_ECX_DWORD_Ptr_EBX_Add(&HC70)
.Push(1)
.Mov_EBX(Address1)
.Call_EBX()
.Mov_ESI_EAX()
.Lea_EAX_DWORD_Ptr_ESP_Add(&H50)
.Push_EAX()
If z = 0 Then
.Push(0) ' 1空中 水中 0地面
Else
.Push(1)
End If
.Mov_ECX_ESI()
.Mov_EBX(Address2)
.Call_EBX()
.Mov_EAX_DWORD_Ptr(PW_Base)
.Mov_EBX_DWORD_Ptr_EAX_Add(&H1C)
.Mov_EBX_DWORD_Ptr_EBX_Add(&H20)
.Mov_ECX_DWORD_Ptr_EBX_Add(&HC70)
.Push(0)
.Push(1)
.Push_ESI()
.Push(1)
.Mov_EBX(Address3)
.Call_EBX()
.Mov_EAX_DWORD_Ptr(PW_Base)
.Mov_EBX_DWORD_Ptr_EAX_Add(&H1C)
.Mov_EBX_DWORD_Ptr_EBX_Add(&H20)
.Mov_EAX_DWORD_Ptr_EBX_Add(&HC70)
.Mov_EAX_DWORD_Ptr_EAX_Add(&H30)
.Mov_EAX_DWORD_Ptr_EAX_Add(&H4)
.Mov_DWORD_Ptr_EAX_ADD(&H20, Float2Int(x)) //座標如果是負的會溢位如果不是就可正常走路
.Mov_DWORD_Ptr_EAX_ADD(&H28, Float2Int(Y)) //懷疑是ByVal x As Single出錯但不之該...
If z <> 0 Then
.Mov_DWORD_Ptr_EAX_ADD(&H24, Float2Int(z))
End If
.Popad()
.ret()
End With
asm.inject(ProcessID)
asm.Run_ASM(ProcessID, 0)
asm.free(ProcessID, 0)
End Sub |