コード例 #1
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void HighLight_E(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext.Handle,
                @"mov [ebp-0x48],edx
fld dword ptr [esi+0x8]
fld dword ptr [ebp-0x3c]
fcomip st(1)
fstp st(0)") + 3;

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext,
                              AssemblySnippet.FromASMCode(
                                  @"mov dword ptr [esi+0x8],0x3f800000
mov dword ptr [esi+0x10],0x3f800000
mov dword ptr [esi+0x18],0x3f800000
fld dword ptr [esi+0x8]
fld dword ptr [ebp-0x3c]"
                                  ),
                              a, false
                              );
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void LowGravity_E(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext.Handle,
                "mov [esi+0x414],edx\ncmp dword ptr [esi+0x370],0");

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode("mov dword ptr [esi+0x410],0x41200000"), a, false);
        }
コード例 #3
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void FastSpeed_E(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext.Handle,
                "fstp dword ptr [esi+0x3bc]\nmov [esi+0x54b],dl");

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x3bc],0x464b2000\nmov dword ptr [esi+0x3e4],0x464b2000"),
                              a, false, false);
        }
コード例 #4
0
ファイル: Utils.cs プロジェクト: BlentER/QTRHacker
        public static void FastWallSpeed_E(GameContext Context)
        {
            int a   = (int)Context.HContext.MainAddressHelper.GetFunctionInstruction("Terraria.Player", "Update", 0x2D07).EndAddress - 6;
            int off = 0;

            NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a + 2, ref off, 4, 0);
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  $"mov dword ptr [eax+{off}],0x3e800000"),
                              a, false, false);
        }
コード例 #5
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void FastTileSpeed_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "d9 98 c8 03 00 00 8b 85 30 f0 ff ff d9");

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [eax+0x3c8],0x3e800000"),
                              a, false, false);
        }
コード例 #6
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void MachinicalRulerEffect_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "d9 9e c0 03 00 00 88 96 f0 05 00 00") + 12;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x5f6],0x1"),
                              a, false, false);
        }
コード例 #7
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void ShowCircuit_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 1D 06 00 00 88 96 1E 06 00 00") - 6;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x62a],0x1"),
                              a, false, false);
        }
コード例 #8
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void ShadowDodge_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "00 00 88 96 33 05 00 00 88 96 A9 05 00 00") - 4;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x532],0x1"),
                              a, false, false);
        }
コード例 #9
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void SlimeGunBurn_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "8b 85 b8 f3 ff ff 89 45 cc 8b 45 cc 40") - 0x1a;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esp+8],216000\nmov edx,0x99"),
                              a, false, false);
        }
コード例 #10
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void RulerEffect_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 F8 05 00 00 88 96 F9 05 00 00") - 6;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x5f7],0x1"),
                              a, false, false);
        }
コード例 #11
0
ファイル: Utils.cs プロジェクト: Phyzait/QTRHacker
        public static void BonusTwoSlots_E(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext.Handle,
                "mov byte ptr [esi+0x5c0],0\nmov byte ptr [esi+0x514],0\nmov byte ptr [esi+0x5aa],0") - 6;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x140],2"),
                              a, false, false);
            byte[] bs = { 0x90, 0x90 };

            NativeFunctions.WriteProcessMemory(Context.HContext.Handle, a - 0x10, bs, bs.Length, 0);
        }
コード例 #12
0
    public override void Enable(GameContext ctx)
    {
        nuint a = ctx.GameModuleHelper["Terraria.Player", "GetItemGrabRange"];

        if (Read <byte>(ctx, a) == 0xE9)
        {
            return;
        }
        InlineHook.Hook(ctx.HContext, AssemblySnippet.FromASMCode(
                            "mov eax,1000\nret"),
                        new HookParameters(a, 4096, false, false));
        this.IsEnabled = true;
    }
コード例 #13
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void FastSpeed_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "D9 E8 D9 9E 28040000 88 96 5E060000");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x428],0x41A00000"),
                              a, false, false);
        }
