CPU 在应用程序一开始就注册状态。 PE可执行文件

CPU registers state on the very start of the app. PE executables

平台:Windows XP,普通 PE 文件
什么定义 CPU 在应用程序一开始就注册初始值? 在下面的屏幕截图中,OllyDbg 在应用程序入口点停止。但是 CPU 寄存器已经有一些值(EDX == KiFastSystemCallReg?),PF/ZF==1,堆栈也不为空(SEH 链?)。

这是否意味着在我们到达应用程序入口点之前 运行 有什么东西?这是什么?

offsets pertain to x86 xp sp3 for other os lookup the CONTEXT structure in winnt.h / ntddk.h

ctrl+g ->type ntdll.ZwContinue->ok->F2->重启exe

ollydbg 将在 ZwContinue -> alt+f1 打开命令行插件类型 按照 [[esp+4]+b8] -> ok -> f2->f9 你会看到一个空白的堆栈单步,看看现在谁填满了堆栈

ZwContinue 有 2 个参数,第一个参数是指向 CONTEXT 结构的指针,whose memeber eip 从 Structure 开始位于 0xb8 此 eip 将是 BaseProcessStartThunk 这是负责填充初始结构化异常处理程序的函数并调用 Module EntryPoint