Function at 0x4095c0
Capabilities:
Delete service
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5799c0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5d7ce0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0xf003f
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
je 0x4097c8
push SysReAllocString
push 0x5ab3a4
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x409794
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
lea ecx, [ebp - 0x14]
push ecx
push 0
push 0
push esi
mov dword [eax], 1
mov dword [ebp - 0x14], 0
call edi
test eax, eax
jne 0x40976f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40976f
mov edx, dword [ebp - 0x14]
push edx
call fcn.0044c904
mov edx, dword [ebp - 0x14]
add esp, 4
lea ecx, [ebp - 0x14]
push ecx
push edx
push eax
push esi
mov dword [ebp - 0x1c], eax
call edi
test eax, eax
je 0x409763
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0xc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.004079b0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx - 0xc]
test eax, eax
jg 0x40969c
or edi, 0xffffffff
jmp 0x4096b9
push 0x22
push ecx
call fcn.0054e56a
mov ecx, dword [ebp - 0x10]
add esp, 8
test eax, eax
jne 0x4096b3
or edi, 0xffffffff
jmp 0x4096b9
sub eax, ecx
sar eax, 1
mov edi, eax
cmp dword [ecx - 0xc], 1
jg 0x4096c4
or eax, 0xffffffff
jmp 0x4096e0
add ecx, 2
push 0x22
push ecx
call fcn.0054e56a
add esp, 8
test eax, eax
jne 0x4096db
or eax, 0xffffffff
jmp 0x4096e0
sub eax, dword [ebp - 0x10]
sar eax, 1
dec eax
push eax
inc edi
push edi
lea edx, [ebp - 0x18]
push edx
lea ecx, [ebp - 0x10]
call fcn.0040a690
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x18]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x20], esp
mov edi, esp
push eax
call fcn.00407af0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.0044aaa0
add esp, 4
test eax, eax
jne 0x409753
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x10000
push 0x5ab3a4
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x40973f
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ecx, dword [ebp + 8]
push str.DesUpdateSvcTmp_service_error.
mov dword [ecx], 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x18]
call fcn.0043d1f0
lea ecx, [ebp - 0x10]
call fcn.0043d1f0
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0044c90f
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x4097aa
mov eax, dword [ebp + 8]
mov dword [eax], 0
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret