Function at 0x1002a310
Capabilities:
Delete file
Delete service
Query service configuration
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10075d38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x124
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push esi
lea ecx, [ebp + 8]
call fcn.1005bbb3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0
test eax, eax
jne 0x1002a361
push 0x10098924
lea ecx, [ebp + 8]
call fcn.100539a5
or edi, 0xffffffff
cmp eax, edi
je 0x1002a364
jmp 0x1002a3d1
or edi, 0xffffffff
push 1
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
je 0x1002a3d1
push 0x100a5
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x1002a3b3
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call esi
push ebx
call esi
lea ecx, [ebp + 8]
mov dword [ebp - 4], edi
call fcn.1005bb45
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x1002a3ef
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
lea ecx, [ebp + 8]
mov dword [ebp - 4], edi
call fcn.1005bb45
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x12f]
mov byte [ebp - 0x130], 0
rep stosd dword es:[edi], eax
lea ecx, [ebp + 0xc]
mov dword [ebp + 0xc], 0
stosw word es:[edi], ax
push ecx
push 0
push 0
push esi
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1002a462
mov edx, dword [ebp + 0xc]
inc edx
push edx
call fcn.10056e50
mov ecx, dword [ebp + 0xc]
add esp, 4
mov edi, eax
lea eax, [ebp + 0xc]
push eax
push ecx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov edx, dword [edi + 0xc]
lea eax, [ebp - 0x130]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call fcn.10056e79
add esp, 4
cmp dword [ebp - 0x28], 1
je 0x1002a4b9
lea ecx, [ebp - 0x2c]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push 0x2710
push 1
push esi
mov edi, eax
call fcn.1002a520
add esp, 0xc
test edi, edi
jne 0x1002a4bc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.1005bb45
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x10]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
lea edx, [ebp - 0x130]
push edx
call fcn.1003e250
add esp, 4
test eax, eax
jbe 0x1002a4e3
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
lea ecx, [ebp + 8]
mov dword [ebp - 4], 0xffffffff
call fcn.1005bb45
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret