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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
cmp dword [ebp + 8], 2
jle 0x402111
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
cmp word [eax], 0x5c
jne 0x40111d
cmp word [eax + 2], 0x5c
je 0x401850
mov dword [esp + 8], 0xf003f
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.advapi32.dll_OpenSCManagerW
mov dword [ebp - 0x4c], eax
sub esp, 0xc
test eax, eax
je 0x4017b8
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.create
mov edi, dword [sym.imp.ucrtbase.dll__wcsicmp]
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x401570
cmp dword [ebp + 8], 3
je 0x402105
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x44], 1
xor ebx, ebx
mov dword [ebp - 0x40], 3
lea esi, [eax + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], 0x10
mov dword [ebp - 0x64], 0
sub eax, 3
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x5c], 0
lea esi, [esi]
mov dword [esp + 4], str.displayname
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401670
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
jbe 0x401670
mov eax, dword [esi]
mov dword [esp + 4], str.binpath
mov dword [ebp - 0x5c], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401692
mov eax, dword [esi]
mov dword [esp + 4], str.group
mov dword [ebp - 0x50], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016b4
mov eax, dword [esi]
mov dword [esp + 4], str.depend
mov dword [ebp - 0x60], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016d6
mov eax, dword [esi]
mov dword [esp + 4], str.obj
mov dword [ebp - 0x54], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016f8
mov eax, dword [esi]
mov dword [esp + 4], str.password
mov dword [ebp - 0x58], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x40171a
mov eax, dword [esi]
mov dword [esp + 4], str.tag
mov dword [ebp - 0x64], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401790
mov eax, dword [esi - 4]
mov dword [esp + 4], 0x404364
mov dword [esp], eax
call edi
test eax, eax
jne 0x4012bd
test byte [section..data], 1
jne 0x401be0
mov eax, dword [esi - 4]
mov dword [esp + 4], str.type
mov dword [esp], eax
call edi
test eax, eax
jne 0x40174c
mov dword [esp + 4], 0x40433c
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.share
test eax, eax
mov eax, 0x10
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.kernel
test eax, eax
mov eax, 0x20
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.filesys
mov ecx, 1
test eax, eax
mov eax, dword [esi]
cmovne ecx, dword [ebp - 0x3c]
mov dword [esp], eax
mov dword [ebp - 0x3c], ecx
call edi
mov dword [esp + 4], 0x404308
test eax, eax
mov eax, 2
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.interact
test eax, eax
mov eax, 8
cmovne eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov edx, dword [ebp - 0x3c]
mov dword [esp + 4], 0x4042e4
mov ecx, eax
mov eax, edx
or ah, 1
test ecx, ecx
cmovne eax, edx
mov dword [ebp - 0x3c], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401640
mov dword [esp + 4], str.boot
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.system
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.auto
mov edx, 1
test eax, eax
mov eax, dword [esi]
cmovne edx, dword [ebp - 0x40]
mov dword [esp], eax
mov dword [ebp - 0x40], edx
call edi
mov dword [esp + 4], str.demand
test eax, eax
mov eax, 2
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.disabled
test eax, eax
mov eax, 3
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.error
test eax, eax
mov eax, 4
cmovne eax, dword [ebp - 0x40]
mov dword [ebp - 0x40], eax
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4014c0
mov dword [esp + 4], str.normal
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.severe
test eax, eax
mov eax, 1
cmovne eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
mov dword [esp + 4], str.critical
mov ecx, 2
test eax, eax
mov eax, dword [esi]
cmovne ecx, dword [ebp - 0x44]
mov dword [esp], eax
mov dword [ebp - 0x44], ecx
call edi
mov dword [esp + 4], str.ignore
test eax, eax
mov eax, 3
cmovne eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], eax
mov eax, dword [esi]
mov dword [esp], eax
call edi
test eax, eax
mov eax, 0
cmovne eax, dword [ebp - 0x44]
mov dword [ebp - 0x44], eax
lea esi, [esi]
nop
add ebx, 1
add esi, 4
cmp dword [ebp - 0x68], ebx
jne 0x4011c8
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x4017e0
mov edx, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x58]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], edx
mov edx, dword [ebp - 0x54]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x60]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 0x20], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], 0xf01ff
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_CreateServiceW
sub esp, 0x34
test eax, eax
je 0x401800
mov dword [esp], eax
call sub.advapi32.dll_CloseServiceHandle
sub esp, 4
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_CloseServiceHandle
mov eax, dword [ebp - 0x48]
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
call edi
test eax, eax
jne 0x401890
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_OpenServiceW
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401c40
xor eax, eax
cmp dword [ebp + 8], 3
je 0x4015c3
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 sub.advapi32.dll_ChangeServiceConfig2W
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x401620
test byte [section..data], 8
je 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_set_service_description__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
mov dword [esp], ebx
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
sub esp, 4
test esi, esi
sete al
mov dword [ebp - 0x48], eax
jmp 0x401551
mov dword [esp + 4], str.error
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4014c0
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
jbe 0x4014c0
jmp 0x401444
mov dword [esp + 4], str.binpath
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401692
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x40120b
mov dword [esp + 4], str.group
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016b4
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401228
mov dword [esp + 4], str.depend
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016d6
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401245
mov dword [esp + 4], str.obj
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x4016f8
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401262
mov dword [esp + 4], str.password
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x40171a
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x40127f
mov dword [esp + 4], str.tag
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401790
mov ecx, dword [ebp + 8]
mov eax, dword [esi - 4]
sub ecx, 4
cmp ecx, ebx
ja 0x40129f
mov dword [esp + 4], str.type
mov dword [esp], eax
call edi
mov dword [esp + 4], 0x4042e4
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401640
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x40139f
mov dword [esp + 4], str.error
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
jmp 0x4014c0
mov dword [esp + 4], str.type
mov eax, dword [esi - 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x40174c
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
jbe 0x40174c
jmp 0x4012d5
test byte [section..data], 2
jne 0x401ba8
mov dword [ebp - 0x48], 1
mov eax, dword [ebp - 0x48]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [section..data], 4
jne 0x401c10
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_CloseServiceHandle
sub esp, 4
jmp 0x4017c5
mov dword [ebp - 0x48], 1
test byte [section..data], 8
je 0x401551
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_create_service__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
jmp 0x401551
test byte [section..data], 1
je 0x4017c5
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 section..text
mov dword [ebp - 0x48], 1
jmp 0x4017cc
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.failure
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401c60
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 2
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_OpenServiceW
mov dword [ebp - 0x58], eax
sub esp, 0xc
test eax, eax
je 0x401c40
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
sub eax, 3
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x50], eax
je 0x401f60
mov eax, dword [ebp + 0xc]
mov esi, edi
xor ebx, ebx
add eax, 0x10
mov edi, eax
jmp 0x40196b
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401ebd
mov dword [esp + 4], str.command
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
mov eax, dword [edi - 4]
mov dword [esp + 4], str.actions
mov dword [esp], eax
call esi
test eax, eax
je 0x401e30
lea eax, [ebx + 1]
mov dword [ebp - 0x44], eax
mov ebx, dword [ebp - 0x44]
add edi, 4
cmp dword [ebp - 0x50], ebx
jbe 0x401f60
mov dword [esp + 4], str.reset
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x40198d
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
ja 0x401e88
mov dword [esp + 4], str.reboot
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
test eax, eax
je 0x401920
mov dword [esp + 4], str.command
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x40193e
mov edx, dword [ebp + 8]
mov eax, dword [edi - 4]
sub edx, 4
cmp edx, ebx
jbe 0x401941
lea edx, [ebx + 1]
mov dword [ebp - 0x44], edx
mov edx, dword [edi]
mov dword [esp + 4], str.actions
mov dword [ebp - 0x2c], edx
mov dword [esp], eax
call esi
test eax, eax
jne 0x40195c
mov ebx, dword [edi]
cmp word [ebx], 0
je 0x401ef8
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401a00
sub eax, ebx
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 sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0x48], eax
sub esp, 0xc
mov ecx, eax
test eax, eax
je 0x401f28
xor eax, eax
lea esi, [esi]
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x401a48
mov eax, dword [ebp - 0x48]
movzx edx, word [eax]
test dx, dx
je 0x401f48
xor ecx, ecx
lea esi, [esi]
cmp dx, 0x2f
jne 0x401a7e
xor edx, edx
add ecx, 1
mov word [eax], dx
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x401a70
shr ecx, 1
lea eax, [ecx + 1]
mov dword [ebp - 0x40], eax
shl eax, 3
mov edx, dword [ebp - 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [ebp - 0x28], edx
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0x24], eax
sub esp, 0xc
test eax, eax
je 0x401f08
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x54], edi
xor ebx, ebx
mov dword [ebp - 0x3c], esi
mov esi, edx
lea esi, [esi]
nop
mov dword [esp], esi
mov eax, dword [ebp - 0x3c]
lea edi, [ebx*8]
mov dword [esp + 4], 0x4041f4
call eax
test eax, eax
jne 0x401df8
mov eax, dword [ebp - 0x24]
mov dword [eax + ebx*8], 3
cmp word [esi], 0
je 0x401e20
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401b18
sub eax, esi
add eax, 2
add esi, eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.ucrtbase.dll_wcstol
mov edx, dword [ebp - 0x24]
mov dword [edx + edi + 4], eax
cmp word [esi], 0
je 0x401e50
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x401b58
sub eax, esi
add eax, 2
add esi, eax
add ebx, 1
cmp ebx, dword [ebp - 0x40]
jne 0x401ae0
mov edx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x54]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov esi, dword [ebp - 0x3c]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapFree
sub esp, 0xc
jmp 0x40195c
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 section..text
mov dword [ebp - 0x48], 1
jmp 0x4017cc
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 section..text
jmp 0x4012bd
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], 2
call section..text
jmp 0x4017ed
test byte [section..data], 8
jne 0x401db8
mov dword [ebp - 0x48], 1
jmp 0x401551
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.delete
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
test eax, eax
je 0x401d30
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.start
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
test eax, eax
jne 0x401fc8
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0x10
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_OpenServiceW
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401c40
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
add eax, 0xc
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
sub eax, 3
mov dword [esp + 4], eax
call 0x402130
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x401620
test byte [section..data], 8
je 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_start_service__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
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 - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_OpenServiceW
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401c40
mov dword [esp], eax
call sub.advapi32.dll_DeleteService
sub esp, 4
mov esi, eax
test eax, eax
jne 0x401620
test byte [section..data], 8
je 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_delete_service__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
jmp 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_open_service__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
mov dword [ebp - 0x48], 1
jmp 0x401551
mov dword [esp + 4], str.restart
mov eax, dword [ebp - 0x3c]
mov dword [esp], esi
call eax
test eax, eax
jne 0x401e60
mov eax, dword [ebp - 0x24]
mov dword [eax + edi], 1
cmp word [esi], 0
jne 0x401b13
mov eax, 2
jmp 0x401b26
mov eax, dword [ebp + 8]
sub eax, 4
cmp eax, ebx
je 0x401f28
lea eax, [ebx + 1]
mov dword [ebp - 0x44], eax
jmp 0x4019ea
mov eax, 2
jmp 0x401b66
mov dword [esp + 4], 0x4041d4
mov eax, dword [ebp - 0x3c]
mov dword [esp], esi
call eax
test eax, eax
mov eax, dword [ebp - 0x24]
jne 0x401ee8
mov dword [eax + edi], 2
jmp 0x401b09
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov eax, dword [edi]
mov dword [esp], eax
call sub.ucrtbase.dll_wcstol
mov dword [esp + 4], str.reboot
mov dword [ebp - 0x34], eax
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x4019a5
mov eax, dword [edi]
mov dword [esp + 4], str.command
mov dword [ebp - 0x30], eax
mov eax, dword [edi - 4]
mov dword [esp], eax
call esi
test eax, eax
jne 0x40193e
mov eax, dword [edi - 4]
jmp 0x4019ca
mov dword [eax + edi], 0
jmp 0x401b09
mov eax, 2
jmp 0x401a0e
mov eax, dword [ebp - 0x48]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sub.kernel32.dll_HeapFree
sub esp, 0xc
test byte [section..data], 4
jne 0x402015
mov dword [ebp - 0x48], 1
mov eax, dword [ebp - 0x58]
jmp 0x401546
mov dword [ebp - 0x40], 1
mov eax, 8
jmp 0x401a95
lea eax, [ebp - 0x34]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x58]
mov dword [esp], eax
call sub.advapi32.dll_ChangeServiceConfig2W
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x401f90
test byte [section..data], 8
jne 0x4020cf
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 sub.kernel32.dll_HeapFree
xor eax, eax
sub esp, 0xc
test ebx, ebx
sete al
mov dword [ebp - 0x48], eax
jmp 0x401f3c
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.stop
mov eax, dword [eax + 4]
mov dword [esp], eax
call edi
test eax, eax
je 0x40203e
test byte [section..data], 1
je 0x401c4d
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 section..text
jmp 0x401c4d
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], 2
call section..text
jmp 0x401f35
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0x20
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_OpenServiceW
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x401c40
lea eax, [ebp - 0x34]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], ebx
call sub.advapi32.dll_ControlService
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x401620
test byte [section..data], 8
je 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_stop_service__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
jmp 0x401620
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.failed_to_set_service_failure_actions__u_n
mov dword [esp + 8], str.wmain
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call section..text
jmp 0x401f90
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call sub.advapi32.dll_CloseServiceHandle
push ecx
mov dword [esp], str.Usage:_sc_command_servicename__parameter_value_...__n
call fcn.00401090
mov dword [esp], 1
call sub.ucrtbase.dll_exit
nop
nop
nop
nop
nop
nop
nop
jmp dword [sym.imp.advapi32.dll_StartServiceW]