Function at 0x4070d6
Capabilities:
Modify service

Disassembly:
jmp 0x4c60b0
push 0xffffffffffffffff
push 0x785ae5
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov eax, dword [0x856918]
xor eax, esp
push eax
lea eax, [esp + 0x6c]
mov dword fs:[0], eax
push 0x32
xor ebx, ebx
mov esi, 0xf
push str.SetServiceRunStatus___Trying_to_set_service_status
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00405920
push ebx
lea eax, [esp + 0x1c]
push eax
mov ecx, 0x868edc
mov dword [esp + 0x7c], ebx
call fcn.0054c860
mov ebp, 0x10
mov dword [esp + 0x74], 0xffffffff
cmp dword [esp + 0x30], ebp
jb 0x4c612e
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00564155
add esp, 4
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
jne 0x4c619f
push 0x2c
push str.SetServiceRunStatus___Failed_getting_the_SCM
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00405920
push 1
lea edx, [esp + 0x1c]
push edx
mov ecx, 0x868edc
mov dword [esp + 0x7c], 1
call fcn.0054c860
cmp dword [esp + 0x30], ebp
jb 0x4c6189
mov eax, dword [esp + 0x1c]
push eax
call fcn.00564155
add esp, 4
xor al, al
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov ecx, dword [esp + 0x7c]
push 0xf01ff
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
jne 0x4c621f
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x30
push str.SetServiceRunStatus___Failed_getting_the_service
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
call fcn.00405920
push 1
lea edx, [esp + 0x1c]
push edx
mov ecx, 0x868edc
mov dword [esp + 0x7c], 2
call fcn.0054c860
cmp dword [esp + 0x30], ebp
jb 0x4c6189
mov eax, dword [esp + 0x1c]
push eax
call fcn.00564155
add esp, 4
xor al, al
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov ecx, dword [esp + 0x80]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ecx
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
setne al
mov byte [esp + 0x17], al
cmp al, bl
jne 0x4c62b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x54]
push edx
call fcn.004083af
push eax
lea eax, [esp + 0x24]
push str.SetServiceRunStatus___Failed_setting_the_status_with_error:
push eax
mov dword [esp + 0x88], 3
call fcn.00404cfa
add esp, 0x14
push 1
push eax
mov ecx, 0x868edc
mov byte [esp + 0x7c], 4
call fcn.0054c860
cmp dword [esp + 0x30], ebp
jb 0x4c629a
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00564155
add esp, 4
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
cmp dword [esp + 0x68], ebp
jb 0x4c62f0
mov edx, dword [esp + 0x54]
push edx
jmp 0x4c62e8
push str.SetServiceRunStatus___Change_success
lea ecx, [esp + 0x38]
call fcn.004062df
push ebx
lea eax, [esp + 0x38]
push eax
mov ecx, 0x868edc
mov dword [esp + 0x7c], 5
call fcn.0054c860
cmp dword [esp + 0x4c], ebp
jb 0x4c62f0
mov ecx, dword [esp + 0x38]
push ecx
call fcn.00564155
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret