📄 pcidpprivate.cod
字号:
00001 8b ec mov ebp, esp
00003 53 push ebx
00004 56 push esi
; 122 :
; 123 : pLINKED_LIST FirstLink;
; 124 : pLINKED_LIST ReturnLink = NULL;
; 125 : KIRQL LListIrql;
; 126 :
; 127 : KeAcquireSpinLock(&ObjExt->LListSpin, &LListIrql);
00005 8b 75 08 mov esi, DWORD PTR _ObjExt$[ebp]
00008 57 push edi
00009 33 db xor ebx, ebx
0000b 8d 8e 80 00 00
00 lea ecx, DWORD PTR [esi+128]
00011 89 4d 08 mov DWORD PTR 8+[ebp], ecx
00014 ff 15 00 00 00
00 call DWORD PTR __imp_@KfAcquireSpinLock@4
; 128 : if(ObjExt->LLData.IsEmpty == FALSE) {
0001a 38 5e 74 cmp BYTE PTR [esi+116], bl
0001d 75 1d jne SHORT $L5946
; 129 : FirstLink = ObjExt->LLData.CurrentLink;
0001f 8b 7e 7c mov edi, DWORD PTR [esi+124]
; 130 : do{
; 131 : ObjExt->LLData.CurrentLink = ObjExt->LLData.CurrentLink->Next;
00022 8b 0f mov ecx, DWORD PTR [edi]
$L6008:
00024 89 4e 7c mov DWORD PTR [esi+124], ecx
; 132 : if(ObjExt->LLData.CurrentLink->Status == LL_AVAILABLE){
00027 80 79 08 03 cmp BYTE PTR [ecx+8], 3
0002b 74 08 je SHORT $L6005
; 135 :
; 136 : //ObjExt->MemoryBase[0x1C65]++; //debug
; 137 :
; 138 : break;
; 139 : }
; 140 : } while(FirstLink != ObjExt->LLData.CurrentLink);
0002d 3b f9 cmp edi, ecx
0002f 74 0b je SHORT $L5946
; 130 : do{
; 131 : ObjExt->LLData.CurrentLink = ObjExt->LLData.CurrentLink->Next;
00031 8b 09 mov ecx, DWORD PTR [ecx]
; 132 : if(ObjExt->LLData.CurrentLink->Status == LL_AVAILABLE){
00033 eb ef jmp SHORT $L6008
$L6005:
; 133 : ObjExt->LLData.CurrentLink->Status = LL_ACQUIRED;
00035 c6 41 08 01 mov BYTE PTR [ecx+8], 1
; 134 : ReturnLink = ObjExt->LLData.CurrentLink;
00039 8b 5e 7c mov ebx, DWORD PTR [esi+124]
$L5946:
; 141 : }
; 142 : KeReleaseSpinLock(&ObjExt->LListSpin, LListIrql);
0003c 8b 4d 08 mov ecx, DWORD PTR 8+[ebp]
0003f 8a d0 mov dl, al
00041 ff 15 00 00 00
00 call DWORD PTR __imp_@KfReleaseSpinLock@8
; 143 :
; 144 : if(ReturnLink == NULL){
00047 85 db test ebx, ebx
00049 75 18 jne SHORT $L5952
; 145 : ReturnLink = ExAllocatePool(NonPagedPool, sizeof(LINKED_LIST));
0004b 68 44 64 6b 20 push 543908932 ; 206b6444H
00050 6a 14 push 20 ; 00000014H
00052 53 push ebx
00053 ff 15 00 00 00
00 call DWORD PTR __imp__ExAllocatePoolWithTag@12
00059 8b d8 mov ebx, eax
; 146 : if(ReturnLink != NULL){
0005b 85 db test ebx, ebx
0005d 74 04 je SHORT $L5952
; 147 : ReturnLink->Status = LL_NEW;
0005f 80 63 08 00 and BYTE PTR [ebx+8], 0
$L5952:
00063 5f pop edi
; 148 :
; 149 : //ObjExt->MemoryBase[0x1C64]++; //debug
; 150 :
; 151 : }
; 152 : }
; 153 :
; 154 : return ReturnLink;
00064 8b c3 mov eax, ebx
00066 5e pop esi
00067 5b pop ebx
; 155 : }
00068 5d pop ebp
00069 c2 04 00 ret 4
_GetFreeEntry@4 ENDP
_TEXT ENDS
PUBLIC _InsertEntry@8
; COMDAT _InsertEntry@8
_TEXT SEGMENT
_ObjExt$ = 8
_Entry$ = 12
_InsertEntry@8 PROC NEAR ; COMDAT
; 158 : BOOLEAN InsertEntry(pPCIDP_EXTENSION ObjExt, pLINKED_LIST Entry){
00000 53 push ebx
00001 56 push esi
; 159 :
; 160 : BOOLEAN Status = TRUE;
; 161 : pLINKED_LIST CurrentLink;
; 162 : KIRQL LListIrql;
; 163 :
; 164 : KeAcquireSpinLock(&ObjExt->LListSpin, &LListIrql);
00002 8b 74 24 0c mov esi, DWORD PTR _ObjExt$[esp+4]
00006 57 push edi
00007 b3 01 mov bl, 1
00009 8d be 80 00 00
00 lea edi, DWORD PTR [esi+128]
0000f 8b cf mov ecx, edi
00011 ff 15 00 00 00
00 call DWORD PTR __imp_@KfAcquireSpinLock@4
; 165 : if(Entry->Status == LL_NEW){
00017 8b 4c 24 14 mov ecx, DWORD PTR _Entry$[esp+8]
0001b 8a d0 mov dl, al
0001d 8a 41 08 mov al, BYTE PTR [ecx+8]
00020 84 c0 test al, al
00022 75 31 jne SHORT $L5961
; 166 : Entry->Status = LL_INSERTED;
00024 c6 41 08 02 mov BYTE PTR [ecx+8], 2
; 167 : ObjExt->LLData.FreeMax++;
00028 66 ff 46 78 inc WORD PTR [esi+120]
; 168 : ObjExt->LLData.InsertedCount++;
0002c 66 ff 46 76 inc WORD PTR [esi+118]
; 169 : if(ObjExt->LLData.IsEmpty == TRUE) {
00030 38 5e 74 cmp BYTE PTR [esi+116], bl
00033 75 0d jne SHORT $L5962
; 170 : Entry->Prev = Entry;
00035 89 49 04 mov DWORD PTR [ecx+4], ecx
; 171 : Entry->Next = Entry;
00038 89 09 mov DWORD PTR [ecx], ecx
; 172 : ObjExt->LLData.CurrentLink = Entry;
; 173 : ObjExt->LLData.IsEmpty = FALSE;
0003a 20 46 74 and BYTE PTR [esi+116], al
0003d 89 4e 7c mov DWORD PTR [esi+124], ecx
; 174 :
; 175 : //ObjExt->MemoryBase[0x1C66]++; //debug
; 176 : }
; 177 : else {
00040 eb 23 jmp SHORT $L5966
$L5962:
; 178 : CurrentLink = ObjExt->LLData.CurrentLink;
00042 8b 76 7c mov esi, DWORD PTR [esi+124]
; 179 : Entry->Prev = CurrentLink;
00045 89 71 04 mov DWORD PTR [ecx+4], esi
; 180 : Entry->Next = CurrentLink->Next;
00048 8b 06 mov eax, DWORD PTR [esi]
0004a 89 01 mov DWORD PTR [ecx], eax
; 181 :
; 182 : CurrentLink->Next->Prev = Entry;
0004c 8b 06 mov eax, DWORD PTR [esi]
0004e 89 48 04 mov DWORD PTR [eax+4], ecx
; 183 : CurrentLink->Next = Entry;
00051 89 0e mov DWORD PTR [esi], ecx
; 184 :
; 185 : //ObjExt->MemoryBase[0x1C67]++; //debug
; 186 : }
; 187 : }
; 188 : else if(Entry->Status == LL_ACQUIRED){
00053 eb 10 jmp SHORT $L5966
$L5961:
00055 3c 01 cmp al, 1
00057 75 0a jne SHORT $L5965
; 189 : Entry->Status = LL_INSERTED;
00059 c6 41 08 02 mov BYTE PTR [ecx+8], 2
; 190 : ObjExt->LLData.InsertedCount++;
0005d 66 ff 46 76 inc WORD PTR [esi+118]
; 191 :
; 192 : //ObjExt->MemoryBase[0x1C68]++; //debug
; 193 : }
; 194 : else
00061 eb 02 jmp SHORT $L5966
$L5965:
; 195 : Status = FALSE;
00063 32 db xor bl, bl
$L5966:
; 196 :
; 197 : KeReleaseSpinLock(&ObjExt->LListSpin, LListIrql);
00065 8b cf mov ecx, edi
00067 ff 15 00 00 00
00 call DWORD PTR __imp_@KfReleaseSpinLock@8
0006d 5f pop edi
; 198 : //ObjExt->MemoryBase[0x1C5A] = ObjExt->LLData.FreeMax;//debug
; 199 : //ObjExt->MemoryBase[0x1C57] = ObjExt->LLData.InsertedCount;//debug
; 200 :
; 201 : return Status;
0006e 8a c3 mov al, bl
00070 5e pop esi
00071 5b pop ebx
; 202 : }
00072 c2 08 00 ret 8
_InsertEntry@8 ENDP
_TEXT ENDS
PUBLIC _DeleteAllEntries@4
EXTRN __imp__ExFreePool@4:NEAR
; COMDAT _DeleteAllEntries@4
_TEXT SEGMENT
_ObjExt$ = 8
_DeleteAllEntries@4 PROC NEAR ; COMDAT
; 205 : BOOLEAN DeleteAllEntries(pPCIDP_EXTENSION ObjExt){
00000 56 push esi
; 206 :
; 207 : pLINKED_LIST CurrentLink = ObjExt->LLData.CurrentLink;
00001 8b 74 24 08 mov esi, DWORD PTR _ObjExt$[esp]
00005 57 push edi
00006 8b 7e 7c mov edi, DWORD PTR [esi+124]
$L6015:
; 208 :
; 209 : while(ObjExt->LLData.IsEmpty == FALSE) {
00009 80 7e 74 00 cmp BYTE PTR [esi+116], 0
0000d 75 35 jne SHORT $L5973
; 210 :
; 211 : if(CurrentLink->Status == LL_INSERTED)
0000f 80 7f 08 02 cmp BYTE PTR [edi+8], 2
00013 75 04 jne SHORT $L5974
; 212 : ObjExt->LLData.InsertedCount--;
00015 66 ff 4e 76 dec WORD PTR [esi+118]
$L5974:
; 213 :
; 214 : if(CurrentLink->Next == CurrentLink) {
00019 8b 07 mov eax, DWORD PTR [edi]
0001b 3b c7 cmp eax, edi
0001d 75 06 jne SHORT $L5975
; 215 : ObjExt->LLData.IsEmpty = TRUE;
0001f c6 46 74 01 mov BYTE PTR [esi+116], 1
; 216 : }
; 217 : else {
00023 eb 10 jmp SHORT $L5976
$L5975:
; 218 : CurrentLink->Prev->Next = CurrentLink->Next;
00025 8b 4f 04 mov ecx, DWORD PTR [edi+4]
00028 89 01 mov DWORD PTR [ecx], eax
; 219 : CurrentLink->Next->Prev = CurrentLink->Prev;
0002a 8b 07 mov eax, DWORD PTR [edi]
0002c 8b 4f 04 mov ecx, DWORD PTR [edi+4]
0002f 89 48 04 mov DWORD PTR [eax+4], ecx
; 220 : CurrentLink = CurrentLink->Prev;
00032 8b 7f 04 mov edi, DWORD PTR [edi+4]
$L5976:
; 221 : }
; 222 : ObjExt->LLData.FreeMax--;
; 223 : //ObjExt->MemoryBase[0x1C5A] = ObjExt->LLData.FreeMax;//debug
; 224 : //ObjExt->MemoryBase[0x1C57] = ObjExt->LLData.InsertedCount;//debug
; 225 :
; 226 : ExFreePool(ObjExt->LLData.CurrentLink);
00035 ff 76 7c push DWORD PTR [esi+124]
00038 66 ff 4e 78 dec WORD PTR [esi+120]
0003c ff 15 00 00 00
00 call DWORD PTR __imp__ExFreePool@4
00042 eb c5 jmp SHORT $L6015
$L5973:
; 227 : }
; 228 :
; 229 : return(!ObjExt->LLData.IsEmpty);
00044 33 c0 xor eax, eax
00046 5f pop edi
00047 38 46 74 cmp BYTE PTR [esi+116], al
0004a 5e pop esi
0004b 0f 94 c0 sete al
; 230 : }
0004e c2 04 00 ret 4
_DeleteAllEntries@4 ENDP
_TEXT ENDS
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -