Function at 0x45efdc
Capabilities:
Check os version
Modify service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5324ec
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x22d0
call fcn.004e52a0
mov eax, dword [0x5e1390]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 2
pop ebx
lea eax, [ebp - 0x21a0]
mov dword [ebp - 0x21a0], 0x114
push eax
mov esi, ebx
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
mov eax, dword [ebp - 0x219c]
je 0x45f03d
cmp eax, 6
ja 0x45f04b
cmp eax, 6
jne 0x45f04e
cmp dword [ebp - 0x2198], 1
jb 0x45f04e
push 3
pop esi
mov dword [ebp - 0x2034], ebx
xor ebx, ebx
mov dword [ebp - 0x202c], esi
mov edi, ebx
mov esi, dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x2038], str.IKEEXT
mov dword [ebp - 0x2030], str.PolicyAgent
mov dword [ebp - 0x2028], str.RasMan
mov dword [ebp - 0x2024], 3
mov dword [ebp - 0x2020], str.TapiSrv
mov dword [ebp - 0x201c], 3
mov dword [ebp - 0x21b0], edi
cmp edi, 4
jae 0x45f712
push 1
push 3
lea ecx, [ebp - 0x22e0]
call fcn.004241d9
push SysReAllocString
push ebx
mov dword [ebp - 4], ebx
push ebx
mov dword [ebp - 0x21b4], ebx
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x21ac], eax
test eax, eax
jne 0x45f149
lea eax, [ebp - 0x22d0]
push str.OpenSCManager_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x45f12c
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x21cc]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x21cc]
push eax
call fcn.004fd5aa
mov ecx, dword [ebp + edi*8 - 0x2038]
push 5
push ecx
push eax
mov dword [ebp - 0x21a8], ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x21b4], edi
test edi, edi
jne 0x45f1f3
call esi
cmp eax, 0x424
jne 0x45f18d
lea ecx, [ebp - 0x22e0]
call fcn.00423023
or dword [ebp - 4], 0xffffffff
jmp 0x45f6e3
lea eax, [ebp - 0x22d0]
push str.OpenService_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 0x10
jb 0x45f1d7
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x21d8]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x21d8]
jmp 0x45f143
lea eax, [ebp - 0x21b8]
mov dword [ebp - 0x21b8], 0x2000
push eax
push 0x2000
lea eax, [ebp - 0x2018]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x45f281
lea eax, [ebp - 0x22d0]
push str.QueryServiceConfig_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x45f265
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x21e4]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x21e4]
jmp 0x45f143
lea eax, [ebp - 0x2084]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45f2f9
lea eax, [ebp - 0x22d0]
push str.QueryServiceStatus_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x45f2dd
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x21f0]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x21f0]
jmp 0x45f143
mov ecx, dword [ebp - 0x2014]
mov eax, dword [ebp - 0x21b0]
cmp ecx, 2
je 0x45f315
cmp dword [ebp + eax*8 - 0x2034], ecx
mov cl, 1
jne 0x45f317
mov cl, bl
mov eax, dword [ebp + eax*8 - 0x2034]
mov byte [ebp - 0x21a1], cl
mov dword [ebp - 0x21bc], eax
cmp eax, 2
jne 0x45f33a
cmp dword [ebp - 0x2080], 4
mov al, 1
jne 0x45f33c
mov al, bl
mov byte [ebp - 0x21a2], al
test cl, cl
jne 0x45f34e
test al, al
je 0x45f6c3
push dword [ebp - 0x21ac]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x21ac], eax
test eax, eax
jne 0x45f429
call esi
cmp eax, 5
jne 0x45f3c3
mov edx, dword [ebp - 0x21a8]
lea ecx, [ebp - 0x2068]
call fcn.004260d2
mov esi, eax
lea eax, [ebp - 0x22d0]
mov byte [ebp - 4], 6
push str.insufficient_privileges_to_configure_or_start_service
push eax
call fcn.004191b0
pop ecx
pop ecx
push esi
push eax
call fcn.00419526
pop ecx
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x2068]
mov byte [ebp - 4], 1
call fcn.00416721
jmp 0x45f3ef
lea eax, [ebp - 0x22d0]
push str.OpenSCManager_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 0x10
jb 0x45f40d
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x21fc]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x21fc]
jmp 0x45f143
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x16
push dword [ebp - 0x21a8]
push dword [ebp - 0x21ac]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
mov dword [ebp - 0x21b4], edi
test edi, edi
jne 0x45f4b6
lea eax, [ebp - 0x22d0]
push str.OpenService_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 8
cmp dword [eax + 0x14], 0x10
jb 0x45f49a
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x2208]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x2208]
jmp 0x45f143
cmp byte [ebp - 0x21a1], 0
je 0x45f545
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x21bc]
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x45f545
lea eax, [ebp - 0x22d0]
push str.ChangeServiceConfig_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 9
cmp dword [eax + 0x14], 0x10
jb 0x45f529
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x2214]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x2214]
jmp 0x45f143
cmp byte [ebp - 0x21a2], 0
je 0x45f6c3
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x45f5c5
lea eax, [ebp - 0x22d0]
push str.StartService_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 0xa
cmp dword [eax + 0x14], 0x10
jb 0x45f5a9
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x2220]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x2220]
jmp 0x45f143
mov eax, ebx
mov dword [ebp - 0x21a8], ebx
cmp eax, 0x14
jge 0x45f6c3
lea eax, [ebp - 0x2084]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x45f6ef
lea eax, [ebp - 0x22d0]
push str.QueryServiceStatus_failed__
push eax
call fcn.004191b0
pop ecx
pop ecx
mov edi, eax
call esi
push eax
mov ecx, edi
call fcn.004242a2
push 0x5adaa0
push eax
call fcn.004191b0
pop ecx
pop ecx
lea eax, [ebp - 0x2050]
push eax
lea ecx, [ebp - 0x22e0]
call fcn.0042418e
mov byte [ebp - 4], 0xb
cmp dword [eax + 0x14], 0x10
jb 0x45f636
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x222c]
call fcn.0040e6bb
push 0x5de0f0
lea eax, [ebp - 0x222c]
jmp 0x45f143
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push dword [ebp - 0x21ac]
call edi
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x22e0]
call fcn.00423023
mov edi, dword [ebp - 0x21b0]
inc edi
jmp 0x45f0a0
cmp dword [ebp - 0x2080], 2
jne 0x45f6c3
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [ebp - 0x21a8]
inc eax
mov dword [ebp - 0x21a8], eax
jmp 0x45f5cd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004e398b
mov esp, ebp
pop ebp
ret