Function at 0x401330
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 8], ebx
jne 0x40137b
cmp dword [0x412ec0], eax
je 0x401371
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x412ec4]
push str._nError:_code__d_while_opening_SC_Manager___Fatal_Error..._n
push eax
call fcn.00401ff5
add esp, 0xc
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0xf01ff
push 0x4112ec
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x4013c5
cmp dword [0x412ec0], eax
je 0x4013b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x412ec4]
push eax
push str._nWarning:_code__d_while_opening_Service_LUMDriver_n
push ecx
call fcn.00401ff5
add esp, 0xc
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
lea edx, [ebp - 0x28]
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40140f
cmp dword [0x412ec0], eax
je 0x4013f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x411330
mov eax, dword [0x412ec4]
push eax
call fcn.00401ff5
add esp, 0xc
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
call esi
pop esi
pop edi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x24], 3
jne 0x40144a
cmp dword [0x412ec0], 0
je 0x401432
mov ecx, dword [0x412ec4]
push str._nA_reboot_is_needed__n
push ecx
call fcn.00401ff5
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
call esi
pop esi
pop edi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0x40000000
push 3
push 0
push 3
push 0xc0000000
push str..LUMDriver
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401494
cmp dword [0x412ec0], 0
je 0x40148b
mov edx, dword [0x412ec4]
push str._nLUMDriver_not_Running_n
push edx
call fcn.00401ff5
add esp, 8
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
push 0x22e040
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
push esi
je 0x4014bb
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4014de
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x412ec0], 0
je 0x4014de
mov ecx, dword [0x412ec4]
push str._nLUMDriver___Fatal_Error_n
push ecx
call fcn.00401ff5
add esp, 8
lea edx, [ebp - 0x28]
push edx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40150c
cmp dword [0x412ec0], eax
je 0x4013f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nError:_code__d_while_Stopping_Service_LUMDriver___A_reboot_is_needed_in_order_to_upgrade_LUMDriver_n
jmp 0x4013e9
lea ecx, [ebp - 0x28]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x40153f
cmp dword [0x412ec0], eax
je 0x4013f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x412ec4]
push eax
push 0x411428
push edx
jmp 0x4013ef
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
cmp dword [ebp - 0x24], 3
mov esi, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
jne 0x4015b5
mov eax, 0xcccccccd
mul dword [ebp - 0x10]
shr edx, 3
cmp edx, 0x3e8
jae 0x40156f
mov edx, 0x3e8
jmp 0x40157c
cmp edx, 0x2710
jbe 0x40157c
mov edx, 0x2710
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x28]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4015b5
mov edx, dword [ebp - 4]
cmp dword [ebp - 0x14], edx
jbe 0x4015a6
call ebx
mov esi, eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], eax
jmp 0x4015af
call ebx
sub eax, esi
cmp eax, dword [ebp - 0x10]
ja 0x4015b5
cmp dword [ebp - 0x24], 3
je 0x401555
cmp dword [ebp - 0x24], 1
jne 0x4015f0
cmp dword [0x412ec0], 0
je 0x4015d8
mov ecx, dword [0x412ec4]
push str._nStop_LUMDriver_Service_completed_successfully_n
push ecx
call fcn.00401ff5
add esp, 8
mov edx, dword [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edx
call esi
push edi
call esi
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x412ec0], 0
je 0x40160c
mov eax, dword [0x412ec4]
push str._nUnable_to_Stop_LUMDriver_Service_n
push eax
call fcn.00401ff5
add esp, 8
mov ecx, dword [ebp - 8]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ecx
call esi
push edi
call esi
cmp dword [ebp - 0x24], 3
jne 0x401403
cmp dword [0x412ec0], 0
je 0x401642
mov edx, dword [0x412ec4]
push str._nReboot_is_needed__n
push edx
call fcn.00401ff5
add esp, 8
pop esi
pop edi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret