Function at 0x4036d0
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57eb38
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x636f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00411ba0
test eax, eax
je 0x4038ff
mov eax, dword [eax]
mov ecx, dword [eax - 0x10]
lea esi, [eax - 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x40372d
cmp ecx, dword [esi]
jne 0x40372d
lock inc dword [eax]
jmp 0x40375b
mov eax, dword [ecx]
lea edi, [esi + 4]
push 2
push dword [edi]
mov eax, dword [eax]
call eax
mov esi, eax
test esi, esi
je 0x40391c
mov eax, dword [edi]
lea ecx, [esi + 0x10]
mov dword [esi + 4], eax
mov edx, dword [edi]
inc edx
push edx
push dword [ebp - 0x30]
call fcn.00404450
add esp, 8
add esi, 0x10
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], 0
mov edx, dword [esi - 0xc]
test edx, edx
js 0x403921
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x403790
push edx
lea ecx, [ebp - 0x30]
call fcn.004045e0
mov esi, dword [ebp - 0x30]
push dword [esi - 8]
push esi
call fcn.00559991
add esp, 8
test eax, eax
js 0x403921
cmp eax, dword [esi - 8]
jg 0x403921
xor ecx, ecx
mov dword [esi - 0xc], eax
push 1
xorps xmm0, xmm0
mov word [esi + eax*2], cx
push ecx
push ecx
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x14], ecx
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x4037ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.004107f0
add esp, 8
jmp 0x4038d7
push 0x10124
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x403813
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService_failed_w_err_0x_08lx_n
jmp 0x4038bb
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40389c
push esi
push str.Stopping__s.
call fcn.004107f0
add esp, 8
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40387f
nop dword [eax]
mov eax, dword [ebp - 0x28]
cmp eax, 3
jne 0x403882
push 0x6176cc
call fcn.004107f0
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2c]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x403850
mov eax, dword [ebp - 0x28]
push esi
cmp eax, 1
jne 0x40388f
push 0x6176d0
jmp 0x403894
push str._n_s_failed_to_stop._n
call fcn.004107f0
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4038b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteService_failed_w_err_0x_08lx_n
jmp 0x4038bb
push esi
push str._s_is_removed._n
call fcn.004107f0
add esp, 8
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x4038d7
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call fcn.00411ce0
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4038fb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
jmp 0x403901
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d4f5
mov esp, ebp
pop ebp
ret
call fcn.00404590
push 0x80070057
call fcn.00404570
int3