Function at 0x401300
Capabilities:
Create service
Delete service
Get process heap flags
Modify service
Start service
Stop service
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xa8
mov edi, dword [ecx]
mov ecx, dword [ecx + 4]
cmp edi, 2
jle 0x402230
mov eax, dword [ecx + 8]
cmp word [eax], 0x5c
jne 0x401339
cmp word [eax + 2], 0x5c
je 0x401998
mov dword [ebp - 0x3c], ecx
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call sym._OpenSCManagerW_12
mov ecx, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
mov dword [ebp - 0x6c], eax
je 0x401920
mov dword [esp + 4], str.create
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov esi, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
mov dword [ebp - 0x70], eax
jne 0x4015f8
cmp edi, 3
je 0x402224
lea eax, [edi - 3]
mov dword [ebp - 0x48], 1
mov edi, dword [sym.imp.ucrtbase.dll__wcsnicmp]
lea ebx, [ecx + 0xc]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x40], 3
mov dword [ebp - 0x3c], 0x10
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x74], ecx
jmp 0x40142c
mov dword [esp + 8], 6
mov dword [esp + 4], str.error
mov eax, dword [ebx]
mov dword [esp], eax
call edi
test eax, eax
je 0x4017f0
add dword [ebp - 0x44], 1
mov edx, dword [ebp - 0x4c]
add ebx, 4
mov eax, dword [ebp - 0x44]
cmp eax, edx
je 0x401880
mov dword [esp + 8], 0xc
mov dword [esp + 4], str.displayname
mov eax, dword [ebx]
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x40144f
lea ecx, [eax + 0x18]
mov dword [ebp - 0x58], ecx
mov dword [esp + 8], 8
mov dword [esp + 4], str.binpath
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x401470
lea edx, [eax + 0x10]
mov dword [ebp - 0x50], edx
mov dword [esp + 8], 6
mov dword [esp + 4], str.group
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x401491
lea ecx, [eax + 0xc]
mov dword [ebp - 0x64], ecx
mov dword [esp + 8], 7
mov dword [esp + 4], str.depend
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x4014b2
lea edx, [eax + 0xe]
mov dword [ebp - 0x60], edx
mov dword [esp + 8], 4
mov dword [esp + 4], str.obj
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x4014d3
lea ecx, [eax + 8]
mov dword [ebp - 0x5c], ecx
mov dword [esp + 8], 9
mov dword [esp + 4], str.password
mov dword [esp], eax
call edi
test eax, eax
mov eax, dword [ebx]
jne 0x4014f4
lea edx, [eax + 0x12]
mov dword [ebp - 0x54], edx
mov dword [esp + 8], 4
mov dword [esp + 4], str.tag
mov dword [esp], eax
call edi
test eax, eax
je 0x4017a0
mov dword [esp + 8], 5
mov dword [esp + 4], str.type
mov eax, dword [ebx]
mov dword [esp], eax
call edi
test eax, eax
je 0x4016d0
mov dword [esp + 8], 6
mov dword [esp + 4], 0x404308
mov eax, dword [ebx]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4013f8
mov dword [ebp - 0x68], eax
mov dword [esp + 4], str.boot
mov eax, dword [ebx]
add eax, 0xc
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x68]
test eax, eax
cmovne edx, dword [ebp - 0x40]
mov dword [ebp - 0x40], edx
mov dword [esp + 4], str.system
mov eax, dword [ebx]
add eax, 0xc
mov dword [esp], eax
call esi
test eax, eax
mov eax, 1
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov dword [esp + 4], str.auto
mov edx, dword [ebx]
lea eax, [edx + 0xc]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 2
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov dword [esp + 4], str.demand
mov edx, dword [ebx]
lea eax, [edx + 0xc]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 3
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov dword [esp + 4], str.disabled
mov edx, dword [ebx]
lea eax, [edx + 0xc]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 4
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
jmp 0x4013f8
mov dword [esp + 4], str.description
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
jne 0x4019d0
mov dword [esp + 8], 2
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._OpenServiceW_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b60
xor eax, eax
cmp edi, 3
je 0x40164a
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._ChangeServiceConfig2W_12
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x4016b0
test byte [0x403000], 2
je 0x4016b0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_set_service_description__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
lea esi, [esi]
nop
mov dword [esp], ebx
call sym._CloseServiceHandle_4
xor eax, eax
sub esp, 4
test esi, esi
sete al
mov dword [ebp - 0x70], eax
jmp 0x401902
mov dword [esp + 4], 0x4042bc
mov eax, dword [ebx]
add eax, 0xa
mov dword [esp], eax
call esi
test eax, eax
mov eax, 0x10
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], str.share
mov edx, dword [ebx]
lea eax, [edx + 0xa]
mov dword [esp], eax
call esi
mov ecx, 0x20
test eax, eax
cmovne ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], ecx
mov dword [esp + 4], str.kernel
mov eax, dword [ebx]
add eax, 0xa
mov dword [esp], eax
call esi
test eax, eax
mov eax, 1
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], str.filesys
mov ecx, dword [ebx]
lea eax, [ecx + 0xa]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 2
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], 0x4042ee
mov ecx, dword [ebx]
lea eax, [ecx + 0xa]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 8
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov dword [esp + 4], str.interact
mov edx, dword [ebx]
lea eax, [edx + 0xa]
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
mov edx, eax
mov eax, ecx
or ah, 1
test edx, edx
cmovne eax, ecx
mov dword [ebp - 0x3c], eax
jmp 0x401530
mov dword [esp + 4], 0x40428c
mov eax, dword [ebx]
add eax, 8
mov dword [esp], eax
call esi
test eax, eax
jne 0x401511
test byte [0x403000], 1
je 0x401511
mov dword [esp + 0xc], str.tag_argument_not_supported_n
mov dword [esp + 8], str.parse_create_params
mov dword [esp + 4], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x401511
mov dword [ebp - 0x68], eax
mov dword [esp + 4], str.normal
mov eax, dword [ebx]
add eax, 0xc
mov dword [esp], eax
call esi
test eax, eax
mov eax, 1
cmovne eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov dword [esp + 4], str.severe
mov ecx, dword [ebx]
lea eax, [ecx + 0xc]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 2
cmovne eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov dword [esp + 4], str.critical
mov edx, dword [ebx]
lea eax, [edx + 0xc]
mov dword [esp], eax
call esi
test eax, eax
mov eax, 3
cmovne eax, dword [ebp - 0x48]
mov dword [ebp - 0x48], eax
mov dword [esp + 4], str.ignore
mov ecx, dword [ebx]
lea eax, [ecx + 0xc]
mov dword [esp], eax
call esi
mov edx, dword [ebp - 0x68]
test eax, eax
cmovne edx, dword [ebp - 0x48]
mov dword [ebp - 0x48], edx
jmp 0x401417
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x74]
test eax, eax
je 0x401950
mov esi, dword [ebp - 0x54]
mov dword [esp + 0x30], esi
mov esi, dword [ebp - 0x5c]
mov dword [esp + 0x2c], esi
mov esi, dword [ebp - 0x60]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], esi
mov esi, dword [ebp - 0x64]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], esi
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0xc], 0xf01ff
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x58]
mov dword [esp + 8], eax
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CreateServiceW_52
sub esp, 0x34
test eax, eax
je 0x401978
mov dword [esp], eax
call sym._CloseServiceHandle_4
sub esp, 4
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CloseServiceHandle_4
sub esp, 4
mov eax, dword [ebp - 0x70]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test byte [0x403000], 2
je 0x40196b
mov dword [esp + 0xc], str.failed_to_open_service_manager_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40196b
test byte [0x403000], 2
jne 0x401b30
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CloseServiceHandle_4
sub esp, 4
mov dword [ebp - 0x70], 1
jmp 0x401910
test byte [0x403000], 2
jne 0x401f5f
mov dword [ebp - 0x70], 1
jmp 0x401902
test byte [0x403000], 1
je 0x40196b
mov dword [esp + 0xc], str.server_argument_not_supported_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x40196b
mov dword [esp + 4], str.failure
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
jne 0x401ba3
mov dword [esp + 8], 2
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._OpenServiceW_12
mov dword [ebp - 0x58], eax
sub esp, 0xc
test eax, eax
je 0x401b60
cmp edi, 3
mov dword [ebp - 0x34], 0
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
je 0x401fd9
lea eax, [ecx + 0xc]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], eax
lea eax, [edi - 3]
mov edi, dword [sym.imp.ucrtbase.dll__wcsnicmp]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x48], esi
jmp 0x401acf
mov eax, dword [esi]
mov dword [esp + 8], 8
mov dword [esp + 4], str.command
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
test eax, eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
jne 0x401a99
lea edx, [eax + 0x10]
mov dword [ebp - 0x2c], edx
mov dword [esp + 8], 8
mov dword [esp + 4], str.actions
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
test eax, eax
je 0x401d00
add dword [ebp - 0x44], 1
mov esi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x44]
add dword [ebp - 0x3c], 4
cmp eax, esi
je 0x401fd9
mov dword [esp + 8], 6
mov dword [esp + 4], str.reset
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
test eax, eax
je 0x401ee0
mov dword [esp + 8], 7
mov dword [esp + 4], 0x404446
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi]
mov dword [esp], eax
mov eax, dword [ebp - 0x40]
call eax
test eax, eax
jne 0x401a70
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
lea edx, [eax + 0xe]
mov dword [ebp - 0x30], edx
jmp 0x401a72
mov dword [esp + 0xc], str.failed_to_parse_create_parameters_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x40195d
test byte [0x403000], 2
je 0x401985
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_open_service__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x401985
mov dword [esp + 4], str.delete
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
je 0x401c78
mov dword [esp + 4], str.start
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
jne 0x40203c
mov dword [esp + 8], 0x10
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._OpenServiceW_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b60
mov ecx, dword [ebp - 0x3c]
lea esi, [edi - 3]
mov dword [esp], ebx
mov dword [esp + 4], esi
lea eax, [ecx + 0xc]
mov dword [esp + 8], eax
call sym._StartServiceW_12
mov ecx, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
mov esi, eax
jne 0x4021aa
test byte [0x403000], 2
je 0x4016b0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_start_service__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4016b0
mov dword [esp + 8], 0x10000
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._OpenServiceW_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b60
mov dword [esp], eax
call sym._DeleteService_4
sub esp, 4
mov esi, eax
test eax, eax
jne 0x4016b0
test byte [0x403000], 2
je 0x4016b0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_delete_service__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4016b0
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
cmp word [ebx + 0x10], 0
lea edx, [ebx + 0x10]
je 0x401fcf
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401d18
sub eax, edx
add eax, 2
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401fb3
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [ebx + eax + 0x10]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x401d60
movzx edx, word [esi]
test dx, dx
je 0x4020f0
mov eax, esi
xor ebx, ebx
lea esi, [esi]
cmp dx, 0x2f
jne 0x401d96
xor ecx, ecx
add ebx, 1
mov word [eax], cx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401d88
mov eax, ebx
shr eax, 1
add eax, 1
mov dword [ebp - 0x4c], eax
shl eax, 3
mov edi, dword [ebp - 0x4c]
mov ebx, dword fs:[0x18]
mov dword [ebp - 0x28], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x24], eax
sub esp, 0xc
test eax, eax
je 0x401f95
mov dword [ebp - 0x54], esi
mov edi, esi
xor ebx, ebx
lea esi, [esi]
mov dword [esp + 4], 0x40447a
lea esi, [ebx*8]
mov dword [esp], edi
mov eax, dword [ebp - 0x48]
call eax
test eax, eax
jne 0x401eb8
mov eax, dword [ebp - 0x24]
mov dword [eax + ebx*8], 3
cmp word [edi], 0
je 0x401f20
mov ecx, edi
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x401e28
sub ecx, edi
add ecx, 2
add edi, ecx
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x24]
mov dword [edx + esi + 4], eax
cmp word [edi], 0
je 0x401f10
mov eax, edi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401e68
sub eax, edi
lea edx, [eax + 2]
mov eax, dword [ebp - 0x4c]
add ebx, 1
add edi, edx
cmp ebx, eax
jne 0x401df0
mov esi, dword [ebp - 0x54]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x401ab9
mov dword [esp + 4], str.restart
mov dword [esp], edi
mov eax, dword [ebp - 0x48]
call eax
test eax, eax
jne 0x401f30
mov eax, dword [ebp - 0x24]
mov dword [eax + esi], 1
jmp 0x401e19
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
mov dword [ebp - 0x4c], eax
add eax, 0xc
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x34], eax
jmp 0x401af4
mov edx, 2
jmp 0x401e76
mov ecx, 2
jmp 0x401e36
mov dword [esp + 4], str.reboot
mov dword [esp], edi
mov eax, dword [ebp - 0x48]
call eax
test eax, eax
mov eax, dword [ebp - 0x24]
jne 0x401f53
mov dword [eax + esi], 2
jmp 0x401e19
mov dword [eax + esi], 0
jmp 0x401e19
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_create_service__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x401985
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
test byte [0x403000], 2
jne 0x402136
mov dword [ebp - 0x70], 1
mov eax, dword [ebp - 0x58]
jmp 0x4018f7
mov eax, 2
jmp 0x401d26
lea eax, [ebp - 0x34]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sym._ChangeServiceConfig2W_12
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x402009
test byte [0x403000], 2
jne 0x4021ba
mov edx, dword [ebp - 0x24]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
xor eax, eax
sub esp, 0xc
test esi, esi
sete al
mov dword [ebp - 0x70], eax
jmp 0x401fc7
mov dword [esp + 4], str.stop
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
jne 0x402101
mov dword [esp + 8], 0x20
mov eax, dword [ecx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._OpenServiceW_12
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b60
lea eax, [ebp - 0x34]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._ControlService_12
mov ecx, dword [ebp - 0x3c]
sub esp, 0xc
test eax, eax
mov esi, eax
jne 0x4021aa
test byte [0x403000], 2
je 0x4016b0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_stop_service__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x4016b0
mov dword [ebp - 0x4c], 1
mov eax, 8
jmp 0x401daf
mov dword [esp + 4], str.query
mov eax, dword [ecx + 4]
mov dword [ebp - 0x3c], ecx
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x3c]
test eax, eax
jne 0x40215f
mov edx, dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
call dbg.query_service
test eax, eax
sete al
movzx eax, al
mov dword [ebp - 0x70], eax
jmp 0x401902
mov dword [esp + 0xc], str.failed_to_parse_failure_parameters_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x401fc0
mov dword [esp + 4], str.sdset
mov eax, dword [ecx + 4]
mov dword [esp], eax
call esi
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x4021f0
test byte [0x403000], 1
je 0x401902
xor edx, edx
mov dword [esp + 0xc], str.SdSet_command_not_supported__faking_success_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], edx
call sym._wine_dbg_log.constprop.0
jmp 0x401902
mov edx, dword [ecx + 8]
mov eax, dword [ebp - 0x6c]
call dbg.query_service
jmp 0x4016b0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_set_service_failure_actions__lu_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402009
test byte [0x403000], 1
je 0x401985
xor eax, eax
mov dword [esp + 0xc], str.command_not_supported_n
mov dword [esp + 8], global___FUNCTION__
mov dword [esp + 4], global___dbch
mov dword [esp], eax
call sym._wine_dbg_log.constprop.0
jmp 0x401985
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sym._CloseServiceHandle_4
push ebx
mov dword [esp], str.Usage:_sc_command_servicename__parameter_value_...__n
call sym._wine_dbg_printf.constprop.0
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
nop
nop
nop
nop
nop
nop
nop