示例#1
0
/// Initialization of the decryption process
///
/// @param archive Archive
///
u32 CHimesyo::OnInitDecrypt(CArcFile* archive)
{
	const SFileInfo* file_info = archive->GetOpenFileInfo();
	LPCTSTR          file_ext = PathFindExtension(file_info->name);

	if (lstrcmp(file_ext, _T(".dll")) == 0 || file_info->name == _T("startup.tjs"))
	{
		// Files we don't decode
		SetDecryptRequirement(false);
		return 0;
	}

	// Size to decrypt
	if (lstrcmp(file_ext, _T(".ks"))  != 0 &&
	    lstrcmp(file_ext, _T(".tjs")) != 0 &&
	    lstrcmp(file_ext, _T(".asd")) != 0)
	{
		SetDecryptSize(256);
	}

	// Decryption key
	m_change_decrypt_key = 0;

	return file_info->key ^ 0x03020100 ^ 0xFFFFFFFF;
}
示例#2
0
/// Initialization of the decryption process
///
/// @param pclArc Archive
///
DWORD CFateFD::OnInitDecrypt(CArcFile* pclArc)
{
	SFileInfo* pstFileInfo = pclArc->GetOpenFileInfo();

	if (pstFileInfo->name == _T("fd_op01.mpg"))
	{
		// OP1

		m_abtKey[0] = 0xCE;
		m_abtKey[1] = 0x94;
		m_abtKey[2] = 0xB3;
		m_abtKey[3] = 0x94;
		m_abtKey[4] = 0xF8;
		m_abtKey[5] = 0x94;

		m_adwOffset[0] = 0;
		m_adwOffset[1] = 0xB6B - pstFileInfo->start;
		m_adwOffset[2] = 0x7036 - pstFileInfo->start;
		m_adwOffset[3] = 0x7037 - pstFileInfo->start;
		m_adwOffset[4] = 0xAF27 - pstFileInfo->start;
		m_adwOffset[5] = 0xAF28 - pstFileInfo->start;
	}
	else if (pstFileInfo->name == _T("fd_op02.mpg"))
	{
		// OP2

		m_abtKey[0] = 0x5A;
		m_abtKey[1] = 0x21;
		m_abtKey[2] = 0xFE;
		m_abtKey[3] = 0x21;
		m_abtKey[4] = 0xDB;
		m_abtKey[5] = 0x21;

		m_adwOffset[0] = 0;
		m_adwOffset[1] = 0x552036D - pstFileInfo->start;
		m_adwOffset[2] = 0x552254A - pstFileInfo->start;
		m_adwOffset[3] = 0x552254B - pstFileInfo->start;
		m_adwOffset[4] = 0x552CDF6 - pstFileInfo->start;
		m_adwOffset[5] = 0x552CDF7 - pstFileInfo->start;
	}
	else
	{
		// Other

		SetDecryptRequirement(FALSE);
	}

	return 0;
}
示例#3
0
/// Initialization of the decryption process
///
/// @param pclArc Archive
///
DWORD CHachukano::OnInitDecrypt(CArcFile* pclArc)
{
	SFileInfo* pstFileInfo = pclArc->GetOpenFileInfo();
	LPCTSTR pszFileExt = PathFindExtension(pstFileInfo->name);

	if ((lstrcmp(pszFileExt, _T(".dll")) == 0) || (pstFileInfo->name == _T("startup.tjs")))
	{
		// Files we don't decode
		SetDecryptRequirement(FALSE);
		return 0;
	}

	// Size to decrypt
	if ((lstrcmp(pszFileExt, _T(".ks")) != 0) && (lstrcmp(pszFileExt, _T(".tjs")) != 0) && (lstrcmp(pszFileExt, _T(".asd")) != 0))
	{
		SetDecryptSize(512);
	}

	// Decryption key
	m_dwChangeDecryptKey = 0;

	return (pstFileInfo->key ^ 0x03020100);
}