Example #1
0
        private void InitializeDivaMemory()
        {
            // FREE PLAY
            // MemoryManipulator.WriteByte(0x14066E878, 1);

            // skip DHCP timer
            if (MemoryManipulator.ReadInt32(NETWORK_COUNTER_CHECK_ADDRESS) == 1)
            {
                MemoryManipulator.WriteInt32(NETWORK_COUNTER_CHECK_ADDRESS, 2);
            }

            foreach (var emulator in emulatorComponents)
            {
                emulator.InitializeDivaMemory();
            }

            // sys_timer
            {
                const int SYS_TIMER_TIME = 39 * SYS_TIMER_TIME_FACTOR;
                MemoryManipulator.WriteInt32(GetSysTimerTimeAddress(), SYS_TIMER_TIME);

                // 0x00000001405C5143:  mov qword ptr [rsi+0B38h], 3600
                MemoryManipulator.WriteInt32(0x1405C514AL, SYS_TIMER_TIME);

                // 0x00000001405BDFBF:  dec dword ptr [rbx+0B38h]
                MemoryManipulator.Write(0x1405BDFBFL, Assembly.GetNopInstructions(6));

                // 0x00000001405C517A:  mov [rsi+0B38h], ecx
                MemoryManipulator.Write(0x1405C517AL, Assembly.GetNopInstructions(6));
            }
        }
Example #2
0
        private void InitializeDivaMemory()
        {
            foreach (var emulator in emulatorComponents)
            {
                emulator.InitializeDivaMemory();
            }

            // sys_timer
            {
                // 0x0000000140411F0F:  mov qword ptr [r12+8C8h], 3600
                MemoryManipulator.WriteInt32(0x140411F17L, 39 * 60);

                // 0x000000014040BEAF:  dec dword ptr [rbx+8C8h]
                MemoryManipulator.Write(0x14040BEAFL, Assembly.GetNopInstructions(6));

                // 0x0000000140407976:  mov [rcx+8C8h], eax
                MemoryManipulator.Write(0x140407976L, Assembly.GetNopInstructions(6));
            }
        }