Function at 0x4311f0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x5eda74]
sub esp, 0x48
cmp eax, 0xffffffff
jne 0x431205
call fcn.00431b60
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 [0x5fdc84], 0
je 0x431301
lea eax, [ebp + 4]
add eax, 0xfffffffc
push ebx
push eax
call fcn.00420e40
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x5fdc84]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.0053b3a0
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x431301
lea eax, [ebp + 4]
add eax, 0xfffffffc
push esi
push eax
call fcn.00420e40
push dword [ebp + 0x14]
mov esi, dword [eax]
lea eax, [ebp + 4]
add eax, 0xfffffffc
push eax
call fcn.00420e40
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.0053b370
add esp, 4
test eax, eax
jne 0x4312d2
push ebx
push str.Failed_changing_service_config__s:__m
push 0x550003
call fcn.004241a0
add esp, 0xc
or esi, 0xffffffff
jmp 0x4312d4
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x4312fa
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.004241a0
add esp, 8
test esi, esi
je 0x431326
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x18]
push 0xbb8
push 1
push dword [ebp + 0x14]
push esi
push ebx
call fcn.00430c80
add esp, 0x18
test eax, eax
je 0x431326
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x5fdc84], 0
jne 0x431333
xor edi, edi
jmp 0x431361
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.00420e40
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x5fdc84]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.0053b3a0
add esp, 4
mov edi, eax
push dword [ebp + 0x10]
lea ecx, [ebp + 4]
or esi, 0xffffffff
sub ecx, 4
push ecx
call fcn.00420e40
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.0053b370
add esp, 4
test eax, eax
jne 0x4313b1
push str.Failed_changing_service_description:__m
push 0x550003
call fcn.004241a0
add esp, 8
test eax, eax
jne 0x431495
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 0x43142d
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.0053b370
add esp, 4
test eax, eax
jne 0x431459
push str.Failed_changing_service_failure_action:__m
push 0x550003
call fcn.004241a0
add esp, 8
test eax, eax
jne 0x431495
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.0053b370
add esp, 4
test eax, eax
jne 0x431493
push str.failed_SetServiceObjectSecurity____m
push 0x550003
call fcn.004241a0
add esp, 8
jmp 0x431495
xor esi, esi
test edi, edi
je 0x4314bf
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.0053b370
add esp, 4
test eax, eax
jne 0x4314bf
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.004241a0
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