Function at 0x480fa0
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x548
push esi
mov dword [ebp - 0x234], 0
mov dword [ebp - 8], 0
mov eax, dword [0x4f4a94]
mov dword [ebp - 0x208], eax
mov cx, word [0x4f4a98]
mov word [ebp - 0x204], cx
push 0x1fa
push 0
lea edx, [ebp - 0x202]
push edx
call fcn.0049fd30
add esp, 0xc
push closesocket
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x481013
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
jmp 0x4812a0
lea eax, [ebp - 0x208]
push eax
push str.SYSTEMCurrentControlSetServices_s
push 0x200
lea ecx, [ebp - 0x438]
push ecx
call fcn.004826e0
add esp, 0x10
lea edx, [ebp - 4]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x438]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
je 0x48106f
call fcn.00480b70
movzx ecx, al
mov dword [ebp - 0x228], ecx
jmp 0x481083
mov dword [ebp - 0x228], 1
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x228], 0
je 0x48118f
push 0x14
lea eax, [ebp - 0x208]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
je 0x481171
lea edx, [ebp - 0x224]
push edx
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x4810e2
cmp dword [ebp - 0x220], 4
je 0x481158
push 0
push 0
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x481158
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0x420
je 0x481158
cmp dword [ebp - 0x22c], 0xb7
je 0x481158
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
je 0x481138
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x48150f
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x234], 0
jmp 0x48118a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4812a0
cmp dword [ebp - 0x43c], 0
je 0x4811a8
call fcn.00480b70
movzx ecx, al
mov dword [ebp - 0x228], ecx
jmp 0x4811b2
mov dword [ebp - 0x228], 1
cmp dword [ebp - 0x228], 0
je 0x4812a0
push 0x10
lea edx, [ebp - 0x208]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
je 0x481287
lea ecx, [ebp - 0x224]
push ecx
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
je 0x481211
cmp dword [ebp - 0x220], 4
je 0x48126e
push 0
push 0
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x48126e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0x420
je 0x48126e
cmp dword [ebp - 0x22c], 0xb7
je 0x48126e
cmp dword [ebp - 8], 0
je 0x48125a
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x48150f
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 0x234], 0
jmp 0x4812a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
je 0x4812b0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0x164
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
jne 0x4812f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x48150f
mov ecx, dword [ebp - 0x440]
mov dword [ecx + 0x44], 1
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xffff
movzx edx, ax
cmp edx, 4
jne 0x481376
mov eax, dword [ebp + 8]
push eax
call fcn.004a38a0
add esp, 4
mov esi, eax
push 0x4f4ac4
call fcn.004a38a0
add esp, 4
cmp esi, eax
jbe 0x48135e
push 0x4f4ad0
call fcn.004a38a0
add esp, 4
add eax, dword [ebp + 8]
push eax
push str.._s
push 0x104
lea ecx, [ebp - 0x548]
push ecx
call fcn.004826e0
add esp, 0x10
jmp 0x481374
push 0x104
push 0
lea edx, [ebp - 0x548]
push edx
call fcn.0049fd30
add esp, 0xc
jmp 0x4813d7
mov eax, dword [ebp + 8]
push eax
call fcn.004a38a0
add esp, 4
mov esi, eax
push 0x4f4ae4
call fcn.004a38a0
add esp, 4
cmp esi, eax
jbe 0x4813c1
push 0x4f4af0
call fcn.004a38a0
add esp, 4
add eax, dword [ebp + 8]
push eax
push str..Global_s
push 0x104
lea ecx, [ebp - 0x548]
push ecx
call fcn.004826e0
add esp, 0x10
jmp 0x4813d7
push 0x104
push 0
lea edx, [ebp - 0x548]
push edx
call fcn.0049fd30
add esp, 0xc
push 0x40
push 0
mov eax, dword [ebp - 0x440]
add eax, 4
push eax
call fcn.0049fd30
add esp, 0xc
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea ecx, [ebp - 0x548]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, dword [ebp - 0x440]
mov dword [edx], eax
mov eax, dword [ebp - 0x440]
cmp dword [eax], 0xffffffff
je 0x4814cc
mov ecx, dword [ebp - 0x440]
push ecx
call fcn.00480ad0
add esp, 4
movzx edx, al
test edx, edx
jne 0x48148d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x440]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x440]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x48150f
mov edx, dword [ebp - 0x440]
push edx
call fcn.00480a30
add esp, 4
mov eax, dword [ebp - 0x440]
mov dword [eax + 0x160], 0
mov ecx, dword [ebp + 8]
push ecx
push 0x10c
mov edx, dword [ebp - 0x440]
add edx, 0x50
push edx
call fcn.00482530
mov eax, dword [ebp - 0x440]
jmp 0x48150f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x22c], eax
mov eax, dword [ebp - 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov ecx, dword [ebp - 0x440]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret