Function at 0x503b40
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5489f0
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x58a710]
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 ebx, ecx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x503b86
cmp word [ebp + 8], 0
jne 0x503d7c
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push 0
push 0x1042
push dword [ebx + 0x44]
call esi
mov edi, eax
mov dword [ebp - 0x40], edi
test edi, edi
js 0x503d7c
push 0x38
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.0051d400
add esp, 0xc
mov dword [ebp - 0x84], edi
lea eax, [ebp - 0x88]
mov dword [ebp - 0x88], 4
push eax
push 0
push 0x1005
push dword [ebx + 0x44]
call esi
xor esi, esi
test eax, eax
movzx eax, word [ebp + 0xc]
cmovne esi, dword [ebp - 0x68]
sub eax, 0x898
je 0x503d48
sub eax, 1
jne 0x503d7c
test esi, esi
je 0x503d7c
lea ecx, [ebp - 0x38]
call fcn.00412fb0
push 0xf003f
push 0
push 0
mov dword [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
je 0x503d24
push 0xf01ff
push dword [esi + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x503d24
mov ecx, dword [esi + 0xc]
dec ecx
cmp ecx, 6
ja case.default.0x503c58
movzx eax, byte [ecx + 0x503da4]
jmp dword [eax*4 + 0x503d9c]
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x503c86
mov eax, dword [ebp - 0x2c]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x28]
mov dword [esi], 0
push 0x857f
jmp 0x503cd4
push 0x10
push 0x8580
push 0x8745
jmp 0x503d06
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x503cf4
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x24
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je case.default.0x503c58
mov eax, dword [ebp - 0x18]
mov dword [esi], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x30]
push 0x8580
lea ecx, [ebp - 0x38]
mov dword [esi + 0xc], eax
call fcn.004197f0
push dword [ebp - 0x38]
lea ecx, [ebx + 0x198]
push 0x899
call fcn.0049f000
jmp case.default.0x503c58
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10
push 0x857f
push 0x8744
push dword [ebx + 4]
call fcn.004102a0
add esp, 0x10
push 0
push dword [ebp - 0x40]
push 0x102a
push dword [ebx + 0x44]
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [ebp - 0x38]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x503d7c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x503d7c
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov edi, dword [sym.imp.USER32.dll_SetCursor]
push eax
mov dword [ebp - 0x4c], eax
call edi
mov esi, eax
mov byte [ebp - 0x44], 1
mov dword [ebp - 0x48], esi
lea ecx, [ebx + 0x40]
mov dword [ebp - 4], 0
call fcn.00505fe0
push esi
call edi
xor eax, eax
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.005193a0
mov esp, ebp
pop ebp
ret 0x10