Function at 0x403b20
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1028
call fcn.00406900
mov eax, dword [0x40c014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
mov edi, ecx
mov dword [ebp - 0x1024], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
je 0x403d75
push 1
lea eax, [edi + 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x403b83
push eax
mov dword [ebp - 0x1024], 1
call ebx
push esi
call ebx
cmp dword [ebp - 0x1024], 0
je 0x403d75
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x403c16
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [ebp - 0x804]
push 0x400
push eax
push 0xd80a
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x403bed
push str.Could_not_open_Service_Manager
lea eax, [ebp - 0x804]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push eax
call fcn.00401a50
add esp, 0x10
push esi
lea eax, [ebp - 0x804]
push eax
push str._s__code_d
push edi
call fcn.00402040
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004068e1
mov esp, ebp
pop ebp
ret
push 0x10020
lea eax, [edi + 0x2c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x1028], esi
test esi, esi
jne 0x403c6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
push ebx
call ecx
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80c
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x403bed
push str.Could_not_open_service
jmp 0x403bd2
lea eax, [ebp - 0x1020]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x403cf9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1024], eax
cmp eax, 0x426
je 0x403cf9
cmp eax, 0x425
jne 0x403ca1
cmp dword [ebp - 0x101c], 3
je 0x403cf9
push 0x400
lea eax, [ebp - 0x804]
push eax
push 0xd80e
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x403cde
push str.Could_not_stop_service
lea eax, [ebp - 0x804]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push eax
call fcn.00401a50
add esp, 0x10
push dword [ebp - 0x1024]
lea eax, [ebp - 0x804]
push eax
push str._s__code_d
push edi
call fcn.00402040
add esp, 0x10
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x1028]
mov ecx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x1024], eax
call ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
jne 0x403d75
push 0x400
lea eax, [ebp - 0x1004]
push eax
push 0xd80d
call fcn.00401b30
add esp, 0xc
test eax, eax
jne 0x403d64
push str.Could_not_delete_service
lea eax, [ebp - 0x1004]
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push eax
call fcn.00401a50
add esp, 0x10
push dword [ebp - 0x1024]
lea eax, [ebp - 0x1004]
jmp 0x403bf4
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004068e1
mov esp, ebp
pop ebp
ret