0040288E |. 85C0 test eax, eax
00402890 |. 74 09 je short Sector_E.0040289B
00402892 |. 8D8E 1C010000 lea ecx, dword ptr ds:[esi+11C]
00402898 |. 51 push ecx
00402899 |. FFD0 call eax
0040289B |> 68 3F000F00 push 0F003F
004028A0 |. 6A 00 push 0
004028A2 |. 6A 00 push 0
004028A4 |. FF15 10F04000 call dword ptr ds:[<&ADVAPI32.OpenSCManagerA>] ; ADVAPI32.OpenSCManagerA
004028AA |. 8BF8 mov edi, eax
004028AC |. 85FF test edi, edi
004028AE |. 75 2C jnz short Sector_E.004028DC
004028B0 |. FF15 80F04000 call dword ptr ds:[<&KERNEL32.GetLastError>] ; [GetLastError
004028B6 |. 8BE8 mov ebp, eax
004028B8 |. 8D5424 10 lea edx, dword ptr ss:[esp+10]
004028BC |. 55 push ebp ; /<%ld>
004028BD |. 68 0C334100 push Sector_E.0041330C ; |format = "[SectorEditor] ManageDriver() -> OpenSCManager() failed, ErrCode: %ld"
004028C2 |. 52 push edx ; |s
004028C3 |. FF15 50F54000 call dword ptr ds:[<&MSVCRT.sprintf>] ; \sprintf
004028C9 |. 83C4 0C add esp, 0C
004028CC |. 8D4424 10 lea eax, dword ptr ss:[esp+10]
004028D0 |. 50 push eax ; /String
004028D1 |. FF15 88F04000 call dword ptr ds:[<&KERNEL32.OutputDebugStringA>] ; \OutputDebugStringA
004028D7 |. E9 B5000000 jmp Sector_E.00402991
004028DC |> 8B8424 20010000 mov eax, dword ptr ss:[esp+120]
004028E3 |. 25 FFFF0000 and eax, 0FFFF
004028E8 |. 48 dec eax ; Switch (cases 1..2)
004028E9 |. 74 2C je short Sector_E.00402917
004028EB |. 48 dec eax
004028EC |. 74 0A je short Sector_E.004028F8
004028EE |. BD 0C000000 mov ebp, 0C
004028F3 |. E9 92000000 jmp Sector_E.0040298A
004028F8 |> 53 push ebx ; Case 2 of switch 004028E8
004028F9 |. 57 push edi
004028FA |. 8BCE mov ecx, esi
004028FC |. E8 1F020000 call Sector_E.00402B20
00402901 |. 53 push ebx
00402902 |. 57 push edi
00402903 |. 8BCE mov ecx, esi
00402905 |. E8 46010000 call Sector_E.00402A50
0040290A |. 8B46 14 mov eax, dword ptr ds:[esi+14]
0040290D |. 85C0 test eax, eax
0040290F |. 74 79 je short Sector_E.0040298A
00402911 |. C640 04 00 mov byte ptr ds:[eax+4], 0
00402915 |. EB 73 jmp short Sector_E.0040298A
00402917 |> 8B8C24 1C010000 mov ecx, dword ptr ss:[esp+11C] ; Case 1 of switch 004028E8
0040291E |. 51 push ecx
0040291F |. 53 push ebx
00402920 |. 57 push edi
00402921 |. 8BCE mov ecx, esi
00402923 |. E8 D8000000 call Sector_E.00402A00
00402928 |. 8BE8 mov ebp, eax
0040292A |. 85ED test ebp, ebp
0040292C |. 75 30 jnz short Sector_E.0040295E
0040292E |. 53 push ebx
0040292F |. 57 push edi
00402930 |. 8BCE mov ecx, esi
00402932 |. E8 69010000 call Sector_E.00402AA0
004029FF 90 nop
00402A00 /$ 8B4424 0C mov eax, dword ptr ss:[esp+C]
00402A04 |. 6A 00 push 0 ; /Password = NULL
00402A06 |. 6A 00 push 0 ; |ServiceStartName = NULL
00402A08 |. 6A 00 push 0 ; |pDependencies = NULL
00402A0A |. 8B4C24 10 mov ecx, dword ptr ss:[esp+10] ; |
00402A0E |. 6A 00 push 0 ; |pTagId = NULL
00402A10 |. 6A 00 push 0 ; |LoadOrderGroup = NULL
00402A12 |. 50 push eax ; |BinaryPathName
00402A13 |. 8B4424 20 mov eax, dword ptr ss:[esp+20] ; |
00402A17 |. 6A 01 push 1 ; |ErrorControl = SERVICE_ERROR_NORMAL
00402A19 |. 6A 03 push 3 ; |StartType = SERVICE_DEMAND_START
00402A1B |. 6A 01 push 1 ; |ServiceType = SERVICE_KERNEL_DRIVER
00402A1D |. 68 FF010F00 push 0F01FF ; |DesiredAccess = SERVICE_ALL_ACCESS
00402A22 |. 50 push eax ; |DisplayName
00402A23 |. 50 push eax ; |ServiceName
00402A24 |. 51 push ecx ; |hManager
00402A25 |. FF15 0CF04000 call dword ptr ds:[<&ADVAPI32.CreateServiceA>] ; \CreateServiceA
00402A2B |. 85C0 test eax, eax
00402A9F 90 nop
00402AA0 /$ 8B4424 08 mov eax, dword ptr ss:[esp+8]
00402AA4 |. 8B4C24 04 mov ecx, dword ptr ss:[esp+4]
00402AA8 |. 56 push esi
00402AA9 |. 57 push edi
00402AAA |. 6A 10 push 10
00402AAC |. 50 push eax
00402AAD |. 51 push ecx
00402AAE |. 33FF xor edi, edi
00402AB0 |. FF15 04F04000 call dword ptr ds:[<&ADVAPI32.OpenServiceA>] ; ADVAPI32.OpenServiceA
00402AB6 |. 8BF0 mov esi, eax
00402AB8 |. 85F6 test esi, esi
00402ABA |. 75 1A jnz short Sector_E.00402AD6
00402ABC |. FF15 80F04000 call dword ptr ds:[<&KERNEL32.GetLastError>] ; [GetLastError
00402AC2 |. 68 8C334100 push Sector_E.0041338C ; /String = "[SectorEditor] StartDriver() -> OpenService() failed."
00402AC7 |. 8BF0 mov esi, eax ; |
00402AC9 |. FF15 88F04000 call dword ptr ds:[<&KERNEL32.OutputDebugStringA>] ; \OutputDebugStringA
00402ACF |. 8BC6 mov eax, esi
00402AD1 |. 5F pop edi
00402AD2 |. 5E pop esi
00402AD3 |. C2 0800 ret 8
00402AD6 |> 6A 00 push 0
00402AD8 |. 6A 00 push 0
00402ADA |. 56 push esi
00402ADB |. FF15 00F04000 call dword ptr ds:[<&ADVAPI32.StartServiceA>] ; ADVAPI32.StartServiceA
00402AE1 |. 85C0 test eax, eax
00402AE3 |. 75 2B jnz short Sector_E.00402B10
00402AE5 |. FF15 80F04000 call dword ptr ds:[<&KERNEL32.GetLastError>] ; [GetLastError
00402AEB |. 8BF8 mov edi, eax
00402AED |. 81FF 20040000 cmp edi, 420
00402AF3 |. 75 10 jnz short Sector_E.00402B05
00402AF5 |. 56 push esi
00402AF6 |. 33FF xor edi, edi
00402AF8 |. FF15 14F04000 call dword ptr ds:[<&ADVAPI32.CloseServiceHandle>] ; ADVAPI32.CloseServiceHandle
00402AFE |. 8BC7 mov eax, edi
00402B00 |. 5F pop edi
00402B01 |. 5E pop esi
00402B02 |. C2 0800 ret 8
00402B05 |> 68 54334100 push Sector_E.00413354 ; /String = "[SectorEditor] StartDriver() -> StartService() failed."
00402B0A |. FF15 88F04000 call dword ptr ds:[<&KERNEL32.OutputDebugStringA>] ; \OutputDebugStringA
00402B10 |> 56 push esi
00402B11 |. FF15 14F04000 call dword ptr ds:[<&ADVAPI32.CloseServiceHandle>] ; ADVAPI32.CloseServiceHandle
00402B17 |. 8BC7 mov eax, edi
00402B19 |. 5F pop edi
00402B1A |. 5E pop esi
00402B1B \. C2 0800 ret 8
00402B1E 90 nop
这就是它用驱动进入ring0的代码,没什么奇怪的,正像楼上说的,进了核心,大家都是一个起跑线,呵呵