Beispiel #1
0
static void read_self_header(void)
{
	flags    =    be16(ptr + 0x08);
	meta_offset = be32(ptr + 0x0c);
	header_len =  be64(ptr + 0x10);
	filesize =    be64(ptr + 0x18);
	info_offset = be64(ptr + 0x28);

	app_type =    be32(ptr + info_offset + 0x0c);

	klist = self_load_keys();
}
Beispiel #2
0
static void read_self_header(u8* ptr, fileinfo* info)
{
	info->flags    =    be16(ptr + 0x08);
	info->meta_offset = be32(ptr + 0x0c);
	info->header_len =  be64(ptr + 0x10);
	info->filesize =    be64(ptr + 0x18);
	info->info_offset = be64(ptr + 0x28);

	info->app_type =    be32(ptr + info->info_offset + 0x0c);

	klist = self_load_keys(info);
}
Beispiel #3
0
static void self_decrypt(void)
{
	struct keylist *klist;

	klist = self_load_keys();
	if (klist == NULL)
		fail("no key found");

	if (sce_decrypt_header(self, klist) < 0)
		fail("self_decrypt_header failed");

	if (sce_decrypt_data(self) < 0)
		fail("self_decrypt_data failed");
}