mirror of
https://github.com/ReneLergner/WPinternals.git
synced 2026-06-14 03:16:40 +10:00
RKH: Fix an issue retrieving modern day RKH
This commit is contained in:
@@ -109,6 +109,10 @@ namespace WPinternals
|
|||||||
{
|
{
|
||||||
ImageOffset = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X00);
|
ImageOffset = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X00);
|
||||||
}
|
}
|
||||||
|
else if (ByteOperations.ReadUInt32(Binary, ImageOffset + 0x04) > 0x03)
|
||||||
|
{
|
||||||
|
ImageOffset += 0xA8;
|
||||||
|
}
|
||||||
else if (HeaderType == QualcommPartitionHeaderType.Short)
|
else if (HeaderType == QualcommPartitionHeaderType.Short)
|
||||||
{
|
{
|
||||||
ImageOffset += 0x28;
|
ImageOffset += 0x28;
|
||||||
@@ -122,11 +126,20 @@ namespace WPinternals
|
|||||||
ImageSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X08);
|
ImageSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X08);
|
||||||
CodeSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X0C);
|
CodeSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X0C);
|
||||||
SignatureAddress = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X10);
|
SignatureAddress = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X10);
|
||||||
|
if (SignatureAddress == 0xFFFFFFFF)
|
||||||
|
{
|
||||||
|
SignatureAddress = ImageAddress + CodeSize;
|
||||||
|
}
|
||||||
SignatureSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X14);
|
SignatureSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X14);
|
||||||
SignatureOffset = SignatureAddress - ImageAddress + ImageOffset;
|
SignatureOffset = SignatureAddress - ImageAddress + ImageOffset;
|
||||||
CertificatesAddress = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X18);
|
CertificatesAddress = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X18);
|
||||||
|
if (CertificatesAddress == 0xFFFFFFFF)
|
||||||
|
{
|
||||||
|
CertificatesAddress = SignatureAddress + SignatureSize;
|
||||||
|
}
|
||||||
CertificatesSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X1C);
|
CertificatesSize = ByteOperations.ReadUInt32(Binary, HeaderOffset + 0X1C);
|
||||||
CertificatesOffset = CertificatesAddress - ImageAddress + ImageOffset;
|
//CertificatesOffset = CertificatesAddress - ImageAddress + ImageOffset;
|
||||||
|
CertificatesOffset = ImageSize - CertificatesSize + ImageOffset;
|
||||||
|
|
||||||
uint CurrentCertificateOffset = CertificatesOffset;
|
uint CurrentCertificateOffset = CertificatesOffset;
|
||||||
uint CertificateSize = 0;
|
uint CertificateSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user