Function at 0x10008d9d
Capabilities:
Modify service

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x10014024]
mov ebx, 0x10014024
cmp eax, ebx
je 0x10008dd1
test byte [eax + 0x1c], 1
je 0x10008dd1
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x92
push dword [eax + 0x10]
call fcn.10002ea3
push 1
push 0
push 0
mov edi, 0x80070005
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
je 0x10009185
mov eax, dword [0x10014024]
push 2
pop ebx
cmp eax, 0x10014024
je 0x10008e1e
test byte [eax + 0x1c], bl
je 0x10008e1e
cmp byte [eax + 0x19], 5
jb 0x10008e1e
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x94
push dword [eax + 0x10]
call fcn.10002ea3
and dword [ebp - 4], 0
and dword [ebp - 0x10], 0
push 1
push 0x10001db4
push esi
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10009145
mov edi, 0x2000
push edi
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
xor ecx, ecx
mov esi, eax
test esi, esi
setne cl
mov dword [ebp - 0x18], ecx
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x10008e8a
test byte [eax + 0x1c], bl
je 0x10008e8a
cmp byte [eax + 0x19], 5
jb 0x10008e8a
push ecx
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x95
push dword [eax + 0x10]
call fcn.10002ec1
mov eax, dword [0x10014024]
and dword [ebp - 8], 0
test esi, esi
je 0x10008efb
lea eax, [ebp - 0x18]
mov dword [ebp - 8], esi
push eax
push edi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceConfigW]
mov edi, eax
test edi, edi
jne 0x10008ef4
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x10008fd2
test byte [eax + 0x1c], bl
je 0x10008fd2
cmp byte [eax + 0x19], bl
jb 0x10008fd2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x10014024]
mov edx, 0x10002130
mov ecx, 0x96
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
mov eax, dword [0x10014024]
jmp 0x10008efe
mov eax, dword [0x10014024]
jmp 0x10008f06
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x10008fd2
mov edi, dword [ebp - 8]
cmp eax, 0x10014024
je 0x10008f33
test byte [eax + 0x1c], bl
je 0x10008f33
cmp byte [eax + 0x19], 5
jb 0x10008f33
push dword [edi + 4]
mov edx, 0x10002130
mov ecx, 0x97
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
xor eax, eax
cmp dword [edi + 4], ebx
setne al
mov dword [ebp - 4], eax
lea eax, [ebp - 0x18]
push eax
push 0x2000
push esi
push 3
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceConfig2W]
mov edi, eax
test edi, edi
jne 0x10008f92
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x10008fcc
test byte [eax + 0x1c], bl
je 0x10008fcc
cmp byte [eax + 0x19], bl
jb 0x10008fcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x10014024]
mov edx, 0x10002130
mov ecx, 0x98
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
jmp 0x10008fcc
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x10008fc0
test byte [eax + 0x1c], bl
je 0x10008fc0
cmp byte [eax + 0x19], 5
jb 0x10008fc0
push dword [esi]
mov edx, 0x10002130
mov ecx, 0x99
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
cmp dword [esi], 0
jne 0x10008fd2
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 4]
mov dword [ebp - 4], eax
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
test edi, edi
je 0x10009133
cmp dword [ebp - 4], 0
jne 0x10009022
cmp dword [ebp - 0x10], 0
jne 0x10009022
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x1000901b
test byte [eax + 0x1c], bl
je 0x1000901b
cmp byte [eax + 0x19], 5
jb 0x1000901b
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x9a
push dword [eax + 0x10]
call fcn.10002ea3
xor edi, edi
jmp 0x10009138
push ebx
push 0x10001db4
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x10009133
cmp dword [ebp - 4], 0
je 0x10009119
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 0xffffffffffffffff
push ebx
push 0xffffffffffffffff
push ecx
call dword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfigW]
mov edi, eax
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x10009091
test byte [eax + 0x1c], bl
je 0x10009091
cmp byte [eax + 0x19], 5
jb 0x10009091
push edi
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x9b
push dword [eax + 0x10]
call fcn.10002ec1
mov eax, dword [0x10014024]
mov ecx, dword [ebp - 8]
test edi, edi
je 0x10009123
cmp dword [ebp - 0x10], 0
je 0x100090ea
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 3
push ecx
call dword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
mov edi, eax
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x100090ea
test byte [eax + 0x1c], bl
je 0x100090ea
cmp byte [eax + 0x19], 5
jb 0x100090ea
push edi
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x9c
push dword [eax + 0x10]
call fcn.10002ec1
mov eax, dword [0x10014024]
test edi, edi
je 0x10009123
cmp eax, 0x10014024
je 0x10009115
test byte [eax + 0x1c], bl
je 0x10009115
cmp byte [eax + 0x19], 5
jb 0x10009115
push dword [eax + 0x14]
mov edx, 0x10002130
mov ecx, 0x9d
push dword [eax + 0x10]
call fcn.10002ea3
xor edi, edi
jmp 0x10009128
mov eax, dword [0x10014024]
jmp 0x10009094
mov edi, 0x80070005
push dword [ebp - 8]
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x10009138
mov edi, 0x80070005
push esi
call dword [sym.imp.msvcrt.dll_free]
mov esi, dword [ebp - 0x14]
pop ecx
jmp 0x1000917c
mov eax, dword [0x10014024]
cmp eax, 0x10014024
je 0x1000917c
test byte [eax + 0x1c], bl
je 0x1000917c
cmp byte [eax + 0x19], bl
jb 0x1000917c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x10014024]
mov edx, 0x10002130
mov ecx, 0x9e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
push esi
call dword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
jmp 0x100091bd
mov edx, dword [0x10014024]
cmp edx, ebx
je 0x100091fa
push 2
pop ebx
test byte [edx + 0x1c], bl
je 0x100091c3
cmp byte [edx + 0x19], bl
jb 0x100091c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x10014024]
mov edx, 0x10002130
mov ecx, 0x9f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.10002ec1
mov edx, dword [0x10014024]
cmp edx, 0x10014024
je 0x100091fa
test byte [edx + 0x1c], 1
je 0x100091fa
movzx eax, byte [edx + 0x19]
mov ecx, edi
sar ecx, 0x1f
and ecx, 0xfffffffd
add ecx, 5
cmp eax, ecx
jl 0x100091fa
push edi
push dword [edx + 0x14]
mov ecx, 0xa0
push dword [edx + 0x10]
mov edx, 0x10002130
call fcn.10002ec1
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret