Function at 0x1400345e0
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x180]
sub rsp, 0x280
mov rax, qword [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0x170], rax
xor edi, edi
mov qword [rsp + 0x48], rcx
xor esi, esi
or rbx, 0xffffffffffffffff
mov r15, rdx
cmp rcx, rbx
je 0x14003499d
test rdx, rdx
je 0x14003499d
and dword [rsp + 0x40], esi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
xor r9d, r9d
and dword [rsp + 0x28], esi
xor r8d, r8d
and qword [rsp + 0x20], rsi
xor edx, edx
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetLineTextW]
nop dword [rax + rax]
test eax, eax
je 0x14003499d
mov eax, dword [rsp + 0x40]
inc eax
mov ecx, eax
mov dword [rsp + 0x40], eax
lea eax, [rdi + 2]
mul rcx
cmovo rax, rbx
mov rcx, rax
call fcn.1400014a0
mov qword [rsp + 0x58], rax
mov r12, rax
test rax, rax
je 0x14003499d
mov ecx, dword [rsp + 0x40]
xor r9d, r9d
and qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], ecx
xor edx, edx
mov rcx, r15
mov qword [rsp + 0x20], rax
call qword [sym.imp.SETUPAPI.dll_SetupGetLineTextW]
nop dword [rax + rax]
mov rcx, r12
test eax, eax
jne 0x14003470b
call fcn.140001454
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x1400346e5
lea ebx, [rdi + 0x57]
jmp 0x1400346e7
jle 0x1400346f0
movzx ebx, bx
or ebx, 0x80070000
mov r8d, ebx
lea rdx, str.Failed_to_get_information_from_inf_with_error_code_0x_x._r_n
mov ecx, 4
call fcn.140019b1c
mov eax, ebx
jmp 0x1400349a1
xor r8d, r8d
lea rdx, [0x14004ca38]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstok]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14003498d
mov r12, qword [rsp + 0x48]
mov ebx, 0x57
mov r8, r14
lea rdx, str._Parsing_DeleteServices_section:_S._r_n
mov ecx, 4
call fcn.140019b1c
mov r9, r15
xor r8d, r8d
mov rdx, r14
mov rcx, r12
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
nop dword [rax + rax]
test eax, eax
je 0x140034964
mov rcx, qword [rsp + 0x48]
mov rdx, r14
mov r12d, 1
call qword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
nop dword [rax + rax]
mov ecx, eax
mov dword [rsp + 0x50], eax
mov r14d, eax
call fcn.140019314
cmp r14d, r12d
jb 0x14003495f
mov ecx, r12d
mov r14d, 1
add r12d, r14d
call fcn.140019120
and qword [rsp + 0x20], 0
lea r8, [rsp + 0x60]
mov r9d, 0x105
mov edx, r14d
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003493e
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x44], r14d
xor ecx, ecx
call fcn.14003509c
test eax, eax
je 0x14003490a
mov edi, 0xf003f
xor edx, edx
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x1400348c8
mov r8d, edi
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x14003489c
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
nop dword [rax + rax]
test eax, eax
jne 0x140034875
mov dword [rsp + 0x44], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea r8, [rsp + 0x60]
mov ecx, 2
test eax, eax
lea rdx, str.ERROR:_Failed_to_delete_service_:__S.__Result:_0x_x._r_n
cmove eax, ebx
mov r9d, eax
call fcn.140019b1c
lea r8, [rsp + 0x60]
mov ecx, 4
lea rdx, str.Deletion_of_service_:__S_succeeded._r_n
call fcn.140019b1c
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
jmp 0x1400348b2
lea r8, [rsp + 0x60]
mov ecx, 4
lea rdx, str.Could_not_open_service_:__S._r_n
call fcn.140019b1c
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
mov r14d, dword [rsp + 0x44]
jmp 0x1400348f4
xor r14d, r14d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
lea r8, [rsp + 0x60]
lea rdx, str.ERROR:_Failed_to_open_SCM:__S.__Result:_0x_x._r_n
cmove eax, ebx
lea ecx, [r14 + 2]
mov r9d, eax
call fcn.140019b1c
mov eax, r14d
neg eax
sbb edi, edi
not edi
and edi, 0x80004005
test r14d, r14d
jne 0x14003493e
jmp 0x140034939
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea r8, [rsp + 0x60]
mov ecx, 2
test eax, eax
lea rdx, str.ERROR:_Failed_to_delete_service_:__S.__Result:_0x_x._r_n
cmove eax, ebx
mov r9d, eax
call fcn.140019b1c
mov edi, 0x80004005
mov esi, 0x80004005
mov rdx, r15
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
nop dword [rax + rax]
test eax, eax
je 0x14003495f
cmp r12d, dword [rsp + 0x50]
jbe 0x14003479c
mov r12, qword [rsp + 0x48]
xor r8d, r8d
lea rdx, [0x14004ca38]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstok]
nop dword [rax + rax]
mov r14, rax
test rax, rax
jne 0x140034737
mov r12, qword [rsp + 0x58]
mov rcx, r12
call fcn.140001454
test edi, edi
js 0x14003499d
test esi, esi
jne 0x14003499f
mov esi, edi
mov eax, esi
mov rcx, qword [rbp + 0x170]
xor rcx, rsp
call fcn.1400017f0
lea r11, [rsp + 0x280]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret