Function at 0x140001302
Capabilities:
Create service
Modify service

Disassembly:
jmp 0x140016200
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x370
mov rdi, rsp
mov ecx, 0xdc
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x380]
mov qword [rsp + 0x230], 0xfffffffffffffffe
call fcn.140044130
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x70]
call fcn.140043ee0
movzx eax, byte [0x1401e7694]
test eax, eax
jne 0x140016306
mov ecx, 0x1b8
call fcn.140043a70
mov qword [rsp + 0x168], rax
cmp qword [rsp + 0x168], 0
je 0x1400162db
lea rax, [0x1401e7694]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movsd qword [rsp + 0x38], xmm0
lea rax, [0x140170ffe]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x121
lea r8, [0x140171b58]
mov edx, 0x48
mov rcx, qword [rsp + 0x168]
call fcn.140043f00
mov qword [rsp + 0x238], rax
jmp 0x1400162e7
mov qword [rsp + 0x238], 0
mov rax, qword [rsp + 0x238]
mov qword [rsp + 0x160], rax
mov rax, qword [rsp + 0x160]
mov qword [0x1401e7698], rax
mov rcx, qword [rsp + 0x70]
call fcn.140043ef0
mov rax, qword [0x1401e7698]
add rax, 0x180
mov rcx, rax
call fcn.140043ee0
cmp qword [rsp + 0x390], 0
je 0x140016342
mov rax, qword [rsp + 0x390]
mov qword [rsp + 0x240], rax
jmp 0x14001635a
mov rax, qword [rsp + 0x380]
mov rcx, rax
call fcn.14000110e
mov qword [rsp + 0x240], rax
mov rdx, qword [rsp + 0x240]
lea rcx, [rsp + 0x170]
call fcn.140001555
mov qword [rsp + 0x248], rax
mov rax, qword [rsp + 0x248]
mov qword [rsp + 0x250], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [0x1401e7698]
mov rcx, qword [rcx]
mov qword [rsp + 0x258], rcx
mov rdx, qword [rsp + 0x250]
mov r9, qword [rdx]
mov r8d, eax
lea rdx, str.__u__Installing_service___s_...
mov rcx, qword [0x1401e7698]
mov rax, qword [rsp + 0x258]
call qword [rax + 0x90]
nop
lea rcx, [rsp + 0x170]
call fcn.14000219e
mov rax, qword [0x1401e7698]
mov rax, qword [rax]
mov rcx, qword [0x1401e7698]
call qword [rax + 0x78]
mov rax, qword [0x1401e7698]
add rax, 0x180
mov rcx, rax
call fcn.140043ef0
xor eax, eax
test eax, eax
jne 0x14001623f
mov rdx, qword [rsp + 0x388]
lea rcx, [rsp + 0x88]
call fcn.1400019ce
nop
lea rcx, [rsp + 0x88]
call fcn.14000206d
movzx eax, al
test eax, eax
je 0x140016561
mov r9d, 1
mov r8d, 0x104
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x178]
call fcn.140001ae6
mov qword [rsp + 0x260], rax
mov rax, qword [rsp + 0x260]
mov qword [rsp + 0x268], rax
mov rcx, qword [rsp + 0x268]
call fcn.140001226
mov r8d, 0x104
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400164a0
mov dword [rsp + 0x270], 1
jmp 0x1400164ab
mov dword [rsp + 0x270], 0
mov eax, dword [rsp + 0x270]
mov dword [rsp + 0x94], eax
lea rcx, [rsp + 0x178]
call fcn.140002388
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14000213a
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x94], 0
je 0x1400164fd
lea rax, str.GetModuleFileNameW_0__CStrBuf_strExePath__260___260_
test rax, rax
je 0x1400164fd
mov dword [rsp + 0x274], 1
jmp 0x140016508
mov dword [rsp + 0x274], 0
mov eax, dword [rsp + 0x274]
mov dword [rsp + 0x9c], eax
cmp dword [rsp + 0x9c], 0
jne 0x140016551
mov edx, dword [rsp + 0x98]
lea rcx, [rsp + 0x194]
call fcn.14000159b
mov eax, dword [rax]
mov dword [rsp + 0x190], eax
lea rdx, [0x1401df3b8]
lea rcx, [rsp + 0x190]
call fcn.1400a2ad0
xor eax, eax
test eax, eax
jne 0x1400164da
xor eax, eax
test eax, eax
jne 0x140016438
call fcn.140044130
mov qword [rsp + 0xa0], rax
mov rcx, qword [rsp + 0xa0]
call fcn.140043ee0
movzx eax, byte [0x1401e76a1]
test eax, eax
jne 0x14001662e
mov ecx, 0x1b8
call fcn.140043a70
mov qword [rsp + 0x1a0], rax
cmp qword [rsp + 0x1a0], 0
je 0x140016603
lea rax, [0x1401e76a1]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movsd qword [rsp + 0x38], xmm0
lea rax, [0x140170ffe]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x129
lea r8, [0x140171b58]
mov edx, 0x48
mov rcx, qword [rsp + 0x1a0]
call fcn.140043f00
mov qword [rsp + 0x278], rax
jmp 0x14001660f
mov qword [rsp + 0x278], 0
mov rax, qword [rsp + 0x278]
mov qword [rsp + 0x198], rax
mov rax, qword [rsp + 0x198]
mov qword [0x1401e76a8], rax
mov rcx, qword [rsp + 0xa0]
call fcn.140043ef0
mov rax, qword [0x1401e76a8]
add rax, 0x180
mov rcx, rax
call fcn.140043ee0
mov rax, qword [rsp + 0x380]
add rax, 8
mov rcx, rax
call fcn.14000110e
mov rdx, rax
lea rcx, [rsp + 0x1a8]
call fcn.140001555
mov qword [rsp + 0x280], rax
mov rax, qword [rsp + 0x280]
mov qword [rsp + 0x288], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [0x1401e76a8]
mov rcx, qword [rcx]
mov qword [rsp + 0x290], rcx
mov rdx, qword [rsp + 0x288]
mov r9, qword [rdx]
mov r8d, eax
lea rdx, str.__u__Open_SCM_manager___s_...
mov rcx, qword [0x1401e76a8]
mov rax, qword [rsp + 0x290]
call qword [rax + 0x90]
nop
lea rcx, [rsp + 0x1a8]
call fcn.14000219e
mov rax, qword [0x1401e76a8]
mov rax, qword [rax]
mov rcx, qword [0x1401e76a8]
call qword [rax + 0x78]
mov rax, qword [0x1401e76a8]
add rax, 0x180
mov rcx, rax
call fcn.140043ef0
xor eax, eax
test eax, eax
jne 0x140016561
mov rax, qword [rsp + 0x380]
add rax, 8
mov rcx, rax
call fcn.14000110e
mov rcx, rax
call fcn.14000127b
mov r8d, 0xf003f
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdx, rax
lea rcx, [rsp + 0xb8]
call fcn.1400014a1
nop
lea rcx, [rsp + 0xb8]
call fcn.140001dc0
test rax, rax
je 0x14001676c
mov dword [rsp + 0x298], 1
jmp 0x140016777
mov dword [rsp + 0x298], 0
mov eax, dword [rsp + 0x298]
mov dword [rsp + 0xc4], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14000213a
mov dword [rsp + 0xc8], eax
cmp dword [rsp + 0xc4], 0
je 0x1400167bc
lea rax, [0x140171b40]
test rax, rax
je 0x1400167bc
mov dword [rsp + 0x29c], 1
jmp 0x1400167c7
mov dword [rsp + 0x29c], 0
mov eax, dword [rsp + 0x29c]
mov dword [rsp + 0xcc], eax
cmp dword [rsp + 0xcc], 0
jne 0x140016810
mov edx, dword [rsp + 0xc8]
lea rcx, [rsp + 0x1b4]
call fcn.14000159b
mov eax, dword [rax]
mov dword [rsp + 0x1b0], eax
lea rdx, [0x1401df3b8]
lea rcx, [rsp + 0x1b0]
call fcn.1400a2ad0
xor eax, eax
test eax, eax
jne 0x140016799
xor eax, eax
test eax, eax
jne 0x14001674d
cmp dword [rsp + 0x3a8], 1
je 0x140016876
cmp dword [rsp + 0x3b0], 0
je 0x140016841
mov dword [rsp + 0x2a0], 0x10
jmp 0x14001684c
mov dword [rsp + 0x2a0], 0x20
mov eax, dword [rsp + 0x2a0]
mov dword [rsp + 0x3a8], eax
cmp dword [rsp + 0x3b8], 0
je 0x140016876
mov eax, dword [rsp + 0x3a8]
bts eax, 8
mov dword [rsp + 0x3a8], eax
call fcn.140044130
mov qword [rsp + 0xd0], rax
mov rcx, qword [rsp + 0xd0]
call fcn.140043ee0
movzx eax, byte [0x1401e76b1]
test eax, eax
jne 0x140016943
mov ecx, 0x1b8
call fcn.140043a70
mov qword [rsp + 0x1c0], rax
cmp qword [rsp + 0x1c0], 0
je 0x140016918
lea rax, [0x1401e76b1]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movsd qword [rsp + 0x38], xmm0
lea rax, [0x140170ffe]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x136
lea r8, [0x140171b58]
mov edx, 0x48
mov rcx, qword [rsp + 0x1c0]
call fcn.140043f00
mov qword [rsp + 0x2a8], rax
jmp 0x140016924
mov qword [rsp + 0x2a8], 0
mov rax, qword [rsp + 0x2a8]
mov qword [rsp + 0x1b8], rax
mov rax, qword [rsp + 0x1b8]
mov qword [0x1401e76b8], rax
mov rcx, qword [rsp + 0xd0]
call fcn.140043ef0
mov rax, qword [0x1401e76b8]
add rax, 0x180
mov rcx, rax
call fcn.140043ee0
mov rax, qword [rsp + 0x380]
mov rcx, rax
call fcn.14000110e
mov rdx, rax
lea rcx, [rsp + 0x1c8]
call fcn.140001555
mov qword [rsp + 0x2b0], rax
mov rax, qword [rsp + 0x2b0]
mov qword [rsp + 0x2b8], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [0x1401e76b8]
mov rcx, qword [rcx]
mov qword [rsp + 0x2c0], rcx
mov rdx, qword [rsp + 0x2b8]
mov r9, qword [rdx]
mov r8d, eax
lea rdx, str.__u__Create_service___s_...
mov rcx, qword [0x1401e76b8]
mov rax, qword [rsp + 0x2c0]
call qword [rax + 0x90]
nop
lea rcx, [rsp + 0x1c8]
call fcn.14000219e
mov rax, qword [0x1401e76b8]
mov rax, qword [rax]
mov rcx, qword [0x1401e76b8]
call qword [rax + 0x78]
mov rax, qword [0x1401e76b8]
add rax, 0x180
mov rcx, rax
call fcn.140043ef0
xor eax, eax
test eax, eax
jne 0x140016876
cmp qword [rsp + 0x398], 0
je 0x140016a38
mov dword [rsp + 0x2c8], 2
jmp 0x140016a43
mov dword [rsp + 0x2c8], 0
cmp qword [rsp + 0x390], 0
je 0x140016a60
mov rax, qword [rsp + 0x390]
mov qword [rsp + 0x2d0], rax
jmp 0x140016a78
mov rax, qword [rsp + 0x380]
mov rcx, rax
call fcn.14000110e
mov qword [rsp + 0x2d0], rax
lea rcx, [rsp + 0x88]
call fcn.14000110e
mov qword [rsp + 0x2d8], rax
mov rcx, qword [rsp + 0x380]
call fcn.14000110e
mov qword [rsp + 0x2e0], rax
lea rcx, [rsp + 0xb8]
call fcn.140001dc0
mov rcx, qword [rsp + 0x3e0]
mov qword [rsp + 0x60], rcx
mov rcx, qword [rsp + 0x3d8]
mov qword [rsp + 0x58], rcx
mov rcx, qword [rsp + 0x3c8]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], 0
mov rcx, qword [rsp + 0x3d0]
mov qword [rsp + 0x40], rcx
mov rcx, qword [rsp + 0x2d8]
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0x3c0]
mov dword [rsp + 0x30], ecx
mov ecx, dword [rsp + 0x3a0]
mov dword [rsp + 0x28], ecx
mov ecx, dword [rsp + 0x3a8]
mov dword [rsp + 0x20], ecx
mov r9d, dword [rsp + 0x2c8]
mov r8, qword [rsp + 0x2d0]
mov rcx, qword [rsp + 0x2e0]
mov rdx, rcx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdx, rax
lea rcx, [rsp + 0xe8]
call fcn.1400014a1
nop
lea rcx, [rsp + 0xe8]
call fcn.140001dc0
test rax, rax
je 0x140016b6e
mov dword [rsp + 0x2e8], 1
jmp 0x140016b79
mov dword [rsp + 0x2e8], 0
mov eax, dword [rsp + 0x2e8]
mov dword [rsp + 0xf4], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14000213a
mov dword [rsp + 0xf8], eax
cmp dword [rsp + 0xf4], 0
je 0x140016bbe
lea rax, [0x140171b48]
test rax, rax
je 0x140016bbe
mov dword [rsp + 0x2ec], 1
jmp 0x140016bc9
mov dword [rsp + 0x2ec], 0
mov eax, dword [rsp + 0x2ec]
mov dword [rsp + 0xfc], eax
cmp dword [rsp + 0xfc], 0
jne 0x140016c12
mov edx, dword [rsp + 0xf8]
lea rcx, [rsp + 0x1d4]
call fcn.14000159b
mov eax, dword [rax]
mov dword [rsp + 0x1d0], eax
lea rdx, [0x1401df3b8]
lea rcx, [rsp + 0x1d0]
call fcn.1400a2ad0
xor eax, eax
test eax, eax
jne 0x140016b9b
xor eax, eax
test eax, eax
jne 0x140016b4f
call fcn.140044130
mov qword [rsp + 0x100], rax
mov rcx, qword [rsp + 0x100]
call fcn.140043ee0
movzx eax, byte [0x1401e76c1]
test eax, eax
jne 0x140016cef
mov ecx, 0x1b8
call fcn.140043a70
mov qword [rsp + 0x1e0], rax
cmp qword [rsp + 0x1e0], 0
je 0x140016cc4
lea rax, [0x1401e76c1]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movsd qword [rsp + 0x38], xmm0
lea rax, [0x140170ffe]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x145
lea r8, [0x140171b58]
mov edx, 0x50
mov rcx, qword [rsp + 0x1e0]
call fcn.140043f00
mov qword [rsp + 0x2f0], rax
jmp 0x140016cd0
mov qword [rsp + 0x2f0], 0
mov rax, qword [rsp + 0x2f0]
mov qword [rsp + 0x1d8], rax
mov rax, qword [rsp + 0x1d8]
mov qword [0x1401e76c8], rax
mov rcx, qword [rsp + 0x100]
call fcn.140043ef0
mov rax, qword [0x1401e76c8]
add rax, 0x180
mov rcx, rax
call fcn.140043ee0
cmp qword [rsp + 0x390], 0
je 0x140016d2e
mov rax, qword [rsp + 0x390]
mov qword [rsp + 0x2f8], rax
jmp 0x140016d46
mov rax, qword [rsp + 0x380]
mov rcx, rax
call fcn.14000110e
mov qword [rsp + 0x2f8], rax
mov rdx, qword [rsp + 0x2f8]
lea rcx, [rsp + 0x1e8]
call fcn.140001555
mov qword [rsp + 0x300], rax
mov rax, qword [rsp + 0x300]
mov qword [rsp + 0x308], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [0x1401e76c8]
mov rcx, qword [rcx]
mov qword [rsp + 0x310], rcx
mov rdx, qword [rsp + 0x308]
mov r9, qword [rdx]
mov r8d, eax
lea rdx, str.__u__Create_service___s__:_OK
mov rcx, qword [0x1401e76c8]
mov rax, qword [rsp + 0x310]
call qword [rax + 0x90]
nop
lea rcx, [rsp + 0x1e8]
call fcn.14000219e
mov rax, qword [0x1401e76c8]
mov rax, qword [rax]
mov rcx, qword [0x1401e76c8]
call qword [rax + 0x78]
mov rax, qword [0x1401e76c8]
add rax, 0x180
mov rcx, rax
call fcn.140043ef0
xor eax, eax
test eax, eax
jne 0x140016c22
cmp qword [rsp + 0x398], 0
je 0x1400170a7
mov rax, qword [rsp + 0x398]
mov qword [rsp + 0x118], rax
call fcn.140044130
mov qword [rsp + 0x128], rax
mov rcx, qword [rsp + 0x128]
call fcn.140043ee0
movzx eax, byte [0x1401e76d1]
test eax, eax
jne 0x140016ee2
mov ecx, 0x1b8
call fcn.140043a70
mov qword [rsp + 0x1f8], rax
cmp qword [rsp + 0x1f8], 0
je 0x140016eb7
lea rax, [0x1401e76d1]
mov qword [rsp + 0x40], rax
xorps xmm0, xmm0
movsd qword [rsp + 0x38], xmm0
lea rax, [0x140170ffe]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x14a
lea r8, [0x140171b58]
mov edx, 0x48
mov rcx, qword [rsp + 0x1f8]
call fcn.140043f00
mov qword [rsp + 0x318], rax
jmp 0x140016ec3
mov qword [rsp + 0x318], 0
mov rax, qword [rsp + 0x318]
mov qword [rsp + 0x1f0], rax
mov rax, qword [rsp + 0x1f0]
mov qword [0x1401e76d8], rax
mov rcx, qword [rsp + 0x128]
call fcn.140043ef0
mov rax, qword [0x1401e76d8]
add rax, 0x180
mov rcx, rax
call fcn.140043ee0
mov rax, qword [rsp + 0x380]
mov rcx, rax
call fcn.14000110e
mov rdx, rax
lea rcx, [rsp + 0x200]
call fcn.140001555
mov qword [rsp + 0x320], rax
mov rax, qword [rsp + 0x320]
mov qword [rsp + 0x328], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov rcx, qword [0x1401e76d8]
mov rcx, qword [rcx]
mov qword [rsp + 0x330], rcx
mov rdx, qword [rsp + 0x328]
mov r9, qword [rdx]
mov r8d, eax
lea rdx, str.__u__Change_service_config___s_...
mov rcx, qword [0x1401e76d8]
mov rax, qword [rsp + 0x330]
call qword [rax + 0x90]
nop
lea rcx, [rsp + 0x200]
call fcn.14000219e
mov rax, qword [0x1401e76d8]
mov rax, qword [rax]
mov rcx, qword [0x1401e76d8]
call qword [rax + 0x78]
mov rax, qword [0x1401e76d8]
add rax, 0x180
mov rcx, rax
call fcn.140043ef0
xor eax, eax
test eax, eax
jne 0x140016e15
lea rcx, [rsp + 0xe8]
call fcn.140001dc0
lea r8, [rsp + 0x118]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x140016ff3
mov dword [rsp + 0x338], 1
jmp 0x140016ffe
mov dword [rsp + 0x338], 0
mov eax, dword [rsp + 0x338]
mov dword [rsp + 0x130], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14000213a
mov dword [rsp + 0x134], eax
cmp dword [rsp + 0x130], 0
je 0x140017043
lea rax, str.::ChangeServiceConfig2W_hService__1__sd_
test rax, rax
je 0x140017043
mov dword [rsp + 0x33c], 1
jmp 0x14001704e
mov dword [rsp + 0x33c], 0
mov eax, dword [rsp + 0x33c]
mov dword [rsp + 0x138], eax
cmp dword [rsp + 0x138], 0
jne 0x140017097
mov edx, dword [rsp + 0x134]
lea rcx, [rsp + 0x20c]
call fcn.14000159b
mov eax, dword [rax]
mov dword [rsp + 0x208], eax
lea rdx, [0x1401df3b8]
lea rcx, [rsp + 0x208]
call fcn.1400a2ad0
xor eax, eax
test eax, eax
jne 0x140017020
xor eax, eax
test eax, eax
jne 0x140016fbf
lea rcx, [rsp + 0xe8]
call fcn.1400021b7
nop
lea rcx, [rsp + 0xb8]
call fcn.1400021b7
nop
lea rcx, [rsp + 0x88]
call fcn.140001195
nop
jmp 0x1400170dc
xor eax, eax
mov rdi, rax
mov rcx, rsp
lea rdx, [0x14016f548]
call fcn.14009e8b0
mov rax, rdi
add rsp, 0x370
pop rdi
ret