Function at 0x100168c5
Capabilities:
Create service
Delete service
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push esi
xor esi, esi
cmp dword [0x100e3020], esi
push edi
mov dword [ebp - 0x40], ecx
jne 0x10016979
lea eax, [ebp - 4]
push eax
push 0x100e3020
mov edi, str.Advapi32.DLL
push edi
push 0x100ca1b0
mov dword [ebp - 4], esi
call fcn.10040e9d
lea eax, [ebp - 4]
push eax
push 0x100e3024
push edi
push 0x100ca1a0
call fcn.10040e9d
lea eax, [ebp - 4]
push eax
push 0x100e3028
push edi
push str.QueryServiceStatusEx
call fcn.10040e9d
lea eax, [ebp - 4]
push eax
push 0x100e302c
push edi
push 0x100ca178
call fcn.10040e9d
add esp, 0x40
lea eax, [ebp - 4]
push eax
push 0x100e3030
push edi
push 0x100ca168
call fcn.10040e9d
lea eax, [ebp - 4]
push eax
push 0x100e3034
push edi
push 0x100ca154
call fcn.10040e9d
add esp, 0x20
cmp dword [0x100e3020], esi
jne 0x10016979
mov eax, 0x80004001
jmp 0x10016fa1
push ebx
push esi
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 9
pop ecx
push 0xf003f
xor ebx, ebx
xor eax, eax
push esi
lea edi, [ebp - 0x6c]
inc ebx
rep stosd dword es:[edi], eax
push esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x2c], esi
xor edi, edi
call dword [0x100e3020]
cmp eax, esi
mov dword [ebp - 0x20], eax
je 0x10016dca
or dword [ebp - 4], 0xffffffff
push 2
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
pop edi
jmp 0x10016b2e
push 7
lea eax, [ebp + 8]
push eax
push str._create
call fcn.10048195
add esp, 0xc
test al, al
je 0x100169f1
mov dword [ebp - 0x14], ebx
jmp 0x10016b2e
push 7
lea eax, [ebp + 8]
push eax
push str._delete
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016a10
mov dword [ebp - 0x1c], ebx
jmp 0x10016b2e
push 5
lea eax, [ebp + 8]
push eax
push 0x100ca13c
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016a2f
mov dword [ebp - 0x24], ebx
jmp 0x10016b2e
push 5
lea eax, [ebp + 8]
push eax
push str._auto
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016a4e
mov dword [ebp - 4], edi
jmp 0x10016b2e
push 5
lea eax, [ebp + 8]
push eax
push str._boot
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016a6d
mov dword [ebp - 4], esi
jmp 0x10016b2e
push 7
lea eax, [ebp + 8]
push eax
push str._demand
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016a90
mov dword [ebp - 4], 3
jmp 0x10016b2e
push 9
lea eax, [ebp + 8]
push eax
push str._disabled
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016ab0
mov dword [ebp - 4], 4
jmp 0x10016b2e
push 0xd
lea eax, [ebp + 8]
push eax
push str._delayed_auto
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016acf
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], ebx
jmp 0x10016b2e
push 6
lea eax, [ebp + 8]
push eax
push str._start
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016aeb
mov dword [ebp - 0xc], edi
jmp 0x10016b2e
push 5
lea eax, [ebp + 8]
push eax
push str._stop
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016b07
mov dword [ebp - 0xc], ebx
jmp 0x10016b2e
push 6
lea eax, [ebp + 8]
push eax
push str._stop_
call fcn.10048195
add esp, 0xc
test al, al
je 0x10016b24
or dword [ebp - 0xc], 0xffffffff
jmp 0x10016b2e
lea eax, [ebp + 8]
push eax
call fcn.10008e60
pop ecx
mov ecx, dword [ebp + 8]
cmp word [ecx], 0x2d
je 0x100169d2
mov ax, word [ecx]
cmp ax, 0x3f
jne 0x10016b6e
add ecx, edi
lea eax, [ebp + 8]
push eax
mov dword [ebp + 8], ecx
mov dword [ebp - 0x28], ecx
call fcn.10005b74
mov eax, dword [ebp + 8]
cmp word [eax], si
pop ecx
je 0x10016b64
mov word [eax], si
add dword [ebp + 8], edi
lea ecx, [ebp + 8]
call fcn.1000f804
jmp 0x10016b7c
cmp ax, 0x21
jne 0x10016b7c
add ecx, edi
mov dword [ebp + 8], ecx
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 0x14], esi
je 0x10016d4f
lea ecx, [ebp - 0xc]
call fcn.10046123
lea ecx, [ebp - 4]
call fcn.10046123
lea ecx, [ebp - 0x10]
call fcn.10046123
lea ecx, [ebp - 0x14]
call fcn.10046123
lea ecx, [ebp - 8]
call fcn.10046123
lea ecx, [ebp - 0x34]
call fcn.10046123
lea ecx, [ebp - 0x38]
call fcn.10046123
push esi
push 0x2c
pop edi
push edi
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], 0x10
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x3c], ebx
call fcn.1003ac59
push esi
push edi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.100149a9
push edi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 8]
push eax
call fcn.100149a9
push edi
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp + 8]
push eax
call fcn.100149a9
add esp, 0x44
push esi
push edi
lea eax, [ebp - 8]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
push esi
push edi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
push esi
push edi
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
push esi
push edi
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
add esp, 0x40
push esi
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 8]
push eax
call fcn.1003ac59
push edi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp + 8]
push eax
call fcn.100149a9
add esp, 0x1c
test eax, eax
lea ebx, [ebp - 0x44]
jne 0x10016c8a
mov ebx, esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 8]
call fcn.10046168
mov ecx, dword [ebp - 8]
lea eax, [edi + edi]
mov word [eax + ecx + 2], si
mov ecx, dword [ebp - 8]
mov word [eax + ecx], si
mov eax, dword [ebp - 0x34]
cmp word [eax], si
mov edi, eax
jne 0x10016cbf
xor edi, edi
mov eax, dword [ebp - 4]
cmp word [eax], si
jne 0x10016cd2
push dword [ebp - 0xc]
lea ecx, [ebp - 4]
call fcn.1005026c
mov eax, dword [ebp - 8]
jmp 0x10016ce5
cmp word [eax], 0x2f
jne 0x10016ce3
mov word [eax], si
mov eax, dword [ebp + 8]
inc eax
inc eax
mov dword [ebp + 8], eax
cmp word [eax], si
jne 0x10016cd7
push dword [ebp - 0x38]
push edi
push dword [ebp - 8]
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push dword [ebp - 0x3c]
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
push 0xf01ff
push dword [ebp - 4]
push dword [ebp - 0xc]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
lea ecx, [ebp - 0x38]
mov edi, eax
call fcn.1003f96c
lea ecx, [ebp - 0x34]
call fcn.1003f96c
lea ecx, [ebp - 8]
call fcn.1003f96c
lea ecx, [ebp - 0x14]
call fcn.1003f96c
lea ecx, [ebp - 0x10]
call fcn.1003f96c
lea ecx, [ebp - 4]
call fcn.1003f96c
lea ecx, [ebp - 0xc]
jmp 0x10016dc5
cmp dword [ebp - 0x1c], esi
je 0x10016e07
cmp dword [ebp - 0xc], esi
jl 0x10016d88
push str._wait__
lea ecx, [ebp - 0x10]
call fcn.100501eb
push dword [ebp + 8]
lea ecx, [ebp - 0x10]
call fcn.1004618f
push dword [ebp - 0x10]
mov ecx, dword [ebp - 0x40]
call fcn.100168c5
lea ecx, [ebp - 0x10]
call fcn.1003f96c
lea ecx, [ebp - 0x18]
call fcn.10046123
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0xc], esi
jl 0x10016da1
push 0x20
pop eax
jmp 0x10016da3
xor eax, eax
or eax, 0x10000
push eax
push dword [ebp + 8]
push dword [ebp - 0x20]
call dword [0x100e3024]
mov edi, eax
cmp edi, esi
je 0x10016dc2
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
lea ecx, [ebp - 0x18]
call fcn.1003f96c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp edi, esi
pop ebx
je 0x10016ddf
push edi
call dword [0x100e3034]
cmp dword [ebp - 0x20], esi
je 0x10016ded
push dword [ebp - 0x20]
call dword [0x100e3034]
cmp dword [ebp - 0x28], esi
je 0x10016f9e
cmp dword [ebp - 0x2c], esi
jne 0x10016f6f
push dword [ebp - 8]
jmp 0x10016f77
lea ecx, [ebp + 8]
call fcn.1000f804
push dword [ebp + 8]
call fcn.100132bf
mov dword [ebp + 8], eax
xor eax, eax
cmp dword [ebp - 0x28], esi
pop ecx
setne al
cmp eax, esi
mov dword [ebp - 0x2c], eax
je 0x10016e2f
push 4
pop eax
jmp 0x10016e3d
cmp dword [ebp - 4], esi
jl 0x10016e38
mov eax, edi
jmp 0x10016e3a
xor eax, eax
or eax, 0x34
push eax
push dword [ebp + 8]
push dword [ebp - 0x20]
call dword [0x100e3024]
mov edi, eax
cmp edi, esi
je 0x10016dca
cmp dword [ebp - 0x28], esi
je 0x10016ebf
lea eax, [ebp - 0x48]
push eax
push 0x24
lea eax, [ebp - 0x6c]
push eax
push esi
push edi
call dword [0x100e3028]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, esi
mov dword [ebp - 8], eax
jne 0x10016e8a
cmp eax, esi
je 0x10016f35
mov dword [ebp - 0x30], eax
jmp 0x10016f35
push dword [ebp - 0x4c]
lea eax, [ebp - 0x218]
push dword [ebp - 0x50]
mov dword [ebp - 0x30], esi
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push dword [ebp - 0x6c]
push str.0_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX_0x_lX
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x2c
jmp 0x10016f35
cmp dword [ebp - 4], esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jl 0x10016f57
mov eax, dword [ebp - 0x10]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x10016ef2
call ebx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 3
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp dword [ebp - 0x10], esi
je 0x10016f12
cmp eax, esi
jne 0x10016f12
cmp dword [ebp - 8], esi
jne 0x10016f12
call ebx
mov dword [ebp - 8], eax
cmp dword [ebp - 0xc], 1
je 0x10016f5d
cmp dword [ebp - 0xc], 2
jne 0x10016f35
push esi
push esi
push edi
call dword [0x100e3030]
cmp eax, esi
jne 0x10016f35
cmp dword [ebp - 8], esi
jne 0x10016f35
call ebx
mov dword [ebp - 8], eax
cmp dword [ebp - 0x24], esi
je 0x10016dd3
cmp dword [ebp - 0x2c], esi
jne 0x10016dd3
push dword [ebp - 0xc]
push edi
call fcn.10011877
pop ecx
pop ecx
jmp 0x10016dd3
cmp dword [ebp - 0xc], 1
jne 0x10016f1e
lea eax, [ebp - 0x88]
push eax
push 1
push edi
call dword [0x100e302c]
jmp 0x10016f27
cmp dword [ebp - 0x30], esi
je 0x10016f8c
push dword [ebp - 0x30]
lea eax, [ebp - 0x218]
push 0x100c72f0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x28]
call fcn.100457c2
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret 4