Function at 0x408870
Capabilities:
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x523857
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x556358]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x2d5], dl
mov ebx, ecx
mov dword [ebp - 0x2e0], ebx
push 0x2c
lea eax, [ebp - 0x28c]
push 0
push eax
call fcn.004e0850
lea eax, [ebp - 0x280]
mov dword [ebp - 0x288], 0
mov dword [ebp - 0x28c], eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x284], 1
mov word [ebp - 0x280], ax
push 0x2c
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x260]
push eax
call fcn.004e0850
lea eax, [ebp - 0x254]
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x260], eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x258], 1
mov word [ebp - 0x254], ax
lea edx, [ebp - 0x260]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28c]
call fcn.00408410
lea eax, [ebp - 0x260]
push eax
lea edx, [ebp - 0x28c]
lea ecx, [ebp - 0x220]
call fcn.00407f30
add esp, 4
mov eax, dword [eax]
mov dword [ebp - 0x2dc], eax
test eax, eax
jns 0x408969
mov dword [ebx], eax
jmp 0x408e09
push 0x2c
lea eax, [ebp - 0x2b8]
push 0
push eax
call fcn.004e0850
add esp, 0xc
lea ecx, [ebp - 0x2b8]
push 0xffffffffffffffff
push str.system32drivers_
call fcn.00405730
push 0x55ace0
lea ecx, [ebp - 0x2b8]
mov byte [ebp - 4], 2
call fcn.004095a0
push str..sys
lea ecx, [ebp - 0x2b8]
call fcn.004095a0
cmp byte [ebp - 0x2d5], 0
je 0x408c6f
sub esp, 8
mov dword [ebp - 0x21c], 0
lea eax, [ebp - 0x2dc]
lea ecx, [ebp - 0x21c]
push eax
call fcn.00495910
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2dc]
test eax, eax
jns 0x4089fe
lea ecx, [ebp - 0x21c]
mov dword [ebx], eax
call fcn.00408700
jmp 0x408dec
push ecx
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00495b30
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x22c]
mov edi, dword [ebp - 0x228]
cmp esi, edi
je 0x408a8a
nop word [eax + eax]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004e0850
mov eax, dword [esi]
lea edx, [ebp - 0x218]
test eax, eax
mov ecx, 0x544e38
cmovne ecx, eax
add esp, 8
call fcn.00495a30
add esp, 4
lea eax, [ebp - 0x218]
lea ecx, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00495820
mov eax, dword [eax]
test eax, eax
js 0x408b2a
add esi, 0x3c
cmp esi, edi
jne 0x408a30
lea ecx, [ebp - 0x22c]
call fcn.00409520
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x408ad5
mov ecx, dword [eax + 4]
lea esi, [eax + 4]
or eax, 0xffffffff
mov ecx, dword [ecx + 4]
add esi, ecx
lock xadd dword [esi + 4], eax
dec eax
jne 0x408ad5
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x408ac6
push esi
call fcn.00407170
test al, al
je 0x408ad5
mov dword [esi + 8], 0
mov ecx, esi
mov eax, dword [esi]
push 1
call dword [eax]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x220], edi
test edi, edi
jne 0x408af6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x30
push 0x55ace0
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x21c], esi
test esi, esi
jne 0x408ba7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408b88
jle 0x408b8f
movzx eax, ax
or eax, 0x80070000
jmp 0x408b8d
lea ecx, [ebp - 0x22c]
mov dword [ebx], eax
call fcn.00409520
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x408dec
mov ecx, dword [eax + 4]
lea esi, [eax + 4]
or eax, 0xffffffff
mov ecx, dword [ecx + 4]
add esi, ecx
lock xadd dword [esi + 4], eax
dec eax
jne 0x408dec
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x408b74
push esi
call fcn.00407170
test al, al
je 0x408dec
mov dword [esi + 8], 0
mov ecx, esi
mov eax, dword [esi]
push 1
call dword [eax]
jmp 0x408dec
mov eax, 0x8007054f
test eax, eax
jns 0x408ba7
mov dword [ebx], eax
test edi, edi
je 0x408dec
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x408dec
lea eax, [ebp - 0x2d4]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x408bfd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408bd1
jle 0x408bd8
movzx eax, ax
or eax, 0x80070000
jmp 0x408bd6
mov eax, 0x8007054f
test eax, eax
jns 0x408bfd
mov dword [ebx], eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x408bed
push esi
call eax
mov eax, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x408dec
push edi
call eax
jmp 0x408dec
mov edi, dword [ebp - 0x21c]
xor ebx, ebx
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x408c34
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x408c2d
jle 0x408c38
movzx esi, si
or esi, 0x80070000
jmp 0x408c36
mov esi, 0x8007054f
jmp 0x408c36
xor esi, esi
test esi, esi
jns 0x408c50
cmp esi, 0x80070420
jne 0x408c50
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, 0xa
jl 0x408c05
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
mov edi, dword [ebp - 0x220]
je 0x408ddd
push dword [ebp - 0x21c]
jmp 0x408ddb
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
mov dword [ebp - 0x220], edi
test edi, edi
jne 0x408c90
call dword [sym.imp.KERNEL32.dll_GetLastError]
xorps xmm0, xmm0
xor ebx, ebx
movq qword [ebp - 0x234], xmm0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0x8007139f
mov dword [ebp - 0x21c], ebx
nop word [eax + eax]
mov eax, dword [ebp - 0x2b8]
mov ecx, 0x544e38
test eax, eax
cmovne ecx, eax
sub esp, 0x14
lea eax, [ebp - 0x234]
push ecx
sub esp, 0x18
lea ecx, [ebp - 0x220]
push eax
lea eax, [ebp - 0x2e4]
push eax
call fcn.00407600
mov esi, dword [eax]
mov dword [ebp - 0x2dc], esi
test esi, esi
jns 0x408dca
cmp esi, 0x80070431
je 0x408ee5
cmp esi, 0x80070430
jne 0x408e61
test ebx, ebx
je 0x408d27
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2dc]
xorps xmm0, xmm0
push eax
push 0xf01ff
push ecx
lea eax, [ebp - 0x220]
movq qword [ebp - 0x228], xmm0
push eax
lea ecx, [ebp - 0x228]
call fcn.004076c0
mov esi, dword [ebp - 0x2dc]
test esi, esi
jns 0x408d6e
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x408dba
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x408dba
cmp dword [ebp - 0x224], 0
mov ebx, dword [ebp - 0x228]
jl 0x408d97
lea eax, [ebp - 0x2d4]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x408d97
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x2e8]
push eax
lea ecx, [ebp - 0x228]
call fcn.004075a0
test ebx, ebx
je 0x408db4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, dword [ebp - 0x21c]
inc ebx
mov dword [ebp - 0x21c], ebx
cmp ebx, 5
jl 0x408cc0
mov eax, dword [ebp - 0x234]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x408ddd
push eax
call ebx
test edi, edi
je 0x408de4
push edi
call ebx
mov ebx, dword [ebp - 0x2e0]
mov dword [ebx], esi
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x408e09
lea ecx, [ebp - 0x2ac]
cmp eax, ecx
je 0x408e09
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x408e26
lea ecx, [ebp - 0x254]
cmp eax, ecx
je 0x408e26
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x408e43
lea ecx, [ebp - 0x280]
cmp eax, ecx
je 0x408e43
push eax
call fcn.004e4113
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d7fbc
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2e0]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [eax], esi
mov eax, dword [ebp - 0x234]
test eax, eax
je 0x408e7c
push eax
call ebx
test edi, edi
je 0x408e83
push edi
call ebx
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x408ea0
lea ecx, [ebp - 0x2ac]
cmp eax, ecx
je 0x408ea0
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x408ebd
lea ecx, [ebp - 0x254]
cmp eax, ecx
je 0x408ebd
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x408eda
lea ecx, [ebp - 0x280]
cmp eax, ecx
je 0x408eda
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x2e0]
jmp 0x408e45
mov esi, dword [ebp - 0x2e0]
mov eax, dword [ebp - 0x234]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [esi], 0
test eax, eax
je 0x408f04
push eax
call ebx
test edi, edi
je 0x408f0b
push edi
call ebx
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x408f28
lea ecx, [ebp - 0x2ac]
cmp eax, ecx
je 0x408f28
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x260]
test eax, eax
je 0x408f45
lea ecx, [ebp - 0x254]
cmp eax, ecx
je 0x408f45
push eax
call fcn.004e4113
add esp, 4
mov eax, dword [ebp - 0x28c]
test eax, eax
je 0x408f62
lea ecx, [ebp - 0x280]
cmp eax, ecx
je 0x408f62
push eax
call fcn.004e4113
add esp, 4
mov eax, esi
jmp 0x408e45