Coding on MASM32Hackin

in #hakcin2 years ago
  alloc(AntiGM2,1024)
  registersymbol(AntiGM2)

  alloc(CountSlot,4)
  alloc(hStatus,4)
  alloc(Slot7Add,4)

  label(BucleAntiGM)
  label(repeat)
  label(Continuar2)

  CountSlot:
  dd 0
  hStatus:
  dd 0

  ///////////////

  AntiGM2:
  push ebp
  mov ebp,esp




  BucleAntiGM:


  lea ecx,[Engine.g_Field_Info]
  lea edx,[Engine.g_Field_Info+11]
  lea esi,[Engine.g_Field_Info+3392]
  mov [CountSlot],0
  mov [hStatus],edx
  mov [Slot7Add],esi


  add ecx,1E02

  repeat:
  cmp byte ptr [ecx],5
  je Continuar2

  mov edx,[hStatus]
  cmp byte ptr [edx],0
  je Continuar2

  cmp [Slot7Add],ecx
  je Continuar2

  push 0
  call KERNEL32.ExitProcess

  Continuar2:
  inc [CountSlot]
  add ecx,730
  cmp dword ptr [CountSlot],10
  jne repeat
  jmp BucleAntiGM

  pop ebp
  ret

  CreateThread(AntiGM2)]]);

  autoAssemble([[
  alloc(AutoF10,3072)
  registersymbol(AutoF10)
  alloc(DisableBOT,1024)
  registersymbol(DisableBOT)

  alloc(hStatus,4)
  alloc(IsEnabled,4)
  alloc(Ventana,10)
  alloc(hWnd,4)
  alloc(hWnd2,4)


  label(key1)
  label(key2)
  label(Repeat)
  label(Repeticion)



  hStatus:
  dd 0
  IsEnabled:
  dd 0
  Ventana:
  db 'Rakion',0


  AutoF10:
  push ebp
  mov ebp,esp

  lea ecx,[Engine.g_Field_Info+11]
  mov [hStatus],ecx

  key1:
  push B4 180
  call KERNEL32.Sleep
  push 70 VK_F1
  call USER32.GetAsyncKeyState
  cmp eax,0
  je key1

Get Window Handle
push Ventana
push 0
call USER32.FindWindowA
cmp eax,0
je key1
mov [hWnd],eax
Send F10 to start BOT
push 64
call KERNEL32.Sleep
push 0 //Extrainfo NULL
push 1 //KEYEVENTF_EXTENDEDKEY
push 0 //Scan code NULL
push 79 //VK_F10
call USER32.keybd_event
push 0 //Extrainfo NULL
push 2 //KEYEVENTF_KEYUP
push 0 //Scan code NULL
push 79 //VK_F10
call USER32.keybd_event
//--------

  mov [IsEnabled],1

  Repeat:
  push 64
  call KERNEL32.Sleep
  mov ecx,[hStatus]
  cmp byte ptr [ecx],1
  jne Repeat

  push BB8 //3000
  call KERNEL32.Sleep
  cmp byte ptr [IsEnabled],1
  jne key1

  Repeticion:
  push 1F4 //500
  call KERNEL32.Sleep
  cmp byte ptr [IsEnabled],0
  je key1
  mov ecx,[hStatus]
  cmp byte ptr [ecx],0
  jne Repeticion
  push 3E8 //1000
  call KERNEL32.Sleep
  cmp byte ptr [IsEnabled],0
  je key1

  //Respalda la ventana actual
  call user32.GetForegroundWindow
  mov [hWnd2],eax
  //---------

  push 32
  call kernel32.Sleep

  push [hWnd]
  call user32.SetActiveWindow
  push [hWnd]
  call user32.SetForegroundWindow

  push 64
  call kernel32.Sleep
  push 0 //Extrainfo NULL
  push 1 //KEYEVENTF_EXTENDEDKEY
  push 0 //Scan code NULL
  push 79 //VK_F10
  call user32.keybd_event
  push 0 //Extrainfo NULL
  push 2 //KEYEVENTF_KEYUP
  push 0 //Scan code NULL
  push 79 //VK_F10
  call user32.keybd_event

  //Regresa a la ventana original
  push 64
  call kernel32.Sleep
  push [hWnd2]
  call user32.SetActiveWindow
  push [hWnd2]
  call user32.SetForegroundWindow
  //-----
  jmp Repeat //Vuelve al primer ciclo

  pop ebp
  ret

  DisableBOT:
  push ebp
  mov ebp,esp

  key2:
  push B4 //180
  call KERNEL32.Sleep
  push 71 // VK_F2
  call USER32.GetAsyncKeyState
  cmp eax,0
  je key2

  mov [IsEnabled],0

  jmp key2

  pop ebp
  ret

  CreateThread(AutoF10)
  CreateThread(DisableBOT)