Esempio n. 1
0
        public void X86St_OnBeforeCall_DecrementStackRegister()
        {
            var arch  = new X86ArchitectureFlat32("x86-protected-32");
            var state = new X86State(arch);
            var esp   = CreateId(Registers.esp);

            state.SetRegister(Registers.esp, Constant.Word32(-4));
            state.OnProcedureEntered();
            var site = state.OnBeforeCall(esp, 4);

            Assert.AreEqual(4, site.SizeOfReturnAddressOnStack);
            Assert.AreEqual("0xFFFFFFFC", state.GetValue(esp).ToString());
        }