Function at 0x486a60
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x654e14]
sub esp, 0x48
cmp eax, 0xffffffff
jne 0x486a75
call fcn.004873e0
push ebx
mov ebx, dword [ebp + 8]
cmp eax, 2
push esi
mov esi, dword [ebp + 0xc]
mov ecx, 0x110
push edi
mov edi, dword [ebp + 0x18]
mov edx, 0x10
cmovg ecx, edx
neg edi
mov dword [ebp - 4], ecx
sbb edi, edi
add edi, 3
cmp dword [0x665124], 0
je 0x486b71
lea eax, [ebp + 4]
add eax, 0xfffffffc
push ebx
push eax
call fcn.004766b0
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x665124]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00590bc0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x486b71
lea eax, [ebp + 4]
add eax, 0xfffffffc
push esi
push eax
call fcn.004766b0
push dword [ebp + 0x14]
mov esi, dword [eax]
lea eax, [ebp + 4]
add eax, 0xfffffffc
push eax
call fcn.004766b0
add esp, 0x10
push esi
push 0
push 0
push 0
push 0
push 0
push dword [eax]
push 1
push edi
push dword [ebp - 4]
mov edi, dword [ebp - 8]
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486b42
push ebx
push str.Failed_changing_service_config__s:__m
push 0x550003
call fcn.00479a10
add esp, 0xc
or esi, 0xffffffff
jmp 0x486b44
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486b6a
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00479a10
add esp, 8
test esi, esi
je 0x486b96
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x18]
push 0xbb8
push 1
push dword [ebp + 0x14]
push esi
push ebx
call fcn.004864f0
add esp, 0x18
test eax, eax
je 0x486b96
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x665124], 0
jne 0x486ba3
xor edi, edi
jmp 0x486bd1
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.004766b0
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x665124]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.00590bc0
add esp, 4
mov edi, eax
push dword [ebp + 0x10]
lea ecx, [ebp + 4]
or esi, 0xffffffff
sub ecx, 4
push ecx
call fcn.004766b0
mov ebx, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
add esp, 8
mov eax, dword [eax]
mov dword [ebp + 0x18], eax
lea eax, [ebp + 0x18]
push eax
push 1
push edi
call ebx
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486c21
push str.Failed_changing_service_description:__m
push 0x550003
call fcn.00479a10
add esp, 8
test eax, eax
jne 0x486d05
cmp dword [ebp + 0x1c], 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], eax
je 0x486c9d
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x44], 0xea60
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], 0x1d4c0
mov dword [ebp - 0x1c], 0x2a300
mov dword [ebp - 0x10], 3
lea eax, [ebp - 0x1c]
push eax
push 2
push edi
call ebx
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486cc9
push str.Failed_changing_service_failure_action:__m
push 0x550003
call fcn.00479a10
add esp, 8
test eax, eax
jne 0x486d05
push 1
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
lea eax, [ebp - 0x30]
push eax
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486d03
push str.failed_SetServiceObjectSecurity____m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x486d05
xor esi, esi
test edi, edi
je 0x486d2f
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x486d2f
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00479a10
add esp, 8
neg esi
pop edi
sbb esi, esi
and esi, 0xfffffffe
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret