Guest User

Untitled

a guest
Jul 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. private bool GetThreatInfo(ulong unitGuid, byte threatStatus, byte threatPct, byte rawThreatPct, uint threatValue)
  2. {
  3. var instance = ObjectManager.Executor;
  4.  
  5. if (instance == null)
  6. throw new Exception("Invalid Executor used GetThreatInfo");
  7.  
  8. var pGuid = instance.Memory.AllocateMemory(0x8);
  9. instance.Memory.Write(pGuid, unitGuid);
  10.  
  11. try
  12. {
  13. lock (instance.AssemblyLock)
  14. {
  15. instance.Clear();
  16. instance.AddLine("push {0}", threatValue);
  17. instance.AddLine("push {0}", rawThreatPct);
  18. instance.AddLine("push {0}", threatPct);
  19. instance.AddLine("push {0}", threatStatus);
  20. instance.AddLine("push {0}", pGuid);
  21. instance.AddLine("mov ecx, {0}", BaseAddress);
  22. instance.AddLine("call {0}", 0x006AE120);
  23. instance.AddLine("retn");
  24. instance.Execute();
  25. }
  26. }
  27. catch (Exception ex)
  28. {
  29. Logging.WriteException(ex);
  30. }
  31. finally
  32. {
  33. if(pGuid != 0)
  34. instance.Memory.FreeMemory(pGuid);
  35. }
  36.  
  37. return instance.Memory.Read<bool>(instance.ReturnPointer);
  38. }
Add Comment
Please, Sign In to add comment