binaryninja-api
binaryninja-api copied to clipboard
Some shortcomings in windows kernel support related to function prototypes
Functions listed below does not have prototype (I guess there are others I'm not able to notice):
- towupper
- strchr
- _vsnprintf
- wcsstr
- strstr
- ExInterlockedInsertHeadList
- ExInterlockedRemoveHeadList
- RtlFreeAnsiString
- RtlUnicodeStringToAnsiString
- Functions those starts with BCrypt*, InitSecurityInterfaceW
- ExDeleteNPagedLookasideList
- ExDeletePagedLookasideList
- ExInitializeNPagedLookasideList
- ExInitializePagedLookasideList
- WskDeregister, WskReleaseProviderNPI, WskCaptureProviderNPI, WskRegister
There are also undocumented functions. Some of them are well known so I guess we can at least have prototype for them:
- PsGetProcessImageFileName
- ZwQueryInformationProcess
- ZwQueryInformationThread
- PsGetProcessSessionId
- ObReferenceObjectByName
- ZwOpenThread
- ExfUnblockPushLock
- PsReferenceProcessFilePointer
- PsGetProcessWow64Process
- PsIsProcessBeingDebugged
- RtlImageNtHeaderEx
- ZwQuerySection
Functions that does not have correct types:
- ExGetPreviousMode. Should return
KPROCESSOR_MODEinstead ofchar. (Even ifKPROCESSOR_MODEis just a typedef forchar) - KeAcquireSpinLockRaiseToDpc. Should return
KIRQLinstead ofuint64_t. Also it should takePKSPIN_LOCKas parameter, notvoid*. - KeReleaseSpinLock. Should take
PKSPIN_LOCKandKIRQLas parameter. - KeAcquireSpinLockAtDpcLevel, KeReleaseSpinLockFromDpcLevel, ExAcquireSpinLockExclusive, ExAcquireSpinLockShared
- FltDeletePushLock, FltAcquirePushLockSharedEx, FltAcquirePushLockExclusiveEx
- KeGetCurrentIrql
- KeQueryPerformanceCounter
There are also some other variables that does not have correct type:
- PsProcessType
- PsInitialSystemProcess
- LpcPortObjectType
- PsThreadType
Related to https://github.com/Vector35/binaryninja-api/issues/4829