Function at 0x401390
Capabilities:
Create service
Delete service
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, 0xcc
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
cmp eax, 2
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edx
jle 0x40241f
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 8]
cmp word [eax], 0x5c
jne 0x4013db
cmp word [eax + 2], 0x5c
je 0x401a68
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
sub esp, 0xc
mov dword [ebp - 0xa0], eax
test eax, eax
je 0x401868
mov dword [esp + 4], str.create
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [ebp - 0xa4], eax
call eax
mov dword [ebp - 0x9c], eax
test eax, eax
jne 0x401638
cmp dword [ebp - 0x88], 3
je 0x40240f
mov eax, dword [ebp - 0x84]
xor ebx, ebx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x8c], 0
add eax, 0xc
mov dword [ebp - 0x78], 1
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x74], 3
mov dword [ebp - 0x70], 0x10
mov dword [ebp - 0x98], 0
sub eax, 3
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x68], 0
jmp 0x401557
lea eax, [ebp - 0x40]
mov dword [esp + 4], 6
mov edx, edi
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov eax, esi
mov dword [esp], str.group
call section..text
test eax, eax
je 0x4017f0
mov eax, dword [ebp - 0x48]
movq xmm2, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm2
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x78], eax
mov ebx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x64]
add ebx, 1
mov dword [ebp - 0x5c], ebx
cmp ebx, eax
jae 0x401740
mov eax, dword [ebp - 0x60]
lea edi, [ebx*4]
mov dword [esp + 8], 0xc
mov dword [esp + 4], str.displayname
lea esi, [eax + edi]
mov eax, dword [esi]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x4015a1
mov eax, dword [esi]
cmp word [eax + 0x18], 0
jne 0x401720
mov eax, dword [ebp - 0x88]
sub eax, 4
cmp ebx, eax
jb 0x401850
mov eax, dword [ebp - 0x68]
lea ecx, [ebp - 0x5c]
movq xmm0, qword [ebp - 0x90]
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x44]
mov dword [esp + 8], eax
mov dword [esp + 4], 8
mov dword [esp], str.binpath
mov edi, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
mov edx, edi
mov eax, esi
call section..text
test eax, eax
je 0x4014d0
mov eax, dword [ebp - 0x48]
movq xmm1, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm1
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], eax
jmp 0x40151f
mov dword [esp + 4], str.description
mov esi, dword [ebp - 0x84]
mov eax, dword [esi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x401ad0
mov dword [esp + 8], 2
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401cb0
xor eax, eax
cmp dword [ebp - 0x88], 3
je 0x401695
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_ChangeServiceConfig2W]
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x4016f8
test byte [section..data], 2
je 0x4016f8
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
lea esi, cs:[esi]
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [esp], ebx
call edi
xor eax, eax
sub esp, 4
test esi, esi
sete al
mov dword [ebp - 0x9c], eax
jmp 0x4017d5
mov ebx, dword [ebp - 0x5c]
add eax, 0x18
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x64]
add ebx, 1
mov dword [ebp - 0x5c], ebx
cmp ebx, eax
jb 0x401557
lea esi, [esi]
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
je 0x401891
mov eax, dword [ebp - 0x98]
mov dword [esp + 0x30], eax
mov eax, dword [ebp - 0x94]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp - 0x7c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], eax
mov eax, dword [ebp - 0x80]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x78]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x74]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 0xc], 0xf01ff
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x68]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CreateServiceW]
sub esp, 0x34
test eax, eax
je 0x401a40
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [esp], eax
call edi
sub esp, 4
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call edi
sub esp, 4
jmp 0x40187f
lea eax, [ebp - 0x3c]
mov dword [esp + 4], 7
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.depend
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
test eax, eax
je 0x4018b8
mov eax, dword [ebp - 0x48]
movq xmm3, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm3
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], eax
jmp 0x40151f
mov eax, dword [ebp - 0x60]
add ebx, 1
mov eax, dword [eax + edi + 4]
mov dword [ebp - 0x68], eax
jmp 0x401546
test byte [section..data], 2
jne 0x401c50
mov dword [ebp - 0x9c], 1
mov eax, dword [ebp - 0x9c]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test byte [section..data], 2
jne 0x401c80
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
sub esp, 4
jmp 0x401875
lea eax, [ebp - 0x38]
mov dword [esp + 4], 4
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.obj
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
test eax, eax
jne 0x401aa0
lea eax, [ebp - 0x34]
mov dword [esp + 4], 9
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.password
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
mov edx, dword [ebp - 0x48]
movq xmm5, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm5
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x6c], edx
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x80], edx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], edx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x94], edx
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x98], edx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x70], edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x74], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x78], edx
test eax, eax
jne 0x401543
lea eax, [ebp - 0x58]
mov dword [esp + 4], 4
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.tag
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
test eax, eax
jne 0x401e3e
lea eax, [ebp - 0x54]
mov dword [esp + 4], 5
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.type
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
test eax, eax
jne 0x402150
lea eax, [ebp - 0x50]
mov dword [esp + 4], 6
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], 0x405308
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
test eax, eax
jne 0x40217f
lea eax, [ebp - 0x4c]
mov dword [esp + 4], 6
mov dword [esp + 8], eax
lea ecx, [ebp - 0x5c]
mov dword [esp], str.error
mov edx, dword [ebp - 0x60]
mov eax, dword [ebp - 0x64]
call section..text
mov ebx, dword [ebp - 0x5c]
test eax, eax
je 0x401546
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], str.normal
mov esi, eax
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x4023a2
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x78], 1
jmp 0x401546
test byte [section..data], 2
jne 0x401e78
mov dword [ebp - 0x9c], 1
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x4017d5
test byte [section..data], 1
je 0x401875
mov dword [esp + 0xc], str.server_argument_not_supported_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 0
call fcn.00401150
jmp 0x401875
mov eax, dword [ebp - 0x48]
movq xmm4, qword [ebp - 0x38]
movq qword [ebp - 0x90], xmm4
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x7c], eax
jmp 0x40151f
mov dword [esp + 4], str.failure
mov edi, dword [ebp - 0x84]
mov eax, dword [edi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x401cf8
mov dword [esp + 8], 2
mov eax, dword [edi + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401cb0
add edi, 0xc
mov dword [ebp - 0x48], 0
mov eax, edi
mov edi, dword [ebp - 0x88]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
sub edi, 3
mov dword [ebp - 0x54], 0
je 0x401eb1
mov dword [ebp - 0x68], esi
mov esi, eax
jmp 0x401c01
lea eax, [ebp - 0x44]
mov dword [esp + 4], 7
mov edx, esi
mov dword [esp + 8], eax
lea ecx, [ebp - 0x54]
mov eax, edi
mov dword [esp], 0x405446
call section..text
test eax, eax
jne 0x401bf0
lea eax, [ebp - 0x40]
mov dword [esp + 4], 8
mov edx, esi
mov dword [esp + 8], eax
lea ecx, [ebp - 0x54]
mov eax, edi
mov dword [esp], str.command
call section..text
test eax, eax
jne 0x401bf0
lea eax, [ebp - 0x4c]
mov dword [esp + 4], 8
mov edx, esi
mov dword [esp + 8], eax
lea ecx, [ebp - 0x54]
mov eax, edi
mov dword [esp], str.actions
call section..text
mov ebx, eax
test eax, eax
jne 0x401f0b
lea esi, cs:[esi]
mov eax, dword [ebp - 0x54]
add eax, 1
mov dword [ebp - 0x54], eax
cmp eax, edi
jae 0x401eae
lea eax, [ebp - 0x50]
mov dword [esp + 4], 6
mov edx, esi
mov dword [esp + 8], eax
lea ecx, [ebp - 0x54]
mov eax, edi
mov dword [esp], str.reset
call section..text
test eax, eax
je 0x401b70
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x50]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x48], eax
jmp 0x401bf0
mov dword [esp + 0xc], str.failed_to_open_service_manager_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
call fcn.00401150
jmp 0x401875
mov dword [esp + 0xc], str.failed_to_parse_create_parameters_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
call fcn.00401150
jmp 0x40189e
test byte [section..data], 2
je 0x401a4d
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x401a4d
mov dword [esp + 4], str.delete
mov esi, dword [ebp - 0x84]
mov eax, dword [esi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
je 0x401dc2
mov dword [esp + 4], str.start
mov edi, dword [ebp - 0x84]
mov eax, dword [edi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x402098
mov dword [esp + 8], 0x10
mov eax, dword [edi + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401cb0
lea eax, [edi + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x88]
mov dword [esp], esi
sub eax, 3
mov dword [esp + 4], eax
call dword [sym.imp.advapi32.dll_StartServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x4022dd
test byte [section..data], 2
jne 0x402307
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [esp], esi
call edi
xor eax, eax
sub esp, 4
test ebx, ebx
sete al
mov dword [ebp - 0x9c], eax
jmp 0x4017d5
mov dword [esp + 8], 0x10000
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401cb0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_DeleteService]
sub esp, 4
mov ebx, eax
test eax, eax
jne 0x401da2
test byte [section..data], 2
je 0x401da2
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x401da2
mov dword [esp + 4], 0x40528c
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
mov ebx, dword [ebp - 0x5c]
test eax, eax
jne 0x401546
test byte [section..data], 1
jne 0x40228a
mov dword [ebp - 0x24], 1
jmp 0x401546
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x401a4d
mov esi, dword [ebp - 0x68]
lea eax, [ebp - 0x48]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [sym.imp.advapi32.dll_ChangeServiceConfig2W]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x401edf
test byte [section..data], 2
jne 0x40233d
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
xor eax, eax
test ebx, ebx
sete al
mov dword [ebp - 0x9c], eax
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [esp], esi
call edi
sub esp, 4
jmp 0x4017d5
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [ebp - 0x64], eax
test eax, eax
je 0x402544
movzx edx, word [eax]
test dx, dx
je 0x4022f6
xor ecx, ecx
cmp dx, 0x2f
jne 0x401f3e
xor edx, edx
add ecx, 1
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401f30
shr ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x60], eax
shl eax, 3
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x3c], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x4024d2
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x70], edi
xor ebx, ebx
mov dword [ebp - 0x6c], esi
mov edi, edx
lea esi, [esi]
mov dword [esp + 4], 0x40547a
lea esi, [ebx*8]
mov dword [esp], edi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x402038
mov eax, dword [ebp - 0x38]
mov dword [eax + ebx*8], 3
cmp word [edi], 0
je 0x402065
mov ecx, edi
lea esi, cs:[esi]
add ecx, 2
cmp word [ecx], 0
jne 0x401fc0
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 - 0x38]
mov dword [edx + esi + 4], eax
cmp word [edi], 0
je 0x40205e
mov eax, edi
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x402000
sub eax, edi
lea edx, [eax + 2]
mov eax, dword [ebp - 0x60]
add ebx, 1
add edi, edx
cmp ebx, eax
jne 0x401f80
mov eax, dword [ebp - 0x64]
mov esi, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x70]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x401bf0
mov dword [esp + 4], str.restart
mov dword [esp], edi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x40206f
mov eax, dword [ebp - 0x38]
mov dword [eax + esi], 1
jmp 0x401fac
mov edx, 2
jmp 0x40200e
mov ecx, 2
jmp 0x401fce
mov dword [esp + 4], str.reboot
mov dword [esp], edi
mov eax, dword [ebp - 0xa4]
call eax
mov ecx, dword [ebp - 0x38]
add ecx, esi
test eax, eax
sete al
movzx eax, al
add eax, eax
mov dword [ecx], eax
jmp 0x401fac
mov dword [esp + 4], str.stop
mov esi, dword [ebp - 0x84]
mov eax, dword [esi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x4021ae
mov dword [esp + 8], 0x20
mov eax, dword [esi + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401cb0
lea eax, [ebp - 0x48]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_ControlService]
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x4023f6
test byte [section..data], 2
je 0x4016f8
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x4016f8
mov eax, dword [ebp - 0x54]
mov dword [esp + 4], 0x4052bc
mov esi, eax
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x4021f5
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x70], 0x10
jmp 0x401546
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], str.boot
mov esi, eax
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x4022b3
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x74], 0
jmp 0x401546
mov dword [esp + 4], str.query
mov esi, dword [ebp - 0x84]
mov eax, dword [esi + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x40221f
mov edx, dword [esi + 8]
mov eax, dword [ebp - 0xa0]
call fcn.004011b0
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
test eax, eax
sete al
movzx eax, al
mov dword [ebp - 0x9c], eax
jmp 0x4017d5
mov dword [esp + 4], str.share
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x4023cc
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x70], 0x20
jmp 0x401546
mov dword [esp + 4], str.sdset
mov eax, dword [ebp - 0x84]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0xa4]
call eax
mov edx, eax
mov dword [ebp - 0x9c], eax
movzx eax, byte [section..data]
and eax, 1
test edx, edx
jne 0x402373
test al, al
je 0x401a57
xor edx, edx
mov dword [esp + 0xc], str.SdSet_command_not_supported__faking_success_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], edx
call fcn.00401150
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x4017d5
mov dword [esp + 0xc], str.tag_argument_not_supported_n
mov dword [esp + 8], str.parse_create_params
mov dword [esp + 4], 0x404000
mov dword [esp], 0
call fcn.00401150
jmp 0x401e6c
mov dword [esp + 4], str.system
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x402438
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x74], 1
jmp 0x401546
mov eax, dword [ebp - 0x84]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0xa0]
call fcn.004011b0
jmp 0x401da2
mov eax, 8
mov dword [ebp - 0x60], 1
jmp 0x401f55
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x401da2
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], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.00401150
jmp 0x401edf
test al, al
je 0x401a4d
xor eax, eax
mov dword [esp + 0xc], str.command_not_supported_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], eax
call fcn.00401150
jmp 0x401a4d
mov dword [esp + 4], str.severe
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x40245e
mov ebx, dword [ebp - 0x5c]
mov dword [ebp - 0x78], 2
jmp 0x401546
mov dword [esp + 4], str.kernel
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
mov ebx, dword [ebp - 0x5c]
test eax, eax
jne 0x402488
mov dword [ebp - 0x70], 1
jmp 0x401546
mov eax, dword [ebp - 0x84]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0xa0]
call fcn.004011b0
jmp 0x4016f8
mov eax, dword [ebp - 0xa0]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
push edi
mov dword [esp], str.Usage:_sc_command_servicename__parameter_value_...__n
call fcn.00401370
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp + 4], str.auto
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
mov ebx, dword [ebp - 0x5c]
test eax, eax
jne 0x4024af
mov dword [ebp - 0x74], 2
jmp 0x401546
mov dword [esp + 4], str.critical
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
mov ebx, dword [ebp - 0x5c]
test eax, eax
jne 0x40254f
mov dword [ebp - 0x78], 3
jmp 0x401546
mov dword [esp + 4], str.filesys
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x402574
mov dword [ebp - 0x70], 2
jmp 0x401546
mov dword [esp + 4], str.demand
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x40251d
mov dword [ebp - 0x74], 3
jmp 0x401546
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x9c], ebx
mov esi, dword [ebp - 0x68]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
test byte [section..data], 2
je 0x401ef8
mov dword [esp + 0xc], str.failed_to_parse_failure_parameters_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x404000
mov dword [esp], 1
call fcn.00401150
jmp 0x401ef8
mov dword [esp + 4], str.disabled
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x401546
mov dword [ebp - 0x74], 4
jmp 0x401546
mov esi, dword [ebp - 0x68]
mov dword [ebp - 0x9c], ebx
jmp 0x4024e7
mov dword [esp + 4], str.ignore
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x401546
xor esi, esi
mov dword [ebp - 0x78], esi
jmp 0x401546
mov dword [esp + 4], 0x4052ee
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x402597
mov dword [ebp - 0x70], 8
jmp 0x401546
mov dword [esp + 4], str.interact
mov dword [esp], esi
mov eax, dword [ebp - 0xa4]
call eax
test eax, eax
jne 0x401546
or dword [ebp - 0x70], 0x100
jmp 0x401546