コード例 #14
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void ShadowDodge_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 3B060000");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x63B],1"),
                              a, false, false);
        }
コード例 #15
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void ShowCircuit_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 8D070000 88 96 7E070000");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x78D],0x1"),
                              a, false, false);
        }
コード例 #16
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void GrabItemFarAway_E(GameContext Context)
        {
            int  a = Context.HContext.MainAddressHelper["Terraria.Player", "GetItemGrabRange"];
            byte d = 0;

            NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a, ref d, 1, 0);
            if (d == 0xE9)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov eax,1000\nret"),
                              a, false, false);
        }
コード例 #17
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void MachinicalRulerEffect_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 52070000 C6 86 53070000 01");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov byte ptr [esi+0x752],0x1"),
                              a, false, false);
        }
コード例 #18
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void BonusTwoSlots_E(GameContext Context)
        {
            int  a = Context.HContext.MainAddressHelper["Terraria.Player", "IsAValidEquipmentSlotForIteration"];
            byte d = 0;

            NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a, ref d, 1, 0);
            if (d == 0xE9)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov eax,1\nret"),
                              a, false, false);
        }
コード例 #19
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void LowGravity_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "88 96 C2070000 88 96 C3070000");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x7C2],1"),
                              a, false, false);
        }
コード例 #20
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void FastTileAndWallSpeed_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "D9 E8 D9 9E 30040000 D9 E8 D9 9E 34040000 88 96");

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x430],0x41200000"),
                              a, false, false);
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x434],0x41200000"),
                              a + 8, false, false);
        }
コード例 #21
0
    public override void Enable(GameContext ctx)
    {
        int   offA = GetOffset(ctx, "Terraria.Player", "slowFall");
        int   offB = GetOffset(ctx, "Terraria.Player", "findTreasure");
        nuint a    = Aobscan(
            ctx,
            $"88 96 {AobscanHelper.GetMByteCode(offA)} 88 96 {AobscanHelper.GetMByteCode(offB)}").FirstOrDefault();

        if (a == 0)
        {
            return;
        }
        InlineHook.Hook(ctx.HContext, AssemblySnippet.FromASMCode(
                            $"mov dword ptr [esi+{offA}],1"),
                        new HookParameters(a, 4096, false, false));
        this.IsEnabled = true;
    }
コード例 #22
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void GoldHoleDropsBag_E(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext.Handle,
                @"push 0
push 0
push 0x49
push 1
push 0
push 0
push 0
push 0") + 2 * 5;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esp+8],3332"),
                              a, false);
        }
コード例 #23
0
    public override void Enable(GameContext ctx)
    {
        int   offA = GetOffset(ctx, "Terraria.Player", "infoAccMechShowWires");
        int   offB = GetOffset(ctx, "Terraria.Player", "accJarOfSouls");
        nuint a    = Aobscan(
            ctx,
            $"88 96 {AobscanHelper.GetMByteCode(offA)} 88 96 {AobscanHelper.GetMByteCode(offB)}").FirstOrDefault();

        if (a == 0)
        {
            return;
        }
        InlineHook.Hook(ctx.HContext, AssemblySnippet.FromASMCode(
                            $"mov byte ptr [esi+{offA}],0x1"),
                        new HookParameters(a, 4096, false, false));
        this.IsEnabled = true;
    }
コード例 #24
0
    public override void Enable(GameContext ctx)
    {
        int   offA = GetOffset(ctx, "Terraria.Player", "moveSpeed");
        int   offB = GetOffset(ctx, "Terraria.Player", "boneArmor");
        nuint a    = Aobscan(
            ctx,
            $"D9 E8 D9 9E {AobscanHelper.GetMByteCode(offA)} 88 96 {AobscanHelper.GetMByteCode(offB)}").FirstOrDefault();

        if (a == 0)
        {
            return;
        }
        InlineHook.Hook(ctx.HContext, AssemblySnippet.FromASMCode(
                            $"mov dword ptr [esi+{offA}],0x41A00000"),
                        new HookParameters(a, 0x1000, false, false));
        this.IsEnabled = true;
    }
コード例 #25
0
ファイル: Utils.cs プロジェクト: BlentER/QTRHacker
        public static void FastTileSpeed_E(GameContext Context)
        {
            /*int a = (int)Context.HContext.MainAddressHelper.GetFunctionInstruction("Terraria.Player", "Update", 0x2CDD).EndAddress - 6;
             * int off = 0;
             * NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a + 2, ref off, 4, 0);
             * InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
             *      $"mov dword ptr [eax+{off}],0x3e800000"),
             *      a, false, false);*/
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                "d9 98 c8 03 00 00 8b 85 30 f0 ff ff d9");
            int off = 0;

            NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a + 2, ref off, 4, 0);
            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [eax+0x3c8],0x3e800000"),
                              a, false, false);
        }
コード例 #26
0
    public override void Enable(GameContext ctx)
    {
        nuint[] a = Aobscan(
            ctx,
            @"C7 ** ** ******** D9 07 D9 45 F0 DF F1 DD D8 7A").ToArray();
        if (!a.Any())
        {
            return;
        }
        InlineHook.Hook(ctx.HContext,
                        AssemblySnippet.FromASMCode(
                            @"mov dword ptr[ebp-0x10],0x3F800000
mov dword ptr[ebp-0x14],0x3F800000
mov dword ptr[ebp-0x18],0x3F800000"
                            ),
                        new HookParameters(a[0] + 7, 0x1000));
        this.IsEnabled = true;
    }
コード例 #27
0
ファイル: Utils.cs プロジェクト: Chihiro-xm/QTRHacker
        public static void HighLight_E(GameContext Context)
        {
            int a = AobscanHelper.Aobscan(
                Context.HContext.Handle,
                @"C7 ** ** ******** D9 07 D9 45 F0 DF F1 DD D8 7A", true);

            if (a <= 0)
            {
                return;
            }
            InlineHook.Inject(Context.HContext,
                              AssemblySnippet.FromASMCode(
                                  @"mov dword ptr[ebp-0x10],0x3F800000
mov dword ptr[ebp-0x14],0x3F800000
mov dword ptr[ebp-0x18],0x3F800000"
                                  ),
                              a + 7, false
                              );
        }
コード例 #28
0
        public static void BonusTwoSlots_D(GameContext Context)
        {
            int a = AobscanHelper.AobscanASM(
                Context.HContext,
                "mov byte ptr [esi+0x5c0],0\nmov byte ptr [esi+0x514],0\nmov byte ptr [esi+0x5aa],0") - 6;

            InlineHook.Inject(Context.HContext, AssemblySnippet.FromASMCode(
                                  "mov dword ptr [esi+0x140],2"),
                              a, false, false);

            int y = 0;

            NativeFunctions.ReadProcessMemory(Context.HContext.Handle, a + 1, ref y, 4, 0);
            y += a + 5;

            byte[] b = Assembler.Assemble("mov [esi+0x140],edx", 0);
            NativeFunctions.WriteProcessMemory(Context.HContext.Handle, a, b, b.Length, 0);
            InlineHook.FreeHook(Context.HContext, y);

            byte[] bs = { 0x74, 0x0c };

            NativeFunctions.WriteProcessMemory(Context.HContext.Handle, a - 0x10, bs, bs.Length, 0);
        }
コード例 #29
0
    public override void Enable(GameContext ctx)
    {
        nuint a = AobscanASM(
            ctx,
            @"push 0
push 0
push 0x49
push 1
push 0
push 0
push 0
push 0").FirstOrDefault();

        if (a == 0)
        {
            return;
        }
        a += 2 * 5;
        InlineHook.Hook(ctx.HContext,
                        AssemblySnippet.FromASMCode(
                            "mov dword ptr [esp+8],3332"),
                        new HookParameters(a, 4096, false, false));
        this.IsEnabled = true;
    }