📄 vc.cpp
字号:
// vc.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
void MixCode();
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MixCode();
return 0;
}
void MixCode()
{
char* pMsg=NULL;
__asm{
jmp lbl_skipok;
_emit 0x68
_emit 0x65
_emit 0x6C
_emit 0x6C
_emit 0x6F
_emit 0x00
lbl_skipok:
call lbl_addr
lbl_addr:
pop eax //取得本行代码运行时的地址
mov pMsg,eax
}
pMsg -= (5+6); //5是call lbl_addr的指令长度
//6是hello字符串的长度
MessageBox(NULL,pMsg,0,MB_OK);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -