Exemplo n.º 1
0
int __stdcall IDAP_init(void)
{
	//在这里做一些校验,以确保您的插件是被用在合适的环境里。
	//返回PLUGIN_SKIP 、PLUGIN_OK或者PLUGIN_KEEP,具体含义见后文
	char szTmpBuf[256] = {0};
	if(PLFM_ARM != ph.id)
	{
		return PLUGIN_SKIP;
	}
	GetModuleFileName(g_hInstance, szTmpBuf, sizeof(szTmpBuf));
	GetShortPathName(szTmpBuf, g_szReleasePath, sizeof(g_szReleasePath));
	*strrchr(g_szReleasePath, '\\') = 0;
#ifdef __EA64__
	strcat(g_szReleasePath, "\\as64.exe");
#else
	strcat(g_szReleasePath, "\\as.exe");
#endif
	if(INVALID_FILE_ATTRIBUTES == GetFileAttributes(g_szReleasePath))
	{
#ifdef __EA64__
		ReleaseRes(g_szReleasePath, IDR_AS64_EXE, "EXE");
#else
		ReleaseRes(g_szReleasePath, IDR_AS_EXE, "EXE");
#endif
	}
//	MessageBox(NULL, g_szReleasePath, NULL, 0);
	return PLUGIN_OK;
}
Exemplo n.º 2
0
AudioCap::AudioCap()
	: m_bitbuf(NULL), m_bitbufSize(0)
{
	struCapObj *pcapobj = new struCapObj();
	m_capobj = pcapobj;
	ReleaseRes();
}
Exemplo n.º 3
0
BOOL CSySkin::LoadDLLFromRes(UINT nRes_ID, CString strRes_Type)
{
	BOOL bRet = FALSE;
	bRet = ReleaseRes(nRes_ID, strRes_Type, m_strDLLPath);
	if ( bRet ) {
		return LoadDLLFromPath(m_strDLLPath);
	}
	return FALSE;
}
Exemplo n.º 4
0
BOOL CSySkin::LoadSkinFromRes(UINT nResID, LPCTSTR szResType)
{
	if ( nResID <= 0 || !szResType ) {
		return FALSE;
	}
	TCHAR szPath[MAX_PATH] = {0};
	_tcscat_s(szPath, MAX_PATH, m_szCurrPath);
	_tcscat_s(szPath, MAX_PATH, _T("\\Skin.skn"));
	if ( ReleaseRes(nResID, szResType, szPath) ) {
		return LoadSkinFromPath(szPath);
	}
	return TRUE;
}
Exemplo n.º 5
0
AudioCap::~AudioCap(void)
{
	ReleaseRes();

	if( m_bitbuf )
	{
		delete []m_bitbuf;
		m_bitbuf = NULL;
		m_bitbufSize = 0;
	}

	if( m_capobj )
	{
		delete g_CapObj(m_capobj);
		m_capobj = NULL;
	}
}
Exemplo n.º 6
0
void AudioCap::CloseAudio()
{
	//StopCap();
	ReleaseRes();
}
Exemplo n.º 7
0
void CMyDlg::crack()
{
	//获得文件路径
	getPath();
	if (strlen(path)==0) return;
	FILE *fp;
	if ((fp = fopen(path, "rb+")) == NULL)
	{
		MessageBoxW(0,error, title, MB_OK | MB_ICONWARNING);
		path[0]='\0';
		return;
	}
	if (!CopyFile(path, bakpath, 1))
	{
		if (MessageBoxW(0,L"备份文件已经存在,是否覆盖?建议选择否。", title, MB_YESNO | MB_ICONQUESTION |MB_DEFBUTTON2)==IDYES)
		{
			CopyFile(path, bakpath, 0);
		}
	}
	
	int key[] = {0xB8, 0x04, 0x40, 0x00,0x80, 0xEB, 0x0F};
	long filelen = 100000L;
	long feature=0;
	long point=0;
	int length=200;
	long *seek=(long *)malloc(length*sizeof(long));
	
	int i=0;
    int j=0;
	
	//建立索引 
	fseek(fp, 0L, 0);
	while (ftell(fp) < filelen )
	{
		if (fgetc(fp) == key[0]&&fgetc(fp) == key[1])
        {
            feature++;
            if (feature==length)
            {
                seek = (long *)realloc(seek, (length + 40) * sizeof(long));
				length+=40;
            }
            seek[feature]=ftell(fp);
        }
	}
	//根据索引查找 
	for (i=0;i<feature;i++)
	{
        fseek(fp, seek[i], 0);
        for(j=2; j<7;j++)
        {
			if(fgetc(fp)!=key[j]) break; 
        }
        if (j>6) point=ftell(fp);
    }
	if(point==0)
	{
		fclose(fp);
		MessageBoxW(0,L"读取文件时发生错误,您是否已经进行过破解操作?", title, MB_OK | MB_ICONWARNING);
		return;
	}
	fseek(fp, point, 0);
	//替换数据
	fputc(0xB8, fp);
	fputc(0x01, fp);
	fputc(0x00, fp);
	fputc(0x00, fp);
	fputc(0x00, fp);
	fputc(0x90, fp);
	fputc(0x90, fp);
	
	fclose(fp);
	//

	char dll[512];
	char reg[512];
	getPath();
	if (strlen(path)==0) return;
	strcpy(dll,path);
	dll[strlen(dll)-strlen(filepath)]='\0';
	strcat(dll,"\\ComDlls\\LinkSimulate.dll");
	ReleaseRes(dll,LinkSimulate,"DLL");
	wsprintf(reg,"/s \"%s\"",dll);
	ShellExecute(0, NULL,"regsvr32",reg, NULL, SW_SHOWNORMAL);

	MessageBoxW(0,success,title, MB_OK | MB_ICONINFORMATION);
}
Exemplo n.º 8
0
BOOL CSySkin::LoadSkinFromRes(UINT nRes_ID, CString strRes_Type)
{
	return ReleaseRes(nRes_ID, strRes_Type, m_strSkinPath);
}