#include "stdafx.h"
#include <windows.h>
#pragma comment(linker,"/opt:nowin98")
typedef int (__stdcall *PFNMESSAGEBOX)(HWND, LPCTSTR,LPCTSTR,UINT);
int main(int argc, char* argv[])
{
HMODULE hMod = NULL;
PFNMESSAGEBOX lpfnMsgBox = NULL;
printf("SMC begin !\n");
__asm
{
_emit 'G' ;inc edi
_emit 'O' ;dec edi
_emit 'G'
_emit 'O'
_emit 'G'
_emit 'O'
}
if (NULL != (hMod = LoadLibrary("user32.dll")))
{
if (NULL != (lpfnMsgBox = (PFNMESSAGEBOX)GetProcAddress(hMod,"MessageBoxA")))
{
lpfnMsgBox(NULL,"Hi, this is SMC test !","-==-",MB_ICONINFORMATION);
}
else
{
printf("GetProcAddress failed!\n");
}
}
else
{
printf("LoadLibrary failed !\n");
}
__asm
{
_emit 'G'
_emit 'O'
_emit 'G'
_emit 'O'
_emit 'G'
_emit 'O'
}
printf("SMC end !\n");
return 0;
}
unsigned char data[66] = {
0x68, 0x78, 0x30, 0x40, 0x00, 0xFF, 0x15, 0x00, 0x20, 0x40, 0x00, 0x85, 0xC0, 0x74, 0x29, 0x68,
0x6C, 0x30, 0x40, 0x00, 0x50, 0xFF, 0x15, 0x04, 0x20, 0x40, 0x00, 0x85, 0xC0, 0x74, 0x12, 0x6A,
0x40, 0x68, 0x64, 0x30, 0x40, 0x00, 0x68, 0x4C, 0x30, 0x40, 0x00, 0x6A, 0x00, 0xFF, 0xD0, 0xEB,
0x11, 0x68, 0x34, 0x30, 0x40, 0x00, 0xEB, 0x05, 0x68, 0x1C, 0x30, 0x40, 0x00, 0xFF, 0xD6, 0x83,
0xC4, 0x04
};
unsigned char strKey[] = “Miczosoft.MSZ.9.0”;
void VigenereEncrypt(unsigned char *M, int length, unsigned char *C)
{
int i = 0;
int nLenKey = strlen(strKey);
for(;i<length;++i)
{
C[i] = (M[i] + strKey[i%nLenKey]) % 0x100;
}
}
void VigenereDecrypt(unsigned char *C, int length, unsigned char *M)
{
int i = 0;
int nLenKey = strlen(strKey);
for(;i<length;++i)
{
M[i] = (C[i] – strKey[i%nLenKey] + 0x100) % 0x100;
}
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课