Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotate Attributes argument for SetVariable() when possible #102

Merged
merged 4 commits into from
Dec 7, 2024

Conversation

yeggor
Copy link
Collaborator

@yeggor yeggor commented Dec 7, 2024

Mostly we see such code where op_enum() does not help, because operand is not an immediate value:

mov r9d, X      ; DataSize
lea r8d, [r9+Y] ; Attributes (X + Y)

However, it will work when we encounter:

mov r8d, X      ; Attributes

In such cases we will get:

gRT->SetVariable(L"CheckUserPSW", &VendorGuid, VARIABLE_ATTRIBUTE_NV_BS_RT, DataSize, &Data);

instead of:

gRT->SetVariable(L"CheckUserPSW", &VendorGuid, 7u, DataSize, &Data);

Related PR: #99

@yeggor yeggor merged commit 1dd1ef7 into master Dec 7, 2024
3 checks passed
@yeggor yeggor deleted the feature/annotate-attributes branch December 7, 2024 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant