Function at 0x4077d0
Capabilities:
Query service status
Resolve function by parsing pe exports
Start service

Disassembly:
push 0xffffffffffffffff
push 0x44b648
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x45e520]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45e520]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov ebp, 0xf
mov eax, edi
mov dword [esp + 0x68], ebp
mov dword [esp + 0x64], ebx
mov byte [esp + 0x54], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x407820
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x58]
call fcn.004024f0
push 0x20000000
push ebx
push ebx
mov dword [esp + 0x84], ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x30], esi
jne 0x4078b1
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.00402280
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x64], esp
mov byte [esp + 0xb0], 1
push 0x28
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push 0x452be8
mov byte [ecx + 4], bl
call fcn.004024f0
mov byte [esp + 0xb0], bl
call fcn.004041e0
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x407e18
push 0x34
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
cmp eax, ebx
mov dword [esp + 0x28], eax
jne 0x407930
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00402280
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x64], esp
mov byte [esp + 0xb0], 2
push 0x23
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push 0x452c14
mov byte [ecx + 4], bl
call fcn.004024f0
mov byte [esp + 0xb0], bl
call fcn.004041e0
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [esp + 0x68], 0x10
jb 0x407e2c
mov eax, dword [esp + 0x54]
push eax
jmp 0x407e24
mov dword [esp + 0x2c], ebx
mov edx, dword [0x462410]
mov eax, dword [edx + 0xc]
mov ecx, 0x462410
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x2c]
push ecx
push str.start_service_times_:i____d_
lea edi, [esp + 0x28]
mov byte [esp + 0x80], 3
call fcn.00412b00
sub esp, 0x14
mov ecx, esp
mov dword [esp + 0x34], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00402280
mov byte [esp + 0x94], 4
mov edi, dword [esp + 0x3c]
sub esp, 0x1c
mov esi, esp
mov eax, edi
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], ebx
mov dword [esp + 0x54], esp
mov byte [esi + 4], bl
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x4079a8
sub eax, ecx
push eax
push edi
mov ecx, esi
call fcn.004024f0
mov byte [esp + 0xb0], 3
call fcn.004041e0
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x407a48
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x38], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00402280
sub esp, 0x1c
mov byte [esp + 0xb0], 5
mov ecx, esp
mov dword [esp + 0x50], esp
push 0x23
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push 0x452c58
mov byte [ecx + 4], bl
call fcn.004024f0
mov byte [esp + 0xb0], 3
call fcn.004041e0
lea eax, [edi - 0x10]
mov byte [esp + 0x78], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x407d2b
mov edx, dword [0x462410]
mov eax, dword [edx + 0xc]
mov ecx, 0x462410
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x78], 6
mov ecx, dword [esp + 0x38]
push ecx
push str.dwCurrentState____d_
lea edi, [esp + 0x20]
call fcn.00412b00
sub esp, 0x14
mov ecx, esp
mov dword [esp + 0x38], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00402280
mov byte [esp + 0x94], 7
mov edi, dword [esp + 0x34]
sub esp, 0x1c
mov esi, esp
mov eax, edi
mov dword [esi + 0x18], ebp
mov dword [esi + 0x14], ebx
mov dword [esp + 0x5c], esp
mov byte [esi + 4], bl
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x407ac0
sub eax, ecx
push eax
push edi
mov ecx, esi
call fcn.004024f0
mov byte [esp + 0xb0], 6
call fcn.004041e0
lea eax, [edi - 0x10]
mov byte [esp + 0x78], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407b02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x38]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x40], esp
push 0xffffffffffffffff
mov edi, 4
cmp eax, edi
lea edx, [esp + 0x70]
push ebx
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
mov byte [ecx + 4], bl
push edx
je 0x407e4d
cmp eax, 2
je 0x407cbd
call fcn.00402280
sub esp, 0x1c
mov byte [esp + 0xb0], 8
mov ecx, esp
mov dword [esp + 0x54], esp
push 0x452c94
call fcn.004020b0
mov byte [esp + 0xb0], 3
call fcn.004041e0
mov esi, dword [esp + 0x28]
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x407c2d
mov eax, dword [0x462410]
mov edx, dword [eax + 0xc]
mov ecx, 0x462410
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x78], 9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x452cbc
lea edi, [esp + 0x20]
call fcn.00412b00
sub esp, 0x14
mov ecx, esp
mov dword [esp + 0x40], esp
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push eax
mov byte [ecx + 4], bl
call fcn.00402280
sub esp, 0x1c
mov byte [esp + 0xb0], 0xa
mov esi, dword [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x54], esp
push esi
call fcn.004020b0
mov byte [esp + 0xb0], 9
call fcn.004041e0
lea eax, [esi - 0x10]
mov byte [esp + 0x78], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407c10
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x78], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x407d2b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [esp + 0x34]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x407d13
cmp dword [esp + 0x38], edi
jne 0x407d13
sub esp, 0x1c
lea edx, [esp + 0x6c]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.004020f0
sub esp, 0x1c
mov byte [esp + 0xb0], 0xb
mov ecx, esp
mov dword [esp + 0x54], esp
push 0x452cf8
call fcn.004020b0
mov byte [esp + 0xb0], 3
call fcn.004041e0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [esp + 0x30]
push eax
call esi
lea ecx, [esp + 0x20]
call fcn.00410b40
lea ecx, [esp + 0x50]
call fcn.00402120
mov eax, 1
jmp 0x407e2e
call fcn.00402280
sub esp, 0x1c
mov byte [esp + 0xb0], 0xd
mov ecx, esp
mov dword [esp + 0x54], esp
push 0x452d38
call fcn.004020b0
mov byte [esp + 0xb0], 3
call fcn.004041e0
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x407d13
cmp dword [esp + 0x38], edi
je 0x407edb
mov byte [esp + 0x78], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407d37
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 1
cmp eax, 0xa
mov dword [esp + 0x2c], eax
jl 0x407934
mov edx, dword [0x462410]
mov eax, dword [edx + 0xc]
mov ecx, 0x462410
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x78], 0xf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x38]
push eax
push ecx
push str.StartSP
lea edi, [esp + 0x24]
call fcn.00412b00
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x40], esp
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x74]
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push edx
mov byte [ecx + 4], bl
call fcn.00402280
mov byte [esp + 0x94], 0x10
mov edi, dword [esp + 0x34]
sub esp, 0x1c
mov esi, esp
mov dword [esi + 0x18], ebp
mov eax, edi
mov dword [esi + 0x14], ebx
mov dword [esp + 0x54], esp
mov byte [esi + 4], bl
lea ebp, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x407dc3
sub eax, ebp
push eax
push edi
mov ecx, esi
call fcn.004024f0
mov byte [esp + 0xb0], 0xf
call fcn.004041e0
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
lea eax, [edi - 0x10]
mov byte [esp + 0x78], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407e18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x68], 0x10
jb 0x407e2c
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00416c01
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.004322f2
add esp, 0x68
ret
call fcn.00402280
sub esp, 0x1c
mov byte [esp + 0xb0], 0xc
mov ecx, esp
mov dword [esp + 0x54], esp
push 0x27
mov dword [ecx + 0x18], ebp
mov dword [ecx + 0x14], ebx
push 0x452d10
mov byte [ecx + 4], bl
call fcn.004024f0
mov byte [esp + 0xb0], 3
call fcn.004041e0
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
mov byte [esp + 0x78], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407ebd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x68], 0x10
jb 0x407ed1
mov ecx, dword [esp + 0x54]
push ecx
call fcn.00416c01
add esp, 4
mov eax, 1
jmp 0x407e2e
sub esp, 0x1c
lea edx, [esp + 0x6c]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
call fcn.004020f0
sub esp, 0x1c
mov byte [esp + 0xb0], 0xe
mov ecx, esp
mov dword [esp + 0x54], esp
push 0x452d5c
call fcn.004020b0
mov byte [esp + 0xb0], 3
call fcn.004041e0
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
jmp 0x407c9f