Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool GetThreatInfo(ulong unitGuid, byte threatStatus, byte threatPct, byte rawThreatPct, uint threatValue)
- {
- var instance = ObjectManager.Executor;
- if (instance == null)
- throw new Exception("Invalid Executor used GetThreatInfo");
- var pGuid = instance.Memory.AllocateMemory(0x8);
- instance.Memory.Write(pGuid, unitGuid);
- try
- {
- lock (instance.AssemblyLock)
- {
- instance.Clear();
- instance.AddLine("push {0}", threatValue);
- instance.AddLine("push {0}", rawThreatPct);
- instance.AddLine("push {0}", threatPct);
- instance.AddLine("push {0}", threatStatus);
- instance.AddLine("push {0}", pGuid);
- instance.AddLine("mov ecx, {0}", BaseAddress);
- instance.AddLine("call {0}", 0x006AE120);
- instance.AddLine("retn");
- instance.Execute();
- }
- }
- catch (Exception ex)
- {
- Logging.WriteException(ex);
- }
- finally
- {
- if(pGuid != 0)
- instance.Memory.FreeMemory(pGuid);
- }
- return instance.Memory.Read<bool>(instance.ReturnPointer);
- }
Add Comment
Please, Sign In to add comment