Function at 0x4312b0
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x5eda74]
sub esp, 0x48
cmp eax, 0xffffffff
jne 0x4312c5
call fcn.00431c20
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 0x4313c1
lea eax, [ebp + 4]
add eax, 0xfffffffc
push ebx
push eax
call fcn.00420ed0
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x5fdc84]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.0053b430
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x4313c1
lea eax, [ebp + 4]
add eax, 0xfffffffc
push esi
push eax
call fcn.00420ed0
push dword [ebp + 0x14]
mov esi, dword [eax]
lea eax, [ebp + 4]
add eax, 0xfffffffc
push eax
call fcn.00420ed0
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.0053b400
add esp, 4
test eax, eax
jne 0x431392
push ebx
push str.Failed_changing_service_config__s:__m
push 0x550003
call fcn.00424230
add esp, 0xc
or esi, 0xffffffff
jmp 0x431394
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.0053b400
add esp, 4
test eax, eax
jne 0x4313ba
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00424230
add esp, 8
test esi, esi
je 0x4313e6
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x18]
push 0xbb8
push 1
push dword [ebp + 0x14]
push esi
push ebx
call fcn.00430d40
add esp, 0x18
test eax, eax
je 0x4313e6
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x5fdc84], 0
jne 0x4313f3
xor edi, edi
jmp 0x431421
lea eax, [ebp + 4]
sub eax, 4
push ebx
push eax
call fcn.00420ed0
add esp, 8
push 0xf01ff
push dword [eax]
push dword [0x5fdc84]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
push eax
call fcn.0053b430
add esp, 4
mov edi, eax
push dword [ebp + 0x10]
lea ecx, [ebp + 4]
or esi, 0xffffffff
sub ecx, 4
push ecx
call fcn.00420ed0
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.0053b400
add esp, 4
test eax, eax
jne 0x431471
push str.Failed_changing_service_description:__m
push 0x550003
call fcn.00424230
add esp, 8
test eax, eax
jne 0x431555
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 0x4314ed
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.0053b400
add esp, 4
test eax, eax
jne 0x431519
push str.Failed_changing_service_failure_action:__m
push 0x550003
call fcn.00424230
add esp, 8
test eax, eax
jne 0x431555
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.0053b400
add esp, 4
test eax, eax
jne 0x431553
push str.failed_SetServiceObjectSecurity____m
push 0x550003
call fcn.00424230
add esp, 8
jmp 0x431555
xor esi, esi
test edi, edi
je 0x43157f
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call fcn.0053b400
add esp, 4
test eax, eax
jne 0x43157f
push str.Failed_close_service_handle:__m
push 0x550003
call fcn.00424230
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