CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/Core/ELF/PrxDecrypter.h
Views: 1401
// Copyright (c) 2012- PPSSPP Project.12// This program is free software: you can redistribute it and/or modify3// it under the terms of the GNU General Public License as published by4// the Free Software Foundation, version 2.0.56// This program is distributed in the hope that it will be useful,7// but WITHOUT ANY WARRANTY; without even the implied warranty of8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9// GNU General Public License 2.0 for more details.1011// A copy of the GPL 2.0 should have been included with the program.12// If not, see http://www.gnu.org/licenses/1314// Official git repository and contact information can be found at15// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.1617#pragma once1819#include "Common/Common.h"20#include "Common/CommonTypes.h"2122#ifdef _MSC_VER23#pragma pack(push, 1)24#endif25typedef struct26{27u32_le signature; // 028u16_le attribute; // 4 modinfo29u16_le comp_attribute; // 630u8 module_ver_lo; // 831u8 module_ver_hi; // 932char modname[28]; // 0A33u8 version; // 2634u8 nsegments; // 2735u32_le elf_size; // 2836u32_le psp_size; // 2C37u32_le entry; // 3038u32_le modinfo_offset; // 3439s32_le bss_size; // 3840u16_le seg_align[4]; // 3C41u32_le seg_address[4]; // 4442s32_le seg_size[4]; // 5443u32_le reserved[5]; // 6444u32_le devkitversion; // 7845u32_le decrypt_mode; // 7C46u8 key_data0[0x30]; // 8047s32_le comp_size; // B048s32_le _80; // B449s32_le reserved2[2]; // B850u8 key_data1[0x10]; // C051u32_le tag; // D052u8 scheck[0x58]; // D453u32_le key_data2; // 12C54u32_le oe_tag; // 13055u8 key_data3[0x1C]; // 13456#ifdef _MSC_VER57} PSP_Header;58#else59} __attribute__((packed)) PSP_Header;60#endif6162#ifdef _MSC_VER63#pragma pack(pop)64#endif6566int pspDecryptPRX(const u8 *inbuf, u8 *outbuf, u32 size, const u8 *seed = nullptr);676869