Function at 0x10067850
Capabilities:
Create service
Modify service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1014353c
mov eax, dword fs:[0]
push eax
sub esp, 0x570
mov eax, dword [0x1019a128]
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 dword [ebp - 0x428], ecx
mov eax, dword [ebp + 8]
xor esi, esi
mov edi, dword [ebp + 0xc]
push 0x208
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x420]
push esi
push eax
mov dword [ebp - 0x42c], edi
call fcn.10117ff0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x1006791e
push str.ServiceManager::Create
lea edx, [esi + 4]
lea ecx, [ebp - 0x4d4]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 0
cmp byte [esi + 0x48], 0
je 0x100678f5
mov edx, str.Cannot_install_service_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x10067909
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0x4d4]
call fcn.1000ad70
mov eax, 0x10d8
jmp 0x10067b85
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x1006798c
push str.ServiceManager::Create
lea edx, [eax + 4]
lea ecx, [ebp - 0x4d4]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 1
cmp byte [esi + 0x48], bl
je 0x10067963
mov edx, str.OpenSCManager_err
mov ecx, esi
call fcn.100205a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [esi + 0x48], 0
je 0x10067977
push eax
mov ecx, esi
call fcn.100201d0
lea ecx, [ebp - 0x4d4]
call fcn.1000ad70
mov eax, 0x6e
jmp 0x10067b85
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10117ff0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push str.__s_
push eax
call fcn.10067d50
add esp, 0x18
mov eax, dword [ebp - 0x428]
lea ecx, [ebp - 0x218]
add eax, 4
push 0
push 0
push 0
push 0
push 0
push ecx
push 1
push edi
push 0x10
push 0xf01ff
push dword [ebp - 0x424]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x10067b75
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.ServiceManager::Create
lea edx, [edi + 4]
mov dword [ebp - 0x424], eax
lea ecx, [ebp - 0x4d4]
call fcn.1000aed0
add esp, 4
mov edi, eax
mov dword [ebp - 4], 2
mov al, byte [edi + 0x48]
test al, al
je 0x10067a48
mov edx, str.CreateService_err
mov ecx, edi
call fcn.100205a0
mov al, byte [edi + 0x48]
test al, al
je 0x10067a48
push dword [ebp - 0x424]
mov ecx, edi
call fcn.10026c90
lea ecx, [ebp - 0x4d4]
mov dword [ebp - 4], 0xffffffff
call fcn.1000ad70
cmp dword [ebp - 0x424], 0x431
jne 0x10067ad6
mov eax, dword [ebp - 0x428]
push 2
add eax, 4
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
jne 0x10067ae0
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push str.ServiceManager::Create
mov edx, 4
lea ecx, [ebp - 0x4d4]
mov edi, eax
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 3
mov al, byte [esi + 0x48]
test al, al
je 0x10067acb
mov edx, str.CreateService_err
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x10067acb
push edi
mov ecx, esi
call fcn.10026c90
lea ecx, [ebp - 0x4d4]
call fcn.1000ad70
mov esi, 0x6e
jmp 0x10067b7c
mov eax, dword [ebp - 0x428]
add eax, 4
push eax
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x218]
push eax
push 1
push dword [ebp - 0x42c]
push 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x10067b75
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push str.ServiceManager::Create
mov edx, 4
mov dword [ebp - 0x42c], eax
lea ecx, [ebp - 0x57c]
call fcn.1000aed0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 4
mov al, byte [esi + 0x48]
test al, al
je 0x10067b65
mov edx, str.service_exists__ChangeServiceConfig_err
mov ecx, esi
call fcn.100205a0
mov al, byte [esi + 0x48]
test al, al
je 0x10067b65
push dword [ebp - 0x42c]
mov ecx, esi
call fcn.10026c90
lea ecx, [ebp - 0x57c]
call fcn.1000ad70
mov esi, 0x6e
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
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.101157bc
mov esp, ebp
pop ebp
ret 8