SceSblPostSsMgr

module_start
Calls 2 subroutines:
 * init_qaftoken
 * init_utoken

init utoken
Reads tm0:utoken.dat.

Calls utoken_sm.self service 2 to decrypt SceUtoken buffer. The output is a 0x58 bytes buffer.

sceSblSpsfoMgrVerifyForDriver
Derived from _vshSblAuthMgrVerifySpsfo.

sceSblLicMgrGetExpireDateForDriver
Get activation data expire date.

If sceSblAIMgrIsToolDVT1ForDriver, 30/10/2011 8:00:00.

If sceSblAIMgrIsToolRev4ForDriver or TEST, expire_date = 0xFFFFFFFF.

If sceSblAIMgrIsToolDVT2ForDriver, 30/6/2012 8:00:00.

If sceSblAIMgrIsDEXForDriver and product_sub_code = 0xA, 0xB or 0xC, 31/3/2012 14:59:00.

sceSblPmMgrSetProductModeForDriver
Executes pm_sm.self commands 2, 3, 4, 5, 6, 7, 8, 9, 0xA.


 * If enable = 0, it calls pm_set(5). The console exits Manufacturing Mode.
 * If enable = 1, it calls pm_set(4). That console enters Manufacturing Mode.

sceSblPmMgrSetSdModeOffForDriver
Executes pm_sm.self commands 2, 3, 4, 5, 6, 7, 8, 9, 0xA.

If productMode != 0 (normal mode), it calls pm_set(7, use_new_ernie_protocol).

sceSblPmMgrGetProductModeFromNVSForDriver
Executes pm_sm.self command 1.

sceSblPmMgrAuthEtoIForDriver
Returns jig_auth(12). Returns an integer on success.

jig_auth:
 * On 0.990: executes pm_sm_sd.self commands 3 (gen_req_hello), 4 (gen_challenge), 5 (check_response), 6 (gen_req_result), 7 (check_result).
 * On 1.03-3.60: executes pm_sm_sd.self commands 9, 0xA.

sceSblPostSsMgrDecryptSealedkeyForDriver
is 0x50 bytes of data from sealedkey

this function:

verifies pfsSKKey header

decrypts aes_key(pfsSKKey__EncKey) and hmac_key(pfsSKKey__Secret) using sceSblSsEncryptWithPortabilityForDriver

verifies hmac256 value in

decrypts  into

sceSblPostSsMgrEncryptSealedkeyForDriver
is 0x50 bytes of data like in sealedkey

this function:

writes pfsSKKey header

decrypts aes_key(pfsSKKey__EncKey) and hmac_key(pfsSKKey__Secret) using sceSblSsEncryptWithPortabilityForDriver

randomly generates 0x10 bytes of IV with sceSblRngPseudoRandomNumberForDriver

randomly generates 0x10 bytes of secret with sceSblRngPseudoRandomNumberForDriver

encrypts the secret into

calculates hmac256 value into

sceSblPostSsMgrVerifyKeystoneForDriver
This function verifies magic in the header and HMAC of the keystone file

sceSblPostSsMgrVerifyKeystoneWithPasscodeForDriver
This function calls sceSblPostSsMgrVerifyKeystoneForDriver. Then also verifies HMAC of passcode.

sceSblUtMgrIsAllowComTestForDriver
Temp name was sceSblUtMgrIsUtokenProgramForDriver.

pseudo-code:

sceSblUtMgrUpdateUtokenForDriver
Executes utoken_sm command 1 to verify buffer, then writes the 0x800 bytes buffer to tm0:utoken/utoken.dat.

sceSblUtMgrResetUtokenFileForDriver
Writes blank 0x800 bytes to tm0:utoken/utoken.dat or removes it.

Exported to usermode by sceSblUtMgrResetUtokenFile.

sceSblUtMgrHasComTestFlagForDriver
Derived from vshSblUtMgrHasComTestFlag.

sceSblUtMgrHasStoreFlagForDriver
Derived from vshSblUtMgrHasStoreFlag.

sceSblUtMgrHasNpTestFlagForDriver
Derived from vshSblUtMgrHasNpTestFlag.

sceSblRtcMgrSetCpRtcForDriver
Set RTC in DevKit CP.

SceSblPostSsMgrForDriver_D8A2D465
Related to Activation file.

Returns true if a1 and a2 are identical to some values in memory.

SceSblPostSsMgrForDriver_2C463AF1
Used just before SceSblPostSsMgrForDriver_CB5436BD.

SceSblPostSsMgrForDriver_CB5436BD
Transforms? coredump key.

