Yeah, I already read about the 128-bit addition for NID randomizing before, but in theory if just the NIDs were known across the 3.70+ FWs, would that also work for UmdImageCreator to dump the PFI? Or do you specifically need the full name too? Since the SCSI command is known to be 0xAD, it should be possible to search backwards.
I just wrote a proof of concept script that can do exactly that
Edit 1: Just scanned and retrieved all ReadUMDStructure NIDs from firmwares 3.70-6.61 out of interest. This likely can work for other SCSI-like functions here too. But now the bigger question is - is it possible to easily get the current firmware number via software, or is that also behind a NID hashed function? (If it is possible, what format does it normally return? BCD? String?)
Edit 2: Well, I generated something. I can at least confirm the accuracy of my script for <3.70 and 6.60, so anything in-between is (probably) correct too. sceUmdExecReqSenseCmd() and sceUmdExecInquiryCmd() seem to actually never change their NIDs on any firmware, and always remain as 0x2CBE959B and 0x1B19A313 respectively. sceUmdManGetUmdDrive() also seems to always remain as 0x47E2B6D8.
If this is of any use to you - great! If not - it was a fun experiment for me, at least. Do note that not every function exists in every firmware revision, but I did confirm the asm portion of all these firmware revision groups are identical. Seems like the NIDs only change if the asm is different - could be the random 128-bit addition is some form of a hash of the asm data. (Unlikely)
// the PRX modules store each FW digit as its own byte
// e.g. FW 3.71 = 0x03070110 at 0x010F50 in umdman.prx
// so here it's converted to a short BCD value, 0x371
// fw >> 8 & 0xF | fw >> 12 & 0xF0 | fw >> 16 & 0xF00
short firmware = 0x660;
unsigned int sceUmdExecReqSenseCmd = 0x2CBE959B; // 0x03
unsigned int sceUmdExecInquiryCmd = 0x1B19A313; // 0x12
unsigned int sceUmdExecStartStopUnitCmd = 0; // 0x1B
unsigned int sceUmdExecPreventAllowMediaCmd = 0; // 0x1E
unsigned int sceUmdExecRead10Cmd = 0; // 0x28
unsigned int sceUmdExecSeekCmd = 0; // 0x2B
unsigned int sceUmdExecPrefetch10Cmd = 0; // 0x34
unsigned int sceUmdExecGetConfigurationCmd = 0; // 0x46
unsigned int sceUmdExecGetEventStatusCmd = 0; // 0x4A
unsigned int sceUmdExecReadDiscInfoCmd = 0; // 0x51
unsigned int sceUmdExecModSelectCmd = 0; // 0x55
unsigned int sceUmdExecModSenseCmd = 0; // 0x5A
unsigned int sceUmdExecReadUMDStructureCmd = 0; // 0xAD
unsigned int sceUmdExecMechaStatCmd = 0; // 0xBD
unsigned int sceUmdExecAllocateFromReadCmd = 0; // 0xF0
unsigned int sceUmdExecReadMKICmd = 0; // 0xF1
unsigned int sceUmdExecReportCacheCmd = 0; // 0xF2
unsigned int sceUmdExecClearCacheInfoCmd = 0; // 0xF3
unsigned int sceUmdExecGetMediaInfoCmd = 0; // 0xF4
unsigned int sceUmdExecSetAccessLimitCmd = 0; // 0xF6
unsigned int sceUmdExecSetLockLengthCmd = 0; // 0xF7
unsigned int sceUmdExecSetAreaLimitCmd = 0; // 0xF8
unsigned int sceUmdExecReadCapacityCmd = 0; // Any?
if (firmware < 0x370) {
// FW 1.00 - 3.60
sceUmdExecStartStopUnitCmd = 0xE3F448E0; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0x2A08FE9A; // 0x1E
sceUmdExecRead10Cmd = 0x1B1BF9FD; // 0x28
sceUmdExecSeekCmd = 0x250E6975; // 0x2B
sceUmdExecPrefetch10Cmd = 0x18DE1880; // 0x34
sceUmdExecGetConfigurationCmd = 0xC25D7212; // 0x46
sceUmdExecGetEventStatusCmd = 0x65E1B97E; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xD7A2F4A2; // 0x51
sceUmdExecModSelectCmd = 0xCEE55E3E; // 0x55
sceUmdExecModSenseCmd = 0x2A39569B; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x3D44BABF; // 0xAD
sceUmdExecMechaStatCmd = 0xE5B7EDC5; // 0xBD
sceUmdExecAllocateFromReadCmd = 0x68577709; // 0xF0
sceUmdExecReadMKICmd = 0xF819E17C; // 0xF1
sceUmdExecReportCacheCmd = 0x98345381; // 0xF2
sceUmdExecClearCacheInfoCmd = 0x73E49F8F; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x108B2322; // 0xF4
sceUmdExecSetAccessLimitCmd = 0x7094E3A7; // 0xF6
sceUmdExecSetLockLengthCmd = 0xD31DAD7E; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x61C32A52; // 0xF8
sceUmdExecReadCapacityCmd = 0x5AA96415; // Any?
}
else if (firmware < 0x380) {
// FW 3.70, 3.71, 3.72, 3.73
sceUmdExecStartStopUnitCmd = 0xD4132E08; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0xB629961F; // 0x1E
sceUmdExecRead10Cmd = 0x9E7564BC; // 0x28
sceUmdExecSeekCmd = 0xE8A768B5; // 0x2B
sceUmdExecPrefetch10Cmd = 0x9E722740; // 0x34
sceUmdExecGetConfigurationCmd = 0x607BF8CA; // 0x46
sceUmdExecGetEventStatusCmd = 0x84F3759A; // 0x4A
sceUmdExecReadDiscInfoCmd = 0x466839B7; // 0x51
sceUmdExecModSelectCmd = 0xDDB308E9; // 0x55
sceUmdExecModSenseCmd = 0x200810E8; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x3D94D00C; // 0xAD
sceUmdExecMechaStatCmd = 0x6CEDA538; // 0xBD
sceUmdExecAllocateFromReadCmd = 0x9EE39B6A; // 0xF0
sceUmdExecReadMKICmd = 0xB157769B; // 0xF1
sceUmdExecReportCacheCmd = 0x9D9848F2; // 0xF2
sceUmdExecClearCacheInfoCmd = 0x0933B6FB; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x92E6E273; // 0xF4
sceUmdExecSetAccessLimitCmd = 0xD5CC2085; // 0xF6
sceUmdExecSetLockLengthCmd = 0xB865CC4C; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x928C1752; // 0xF8
sceUmdExecReadCapacityCmd = 0x5CD9ACF5; // Any?
}
else if (firmware < 0x395) {
// FW 3.80, 3.90, 3.93
sceUmdExecStartStopUnitCmd = 0x62506AA0; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0x1B70C53F; // 0x1E
sceUmdExecRead10Cmd = 0x33072B62; // 0x28
sceUmdExecSeekCmd = 0x818506C1; // 0x2B
sceUmdExecPrefetch10Cmd = 0x8AF305CC; // 0x34
sceUmdExecGetConfigurationCmd = 0x3809B921; // 0x46
sceUmdExecGetEventStatusCmd = 0x5F37BD96; // 0x4A
sceUmdExecReadDiscInfoCmd = 0x3BF9BE3E; // 0x51
sceUmdExecModSelectCmd = 0xB6BCF945; // 0x55
sceUmdExecModSenseCmd = 0x05CF9760; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x2A12BF44; // 0xAD
sceUmdExecMechaStatCmd = 0xD1FFD521; // 0xBD
sceUmdExecAllocateFromReadCmd = 0xCEBDE68B; // 0xF0
sceUmdExecReadMKICmd = 0x350EEA2B; // 0xF1
sceUmdExecReportCacheCmd = 0xE7D62A27; // 0xF2
sceUmdExecClearCacheInfoCmd = 0xECAF10D9; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x81C55E67; // 0xF4
sceUmdExecSetAccessLimitCmd = 0x90746ECA; // 0xF6
sceUmdExecSetLockLengthCmd = 0xC945EE7E; // 0xF7
sceUmdExecSetAreaLimitCmd = 0xB9A0113D; // 0xF8
sceUmdExecReadCapacityCmd = 0x62473046; // Any?
}
else if (firmware < 0x420) {
// FW 3.95, 3.96, 4.00, 4.01, 4.05
sceUmdExecStartStopUnitCmd = 0x57436030; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0x9DAD4CC0; // 0x1E
sceUmdExecRead10Cmd = 0x74F29ED7; // 0x28
sceUmdExecSeekCmd = 0x14EAAA28; // 0x2B
sceUmdExecPrefetch10Cmd = 0x9ABD6DE1; // 0x34
sceUmdExecGetConfigurationCmd = 0xFE0D2641; // 0x46
sceUmdExecGetEventStatusCmd = 0xF8912660; // 0x4A
sceUmdExecReadDiscInfoCmd = 0x67D4D414; // 0x51
sceUmdExecModSelectCmd = 0xE90AEA97; // 0x55
sceUmdExecModSenseCmd = 0xCA2EA0FF; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x12BA4DDE; // 0xAD
sceUmdExecMechaStatCmd = 0x0925EE00; // 0xBD
sceUmdExecAllocateFromReadCmd = 0xD01B4969; // 0xF0
sceUmdExecReadMKICmd = 0x43FD7090; // 0xF1
sceUmdExecReportCacheCmd = 0x529635A7; // 0xF2
sceUmdExecClearCacheInfoCmd = 0x01B1AA7E; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x4461C19E; // 0xF4
sceUmdExecSetAccessLimitCmd = 0x3E6B9E50; // 0xF6
sceUmdExecSetLockLengthCmd = 0xADA614C2; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x376BFD4F; // 0xF8
sceUmdExecReadCapacityCmd = 0x965D8417; // Any?
}
else if (firmware < 0x500) {
// FW 4.20, 4.21
sceUmdExecStartStopUnitCmd = 0x0EE48C15; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0xBDE7298B; // 0x1E
sceUmdExecRead10Cmd = 0xEC3FDCEF; // 0x28
sceUmdExecSeekCmd = 0x9E2FB7DF; // 0x2B
sceUmdExecPrefetch10Cmd = 0x4F2B52DC; // 0x34
sceUmdExecGetConfigurationCmd = 0x251AD684; // 0x46
sceUmdExecGetEventStatusCmd = 0xA17129C2; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xB7CE4D74; // 0x51
sceUmdExecModSelectCmd = 0x2E730DEF; // 0x55
sceUmdExecModSenseCmd = 0x9430AFEF; // 0x5A
sceUmdExecReadUMDStructureCmd = 0xE006F0E9; // 0xAD
sceUmdExecMechaStatCmd = 0xBE559B33; // 0xBD
sceUmdExecAllocateFromReadCmd = 0x7A2B484B; // 0xF0
sceUmdExecReadMKICmd = 0xF9BBA21C; // 0xF1
sceUmdExecReportCacheCmd = 0x05FE3D00; // 0xF2
sceUmdExecClearCacheInfoCmd = 0xB88C1DF1; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x361B88FE; // 0xF4
sceUmdExecSetAccessLimitCmd = 0xCDB02062; // 0xF6
sceUmdExecSetLockLengthCmd = 0x1BDFD70C; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x531937DB; // 0xF8
sceUmdExecReadCapacityCmd = 0xB24480CB; // Any?
}
else if (firmware < 0x570) {
// FW 5.00, 5.01, 5.02, 5.03, 5.05, 5.50, 5.51, 5.55
sceUmdExecStartStopUnitCmd = 0x1B2B8759; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0x66B4CC78; // 0x1E
sceUmdExecRead10Cmd = 0x98D75CC0; // 0x28
sceUmdExecSeekCmd = 0xAEC4DA2C; // 0x2B
sceUmdExecPrefetch10Cmd = 0x1BE0124C; // 0x34
sceUmdExecGetConfigurationCmd = 0x19BCD653; // 0x46
sceUmdExecGetEventStatusCmd = 0xF2B1A490; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xBD102376; // 0x51
sceUmdExecModSelectCmd = 0x9FC2FD97; // 0x55
sceUmdExecModSenseCmd = 0x585F1728; // 0x5A
sceUmdExecReadUMDStructureCmd = 0xD4E51A75; // 0xAD
sceUmdExecMechaStatCmd = 0x8BDE7034; // 0xBD
sceUmdExecAllocateFromReadCmd = 0x32D89DA4; // 0xF0
sceUmdExecReadMKICmd = 0xF9C66D4A; // 0xF1
sceUmdExecReportCacheCmd = 0x7065FD6E; // 0xF2
sceUmdExecClearCacheInfoCmd = 0x1F0338FE; // 0xF3
sceUmdExecGetMediaInfoCmd = 0xBDF4842D; // 0xF4
sceUmdExecSetAccessLimitCmd = 0xFCA1A098; // 0xF6
sceUmdExecSetLockLengthCmd = 0xC7D14FBE; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x16588BAA; // 0xF8
sceUmdExecReadCapacityCmd = 0xDD017FFE; // Any?
}
else if (firmware < 0x600) {
// FW 5.70
sceUmdExecStartStopUnitCmd = 0x89AA72CD; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0xB6BE48A4; // 0x1E
sceUmdExecRead10Cmd = 0x6C0C6E60; // 0x28
sceUmdExecSeekCmd = 0x8AAE6940; // 0x2B
sceUmdExecPrefetch10Cmd = 0xB7089372; // 0x34
sceUmdExecGetConfigurationCmd = 0x62212597; // 0x46
sceUmdExecGetEventStatusCmd = 0x5361EBAF; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xF4B80F3C; // 0x51
sceUmdExecModSelectCmd = 0xFA124BD3; // 0x55
sceUmdExecModSenseCmd = 0xA50AD929; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x0D3372E8; // 0xAD
sceUmdExecMechaStatCmd = 0x8322DB90; // 0xBD
sceUmdExecAllocateFromReadCmd = 0xE2234907; // 0xF0
sceUmdExecReadMKICmd = 0x2DC746B5; // 0xF1
sceUmdExecReportCacheCmd = 0xE590AD02; // 0xF2
sceUmdExecClearCacheInfoCmd = 0x3C0ACB0D; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x468AC548; // 0xF4
sceUmdExecSetAccessLimitCmd = 0xA78D71C3; // 0xF6
sceUmdExecSetLockLengthCmd = 0x6236483E; // 0xF7
sceUmdExecSetAreaLimitCmd = 0x57BD4866; // 0xF8
sceUmdExecReadCapacityCmd = 0xBBEA87FB; // Any?
}
else if (firmware < 0x630) {
// FW 6.00, 6.10, 6.20
sceUmdExecStartStopUnitCmd = 0x5CF0DFAC; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0xCDA8E394; // 0x1E
sceUmdExecRead10Cmd = 0x319C9905; // 0x28
sceUmdExecSeekCmd = 0x849A4325; // 0x2B
sceUmdExecPrefetch10Cmd = 0x65FD0561; // 0x34
sceUmdExecGetEventStatusCmd = 0x48D85CEE; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xB87FA807; // 0x51
sceUmdExecModSelectCmd = 0x6B92F9E8; // 0x55
sceUmdExecModSenseCmd = 0x57E17255; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x806D66A7; // 0xAD
sceUmdExecAllocateFromReadCmd = 0xC54D7B8F; // 0xF0
sceUmdExecReadMKICmd = 0xD047DEBC; // 0xF1
sceUmdExecClearCacheInfoCmd = 0x04E5EFFA; // 0xF3
sceUmdExecGetMediaInfoCmd = 0xE2BAAD9C; // 0xF4
sceUmdExecSetLockLengthCmd = 0xBFDA8AC7; // 0xF7
sceUmdExecReadCapacityCmd = 0x2B79C006; // Any?
}
else if (firmware < 0x650) {
// FW 6.30, 6.31, 6.35, 6.36, 6.37, 6.38, 6.39
sceUmdExecStartStopUnitCmd = 0x7B9C43C9; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0xC9509423; // 0x1E
sceUmdExecRead10Cmd = 0x5B0F6FC6; // 0x28
sceUmdExecSeekCmd = 0x64AEDFB3; // 0x2B
sceUmdExecPrefetch10Cmd = 0xAE3F99E2; // 0x34
sceUmdExecGetEventStatusCmd = 0x5D7C8F9E; // 0x4A
sceUmdExecReadDiscInfoCmd = 0x717EF202; // 0x51
sceUmdExecModSelectCmd = 0x047BCEA0; // 0x55
sceUmdExecModSenseCmd = 0x03DE43F5; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x05C33243; // 0xAD
sceUmdExecAllocateFromReadCmd = 0xC447F257; // 0xF0
sceUmdExecReadMKICmd = 0x01EA806F; // 0xF1
sceUmdExecClearCacheInfoCmd = 0x87070DC7; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x8F628DAF; // 0xF4
sceUmdExecSetLockLengthCmd = 0xFC40080F; // 0xF7
sceUmdExecReadCapacityCmd = 0x5802953B; // Any?
}
//else if (firmware < 0x660) {} // FW 6.50 (UNRELEASED)
else {
// FW 6.60, 6.61
sceUmdExecStartStopUnitCmd = 0x5219AF31; // 0x1B
sceUmdExecPreventAllowMediaCmd = 0x5AC94A3C; // 0x1E
sceUmdExecRead10Cmd = 0xE3716915; // 0x28
sceUmdExecSeekCmd = 0xB01F65CE; // 0x2B
sceUmdExecPrefetch10Cmd = 0xC615D6C9; // 0x34
sceUmdExecGetEventStatusCmd = 0xBD974D70; // 0x4A
sceUmdExecReadDiscInfoCmd = 0xF861E69B; // 0x51
sceUmdExecModSelectCmd = 0x2C5F9A65; // 0x55
sceUmdExecModSenseCmd = 0xEB0841CE; // 0x5A
sceUmdExecReadUMDStructureCmd = 0x406E8F99; // 0xAD
sceUmdExecAllocateFromReadCmd = 0x8DA33BBD; // 0xF0
sceUmdExecReadMKICmd = 0x6D17FD57; // 0xF1
sceUmdExecClearCacheInfoCmd = 0x77E81350; // 0xF3
sceUmdExecGetMediaInfoCmd = 0x27C1869A; // 0xF4
sceUmdExecSetLockLengthCmd = 0xEEBF3121; // 0xF7
sceUmdExecReadCapacityCmd = 0xCC40BED8; // Any?
}