Function at 0x401380
Capabilities:
Create service
Delete service
Modify service
Start service
Stop service
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x90
cmp dword [ebp + 8], 2
jle 0x4022b1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
cmp word [eax], 0x5c
jne 0x4013ad
cmp word [eax + 2], 0x5c
je 0x4017e0
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.advapi32.dll_OpenSCManagerW]
mov dword [ebp - 0x58], eax
sub esp, 0xc
test eax, eax
je 0x401740
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.create
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov dword [ebp - 0x5c], eax
call eax
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x401640
cmp dword [ebp + 8], 3
je 0x4022a4
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], 0
xor ebx, ebx
mov dword [ebp - 0x1c], 0x10
lea esi, [eax + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], 3
mov dword [ebp - 0x14], 1
sub eax, 3
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0
lea esi, [esi]
lea esi, [esi]
lea edi, [ebx*4]
mov dword [esp + 8], 0xc
lea edx, [esi + edi]
mov dword [esp + 4], str.displayname
mov eax, dword [edx]
mov dword [ebp - 0x50], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x4014ba
mov edx, dword [ebp - 0x50]
mov eax, dword [edx]
cmp word [eax + 0x18], 0
jne 0x401718
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401730
lea eax, [ebp - 0x30]
mov edi, dword [ebp - 0x4c]
mov dword [esp + 4], esi
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0x10], 8
mov dword [esp + 0xc], str.binpath
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401000
test eax, eax
jne 0x401588
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], 6
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 0xc], str.group
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00401000
test eax, eax
jne 0x401588
lea eax, [ebp - 0x28]
mov dword [esp + 0x10], 7
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.depend
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
jne 0x401588
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], 4
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.obj
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
je 0x401820
lea esi, [esi]
nop
mov ebx, dword [ebp - 0x48]
add ebx, 1
mov dword [ebp - 0x48], ebx
cmp ebx, dword [ebp - 0x4c]
jb 0x401470
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x401760
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x30], edx
mov edx, dword [ebp - 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x2c], edx
mov edx, dword [ebp - 0x28]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 0x28], edx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x20], edx
mov dword [esp + 0xc], 0xf01ff
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CreateServiceW]
sub esp, 0x34
test eax, eax
je 0x401790
mov dword [esp], eax
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
call edi
sub esp, 4
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x54]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.description
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
jne 0x401960
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b48
xor eax, eax
cmp dword [ebp + 8], 3
je 0x401697
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 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 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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
lea esi, [esi]
mov dword [esp], ebx
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
call edi
xor eax, eax
sub esp, 4
test esi, esi
sete al
mov dword [ebp - 0x54], eax
jmp 0x401620
add eax, 0x18
mov ebx, dword [ebp - 0x48]
mov dword [ebp - 0x34], eax
jmp 0x40158b
mov eax, dword [esi + edi + 4]
add ebx, 1
mov dword [ebp - 0x34], eax
jmp 0x40158b
test byte [section..data], 2
jne 0x401ae8
mov dword [ebp - 0x54], 1
mov eax, dword [ebp - 0x54]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 2
jne 0x401b18
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
mov dword [ebp - 0x54], 1
mov eax, dword [ebp - 0x54]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x54], 1
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
test byte [section..data], 2
je 0x401620
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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x401620
test byte [section..data], 1
je 0x40174d
mov dword [esp + 0xc], str.server_argument_not_supported_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call fcn.00401150
mov dword [ebp - 0x54], 1
jmp 0x401754
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], 9
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.password
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
jne 0x401588
lea eax, [ebp - 0x44]
mov dword [esp + 0x10], 4
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.tag
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
jne 0x401caf
lea eax, [ebp - 0x40]
mov dword [esp + 0x10], 5
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.type
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
jne 0x401fe0
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], 6
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], 0x405308
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
test eax, eax
jne 0x40200a
lea eax, [ebp - 0x38]
mov dword [esp + 0x10], 6
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x48]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0xc], str.error
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00401000
mov ebx, dword [ebp - 0x48]
test eax, eax
je 0x40158b
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], str.normal
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402247
mov dword [ebp - 0x14], 1
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.failure
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
jne 0x401b70
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
mov dword [ebp - 0x60], eax
sub esp, 0xc
test eax, eax
je 0x401b48
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], 0
lea edi, [ebp - 0x40]
mov dword [ebp - 0x30], 0
sub esi, 3
lea ebx, [eax + 0xc]
mov dword [ebp - 0x2c], 0
mov eax, esi
mov dword [ebp - 0x28], 0
mov esi, ebx
mov dword [ebp - 0x24], 0
mov ebx, eax
mov dword [ebp - 0x40], 0
jne 0x401a91
jmp 0x401d29
lea eax, [ebp - 0x30]
mov dword [esp + 0x10], 7
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0x405446
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00401000
test eax, eax
jne 0x401a80
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.command
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00401000
test eax, eax
jne 0x401a80
lea eax, [ebp - 0x38]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.actions
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00401000
test eax, eax
jne 0x401d78
lea esi, [esi]
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
cmp ebx, eax
jbe 0x401d29
lea eax, [ebp - 0x3c]
mov dword [esp + 0x10], 6
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.reset
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00401000
test eax, eax
je 0x4019f8
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcstol]
mov dword [ebp - 0x34], eax
jmp 0x401a80
mov dword [esp + 0xc], str.failed_to_open_service_manager_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x40174d
mov dword [esp + 0xc], str.failed_to_parse_create_parameters_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x40176d
test byte [section..data], 2
jne 0x401ce6
mov dword [ebp - 0x54], 1
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x401620
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.delete
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
je 0x401c2b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.start
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
jne 0x401f2e
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0x10
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x401b48
mov eax, dword [ebp + 0xc]
mov dword [esp], esi
add eax, 0xc
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
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 0x402181
test byte [section..data], 2
jne 0x4021a5
mov dword [esp], esi
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
call edi
xor eax, eax
sub esp, 4
test ebx, ebx
sete al
mov dword [ebp - 0x54], eax
jmp 0x401620
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0x10000
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b48
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_DeleteService]
sub esp, 4
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_delete_service__lu_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x4016f8
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], 0x40528c
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
mov ebx, dword [ebp - 0x48]
test eax, eax
jne 0x40158b
test byte [section..data], 1
jne 0x402131
mov dword [ebp - 0x10], 1
jmp 0x40158b
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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
mov dword [ebp - 0x54], 1
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x401620
lea eax, [ebp - 0x34]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_ChangeServiceConfig2W]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x401d5a
test byte [section..data], 2
jne 0x4021db
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
xor eax, eax
test ebx, ebx
sete al
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x60]
jmp 0x401612
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x401eda
movzx edx, word [eax]
test dx, dx
je 0x402194
xor ecx, ecx
lea esi, [esi]
cmp dx, 0x2f
jne 0x401dae
xor edx, edx
add ecx, 1
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401da0
shr ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x50], eax
shl eax, 3
mov ecx, dword [ebp - 0x50]
mov dword [esp], eax
mov dword [ebp - 0x28], ecx
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x401ece
mov edx, dword [ebp - 0x54]
xor eax, eax
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], ebx
mov ebx, eax
mov esi, edx
nop
mov dword [esp + 4], 0x40547a
mov eax, dword [ebp - 0x5c]
mov dword [esp], esi
call eax
lea ecx, [ebx*8]
mov dword [ebp - 0x4c], ecx
test eax, eax
jne 0x401ea8
mov eax, dword [ebp - 0x24]
mov dword [eax + ebx*8], 3
cmp word [esi], 0
je 0x401efa
mov ecx, esi
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x401e30
sub ecx, esi
add ecx, 2
add esi, ecx
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_wcstol]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x4c]
mov dword [edx + ecx + 4], eax
cmp word [esi], 0
je 0x401ef3
mov eax, esi
nop
add eax, 2
cmp word [eax], 0
jne 0x401e70
sub eax, esi
lea edx, [eax + 2]
add esi, edx
add ebx, 1
cmp ebx, dword [ebp - 0x50]
jne 0x401df0
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x68]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x401a80
mov dword [esp + 4], str.restart
mov eax, dword [ebp - 0x5c]
mov dword [esp], esi
call eax
test eax, eax
jne 0x401f04
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x4c]
mov dword [eax + ecx], 1
jmp 0x401e1c
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
test byte [section..data], 2
jne 0x40207e
mov dword [ebp - 0x54], 1
jmp 0x401d70
mov edx, 2
jmp 0x401e7e
mov ecx, 2
jmp 0x401e3e
mov dword [esp + 4], str.reboot
mov eax, dword [ebp - 0x5c]
mov dword [esp], esi
call eax
mov ecx, dword [ebp - 0x4c]
test eax, eax
mov eax, dword [ebp - 0x24]
jne 0x402034
mov dword [eax + ecx], 2
jmp 0x401e1c
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.stop
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
jne 0x402040
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0x20
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_OpenServiceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401b48
lea eax, [ebp - 0x34]
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 0x40226e
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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x4016f8
mov ebx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], 0x4052bc
mov dword [esp], ebx
call eax
test eax, eax
jne 0x4020a7
mov dword [ebp - 0x1c], 0x10
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], str.boot
mov dword [esp], ebx
call eax
test eax, eax
jne 0x40215a
mov dword [ebp - 0x18], 0
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [eax + ecx], 0
jmp 0x401e1c
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.query
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
test eax, eax
jne 0x4020ce
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x58]
call fcn.004011a0
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
test eax, eax
sete al
movzx eax, al
mov dword [ebp - 0x54], eax
jmp 0x401620
mov dword [esp + 0xc], str.failed_to_parse_failure_parameters_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x401ee7
mov dword [esp + 4], str.share
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402281
mov dword [ebp - 0x1c], 0x20
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.sdset
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [ebp - 0x5c]
call eax
mov dword [ebp - 0x54], eax
test eax, eax
jne 0x402211
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
test byte [section..data], 1
je 0x401620
mov dword [esp + 0xc], str.SdSet_command_not_supported__faking_success_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call fcn.00401150
mov edi, dword [sym.imp.advapi32.dll_CloseServiceHandle]
jmp 0x401620
mov dword [esp + 0xc], str.tag_argument_not_supported_n
mov dword [esp + 8], str.parse_create_params
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call fcn.00401150
jmp 0x401cda
mov dword [esp + 4], str.system
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x4022ca
mov dword [ebp - 0x18], 1
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x58]
call fcn.004011a0
jmp 0x401c0e
mov dword [ebp - 0x50], 1
mov eax, 8
jmp 0x401dc5
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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x401c0e
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 + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 1
call fcn.00401150
jmp 0x401d5a
test byte [section..data], 1
je 0x401b55
mov dword [esp + 0xc], str.command_not_supported_n
mov dword [esp + 8], str.wmain
mov dword [esp + 4], 0x403000
mov dword [esp], 0
call fcn.00401150
jmp 0x401b55
mov dword [esp + 4], str.severe
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x4022ed
mov dword [ebp - 0x14], 2
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x58]
call fcn.004011a0
jmp 0x4016f8
mov dword [esp + 4], str.kernel
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402310
mov dword [ebp - 0x1c], 1
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_CloseServiceHandle]
push ecx
mov dword [esp], str.Usage:_sc_command_servicename__parameter_value_...__n
call fcn.00401360
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp + 4], str.auto
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402333
mov dword [ebp - 0x18], 2
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [esp + 4], str.critical
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402379
mov dword [ebp - 0x14], 3
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [esp + 4], str.filesys
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x402356
mov dword [ebp - 0x1c], 2
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [esp + 4], str.demand
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x4023a0
mov dword [ebp - 0x18], 3
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [esp + 4], 0x4052ee
mov eax, dword [ebp - 0x5c]
mov dword [esp], ebx
call eax
test eax, eax
jne 0x4023c7
mov dword [ebp - 0x1c], 8
mov ebx, dword [ebp - 0x48]
jmp 0x40158b
mov dword [esp], ebx
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], str.ignore
call eax
mov ebx, dword [ebp - 0x48]
test eax, eax
jne 0x40158b
mov dword [ebp - 0x14], 0
jmp 0x40158b
mov dword [esp], ebx
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], str.disabled
call eax
mov ebx, dword [ebp - 0x48]
test eax, eax
jne 0x40158b
mov dword [ebp - 0x18], 4
jmp 0x40158b
mov dword [esp], ebx
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], str.interact
call eax
mov ebx, dword [ebp - 0x48]
test eax, eax
jne 0x40158b
or dword [ebp - 0x1c], 0x100
jmp 0x40158b