Function at 0x4ba570
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596b26
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x5fae30]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push 0x32
xor ebx, ebx
push str.SetServiceRunStatus___Trying_to_set_service_status
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00402a36
push ebx
lea eax, [ebp - 0x2c]
push eax
mov ecx, 0x5fda4c
mov dword [ebp - 4], ebx
call fcn.005383c0
cmp dword [ebp - 0x18], 0x10
mov dword [ebp - 4], 0xffffffff
jb 0x4ba5e7
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0053ed60
add esp, 4
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
cmp edi, ebx
jne 0x4ba646
push 0x2c
push str.SetServiceRunStatus___Failed_getting_the_SCM
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00402a36
push 1
lea edx, [ebp - 0x2c]
push edx
mov ecx, 0x5fda4c
mov dword [ebp - 4], 1
call fcn.005383c0
cmp dword [ebp - 0x18], 0x10
jb 0x4ba63f
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0053ed60
add esp, 4
xor al, al
jmp 0x4ba786
push 0xf01ff
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
cmp esi, ebx
jne 0x4ba6ac
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x30
push str.SetServiceRunStatus___Failed_getting_the_service
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00402a36
push 1
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, 0x5fda4c
mov dword [ebp - 4], 2
call fcn.005383c0
cmp dword [ebp - 0x18], 0x10
jb 0x4ba63f
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0053ed60
add esp, 4
xor al, al
jmp 0x4ba786
mov eax, dword [ebp + 0xc]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
test eax, eax
setne al
mov byte [ebp - 0x65], al
cmp al, bl
jne 0x4ba733
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x64]
push ecx
call fcn.004080a8
push eax
lea edx, [ebp - 0x2c]
push str.SetServiceRunStatus___Failed_setting_the_status_with_error:
push edx
mov dword [ebp - 4], 3
call fcn.0040367f
add esp, 0x14
push 1
push eax
mov ecx, 0x5fda4c
mov byte [ebp - 4], 4
call fcn.005383c0
cmp dword [ebp - 0x18], 0x10
jb 0x4ba71a
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0053ed60
add esp, 4
cmp dword [ebp - 0x50], 0x10
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
jb 0x4ba777
mov ecx, dword [ebp - 0x64]
push ecx
jmp 0x4ba76f
push 0x24
push str.SetServiceRunStatus___Change_success
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
call fcn.00402a36
push ebx
lea edx, [ebp - 0x48]
push edx
mov ecx, 0x5fda4c
mov dword [ebp - 4], 5
call fcn.005383c0
cmp dword [ebp - 0x34], 0x10
jb 0x4ba777
mov eax, dword [ebp - 0x48]
push eax
call fcn.0053ed60
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
mov al, byte [ebp - 0x65]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053fd20
mov esp, ebp
pop ebp
ret