[XAM] Improve XamUserIsUnsafeProgrammingAllowed Stub

Co-Authored-By: Pipi86 <66808852+Pipi86@users.noreply.github.com>
This commit is contained in:
Adrian 2024-11-18 23:55:10 +00:00 committed by Radosław Gliński
parent 05ae4ac6e9
commit 3096bb87d4
1 changed files with 16 additions and 7 deletions

View File

@ -684,14 +684,23 @@ dword_result_t XamSessionRefObjByHandle_entry(dword_t handle,
} }
DECLARE_XAM_EXPORT1(XamSessionRefObjByHandle, kUserProfiles, kStub); DECLARE_XAM_EXPORT1(XamSessionRefObjByHandle, kUserProfiles, kStub);
dword_result_t XamUserIsUnsafeProgrammingAllowed_entry( dword_result_t XamUserIsUnsafeProgrammingAllowed_entry(dword_t user_index,
dword_t unk1, dword_t unk2, lpdword_t unk3, dword_t unk4, dword_t unk5, dword_t unk,
dword_t unk6) { lpdword_t result_ptr) {
if (!unk3 || unk1 != 255 && unk1 >= 4) { if (!result_ptr) {
return 87; return X_ERROR_INVALID_PARAMETER;
} }
*unk3 = 1;
return 0; if (user_index != XUserIndexAny && user_index >= XUserMaxUserCount) {
return X_ERROR_INVALID_PARAMETER;
}
// uint32_t result = XamUserCheckPrivilege_entry(user_index, 0xD4u,
// result_ptr);
*result_ptr = 1;
return X_ERROR_SUCCESS;
} }
DECLARE_XAM_EXPORT1(XamUserIsUnsafeProgrammingAllowed, kUserProfiles, kStub); DECLARE_XAM_EXPORT1(XamUserIsUnsafeProgrammingAllowed, kUserProfiles, kStub);