init
SceZlibForDriver_00561385: 0x00561385 SceZlibForDriver_05F712FE: 0x05F712FE SceZlibForDriver_0BDDF66A: 0x0BDDF66A SceZlibForDriver_0FA805A3: 0x0FA805A3 SceZlibForDriver_134E91EA: 0x134E91EA SceZlibForDriver_1C344E27: 0x1C344E27 SceZlibForDriver_1E135CC1: 0x1E135CC1 SceZlibForDriver_20A122F8: 0x20A122F8 SceZlibForDriver_211D25F5: 0x211D25F5 SceZlibForDriver_21A03034: 0x21A03034 SceZlibForDriver_25F28DA7: 0x25F28DA7 SceZlibForDriver_3252D28C: 0x3252D28C SceZlibForDriver_3370B9AD: 0x3370B9AD SceZlibForDriver_35E0108C: 0x35E0108C SceZlibForDriver_3B4466F4: 0x3B4466F4 SceZlibForDriver_3F33F55F: 0x3F33F55F SceZlibForDriver_408311E8: 0x408311E8 SceZlibForDriver_44DA19D2: 0x44DA19D2 SceZlibForDriver_4C27A382: 0x4C27A382 SceZlibForDriver_4CB63BCD: 0x4CB63BCD SceZlibForDriver_4EE6C080: 0x4EE6C080 SceZlibForDriver_517BC5F7: 0x517BC5F7 SceZlibForDriver_520CAA7F: 0x520CAA7F SceZlibForDriver_5377643A: 0x5377643A SceZlibForDriver_5492B3F2: 0x5492B3F2 SceZlibForDriver_5A0078D6: 0x5A0078D6 SceZlibForDriver_5B718E55: 0x5B718E55 SceZlibForDriver_67A085C4: 0x67A085C4 SceZlibForDriver_68CFEA45: 0x68CFEA45 SceZlibForDriver_6ED5B677: 0x6ED5B677 SceZlibForDriver_7048F14C: 0x7048F14C SceZlibForDriver_7993ADAB: 0x7993ADAB SceZlibForDriver_7B16DBD6: 0x7B16DBD6 SceZlibForDriver_7C40CC39: 0x7C40CC39 SceZlibForDriver_7E823337: 0x7E823337 SceZlibForDriver_81D0667B: 0x81D0667B SceZlibForDriver_82167CD9: 0x82167CD9 SceZlibForDriver_834CC4A2: 0x834CC4A2 SceZlibForDriver_86FF6C8B: 0x86FF6C8B SceZlibForDriver_89A13883: 0x89A13883 SceZlibForDriver_89B30588: 0x89B30588 SceZlibForDriver_9030BAE4: 0x9030BAE4 SceZlibForDriver_904AA7AE: 0x904AA7AE SceZlibForDriver_93168F72: 0x93168F72 SceZlibForDriver_938F34FA: 0x938F34FA SceZlibForDriver_98619620: 0x98619620 SceZlibForDriver_A1E7E8B3: 0xA1E7E8B3 SceZlibForDriver_A5D70E95: 0xA5D70E95 SceZlibForDriver_AC2F8437: 0xAC2F8437 SceZlibForDriver_AD23EEBB: 0xAD23EEBB SceZlibForDriver_B03E109B: 0xB03E109B SceZlibForDriver_BC022D38: 0xBC022D38 SceZlibForDriver_BE5CE88A: 0xBE5CE88A SceZlibForDriver_D4A85178: 0xD4A85178 SceZlibForDriver_D9BDC778: 0xD9BDC778 SceZlibForDriver_E0CE06C0: 0xE0CE06C0 SceZlibForDriver_E2DF5A8B: 0xE2DF5A8B SceZlibForDriver_E323828B: 0xE323828B SceZlibForDriver_E4F34A68: 0xE4F34A68 SceZlibForDriver_E6EB524C: 0xE6EB524C SceZlibForDriver_E859D60F: 0xE859D60F SceZlibForDriver_E94663DD: 0xE94663DD SceZlibForDriver_EEC6D267: 0xEEC6D267 SceZlibForDriver_F2D8FC1A: 0xF2D8FC1A

SceSblFwLoaderForDriver
See SceSblFwLoader.

sceSblPmMgrSetProductModeOffForUser
Calls sceSblPmMgrSetProductModeForDriver(0).

sceSblPmMgrGetProductModeForUser
Returns 0 on success.

Gets KBL Param using sceKernelSysrootGetKblParamForKernel.

result = ((int *)(pKblParam->boot_type_indicator_1) >> 2) & 1; // manufacturing mode flag

sceSblPmMgrGetProductModeFromNVS
Calls sceSblPmMgrGetProductModeFromNVSForDriver.

sceSblPmMgrAuthEtoI
Calls sceSblPmMgrAuthEtoIForDriver.

Returns an integer on success.

sceSblPmMgrGetCurrentMode
Returns 0 on success.

Gets KBL Param using sceKernelSysrootGetKblParamForKernel.

result = ((int *)(pKblParam->boot_type_indicator_1) >> 2) & 1; // manufacturing mode flag

sceSblRtcMgrGetCpSerialId
Calls sceDeci4pCpupGetCpSerialIdForDriver.

SceSblLicMgr
Functions related to afv file.

sceSblLicMgrActivateFromFs
Activates from ux0:/data/activate/.

sceSblLicMgrGetUsageTimeLimit
Uses sceSblSsMgrGetQAFlagsForKernel.

sceSblUtMgrUpdateUtoken
Calls sceSblUtMgrUpdateUtokenForDriver(buf, 0x800);.

sceSblUtMgrResetUtokenFile
Calls sceSblUtMgrResetUtokenFileForDriver.

sceSblUtMgrGetCurrentSecureTick
Calls sceRtcGetCurrentSecureTickForDriver then uses sceKernelMemcpyKernelToUserForDriver.