Reputation: 2576
For example IDA Pro shows import table containing function CheckTokenMembership in library api-ms-win-security-base-l1-2-0
Checking MSDN info for API call https://msdn.microsoft.com/en-us/library/windows/desktop/aa376389(v=vs.85).aspx it says it is in advapi32.dll
However trying
bp advapi32!CheckTokenMembership
Results in error Couldn't resolve error at 'advapi32!CheckTokenMembership'
Upvotes: 1
Views: 1818
Reputation: 573
I verified on a crash dump file that advapi32.dll exports the CheckTokenMembership function, so setting a breakpoint should be possible. It's likely in your scenario the module has not yet been loaded, so how about trying 'bu' instead? From WinDbg help:
76b51ca2 advapi32!CheckTokenMembership ()
Upvotes: 0
Reputation: 101666
CheckTokenMembership
is and always will be exported by advapi32.dll. The problem is that WinDbg uses the symbol name if you have symbols for said module.
What I would do is type bp ADVAPI32!CheckTokenMembership
and then press Tab and you should end up with bp ADVAPI32!CheckTokenMembershipStub
. This trick does not work for everything, sometimes you have to figure out the forward yourself or take a peek at the ntdll.dll and kernelbase.dll exports.
api- files do not contain code, they are just a layering exercise that Microsoft is forcing on everyone for some reason. I believe they are a result of the MinWin experiment and they might possibly some day contain code but even then kernel32 and friends will still have forwarders to maintain compatibility so there is no reason for anyone outside Microsoft to use the api- files (IMHO).
Upvotes: 2