Example #1
0
        static public void Home()
        {
            Int32 IsOpen = gMrw.readInt32(baseAddr.dwBase_Character, 0x918);
            Int32 _base  = gMrw.readInt32(baseAddr.dwBase_Character, baseAddr.dwOffset_Equip_wq + 0x10);

            if (_base == 0)
            {
                MessageBox.Show("必须穿戴腰带");
                return;
            }

            if (IsOpen == 0)
            {
                fun.EncryptionCall(_base + 0x000009B0, 1000);
                fun.EncryptionCall(_base + 0x000009B8, 1000);
                fun.EncryptionCall(_base + 0x000009C0, 1000);
                wd = gMrw.readInt32(baseAddr.dwBase_Character, 0xA08);

                gMrw.writeInt32(gMrw.readInt32(baseAddr.dwBase_Character) + 0x91C, 1);
                gMrw.writeInt32(gMrw.readInt32(baseAddr.dwBase_Character) + 0xA08, 1);
            }
            else
            {
                fun.EncryptionCall(_base + 0x000009B0, 0);
                fun.EncryptionCall(_base + 0x000009B8, 0);
                fun.EncryptionCall(_base + 0x000009C0, 0);

                gMrw.writeInt32(gMrw.readInt32(baseAddr.dwBase_Character) + 0x91C, 0);
                gMrw.writeInt32(gMrw.readInt32(baseAddr.dwBase_Character) + 0xA08, wd);
            }
        }
Example #2
0
        public void Asm_SetTimer(Action <string> writeLogLine)
        {
            writeLogLine("VirtualAddr = " + Convert.ToString(virtualAddr, 16));
            gMrw.writeInt32(virtualAddr + 0x990, virtualAddr + 0x9A0);
            gMrw.writeInt8(virtualAddr + 0x9A0, 0xC3);
            Int32 hWnd     = (Int32)FindWindow("地下城与勇士", "地下城与勇士");
            Int32 procAddr = virtualAddr + 0xF00;

            clear();
            //mov_addr_XXX(virtualAddr,virtualAddr + 0x1900);
            call_addr(virtualAddr + 0x990);
            writeInt8(0xC3);

            Int32 m = 0;

            foreach (Byte a in Code)
            {
                gMrw.writeInt8((procAddr + m++), a);
            }
            setEvent();


            clear();

            pushad();
            push(0x100);
            push(hWnd);
            mov_eax(KillTimer);
            call_eax();

            push(procAddr);
            push(0x1);
            push(0x100);
            push(hWnd);
            mov_eax(SetTimer);
            call_eax();
            popad();
            retn();
            RunRemoteThread();

            clear();
            gMrw.writeInt32(virtualAddr + 0x500, 1701667143);
            gMrw.writeInt32(virtualAddr + 0x504, 1935896658);
            gMrw.writeInt32(virtualAddr + 0x508, 1819042862);
            gMrw.writeInt32(virtualAddr + 0x50C, 0);
            pushad();
            push(virtualAddr + 0x500);
            mov_eax(MyGetModuleHandleA);
            call_eax();
            mov_xxx_eax(virtualAddr + 0x500);
            popad();
            retn();
            RunRemoteThread();
            while (gMrw.readInt32(virtualAddr + 0x500) == 1701667143)
            {
                Thread.Sleep(0);
            }
        }