Function at 0x10001610
Capabilities:
Create service
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001f978
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x10030034]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ecx]
test eax, eax
je 0x100017ff
mov edi, dword [ebp + 0xc]
push 0
push 0
push dword [ebp + 0x20]
mov ebx, dword [ebp + 8]
push 0
push dword [ebp + 0x14]
push edi
push 1
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push 0xf01ff
push dword [ebp + 0x10]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x10001815
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x431
je 0x100016b9
cmp esi, 0x430
je 0x100016b9
push ebx
push esi
push str.Failed_to_call_CreateService__Error___d__lpszDeviceName___s.
call fcn.10019db0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
push str.SYSTEMCurrentControlSetServices_
lea ecx, [ebp + 0xc]
mov dword [ebp - 4], 0
call fcn.100019d0
push ebx
mov edx, eax
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 1
call fcn.10001b40
add esp, 4
push 0x2001f
push dword [eax]
push ecx
lea ecx, [ebp - 0x18]
call fcn.10002390
mov edx, dword [ebp + 0x14]
test eax, eax
sete byte [ebp + 0x23]
add edx, 0xfffffff0
or eax, 0xffffffff
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x10001727
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10001748
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp + 0x23], 0
je 0x100017db
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0x20], esi
test byte [ebp + 0x18], 0xb
mov byte [ebp - 4], 2
je 0x10001791
cmp word [edi + 2], 0x3a
jne 0x10001791
push str.___
lea ecx, [ebp + 0x20]
call fcn.10001aa0
push edi
lea ecx, [ebp + 0x20]
call fcn.10001af0
mov esi, dword [ebp + 0x20]
mov edi, esi
push 2
push edi
push str.ImagePath
lea ecx, [ebp - 0x18]
call fcn.100022d0
mov edi, dword [ebp - 0x18]
push str.DeleteFlag
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x100017ce
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x1000181c
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1000181c
push ebx
push esi
push str.Service_is_exsit_or_marked_delete__but_failed_to_open_services_key__Error___d__lpszDeviceName___s.
call fcn.10019db0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x100017ff
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c