Function at 0x140033f50
Capabilities:
Create service

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1020]
mov eax, 0x1120
call fcn.140045d00
sub rsp, rax
mov rax, qword [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0x1010], rax
xor esi, esi
mov qword [rbp - 0x68], r8
or rdi, 0xffffffffffffffff
mov qword [rbp - 0x78], rcx
mov r15, rdx
mov r14, rcx
mov ebx, esi
cmp rcx, rdi
je 0x1400345a5
test rdx, rdx
je 0x1400345a5
lea rax, [rsp + 0x70]
mov dword [rsp + 0x70], esi
mov qword [rsp + 0x30], rax
xor r9d, r9d
mov dword [rsp + 0x28], esi
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rsi
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetLineTextW]
nop dword [rax + rax]
test eax, eax
je 0x14003456b
mov eax, dword [rsp + 0x70]
inc eax
mov ecx, eax
mov dword [rsp + 0x70], eax
lea eax, [rsi + 2]
mul rcx
cmovo rax, rdi
mov rcx, rax
call fcn.1400014a0
mov r13, rax
test rax, rax
je 0x1400345a5
mov ecx, dword [rsp + 0x70]
xor r9d, r9d
mov 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, r13
test eax, eax
jne 0x140034080
call fcn.140001454
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jne 0x14003405a
lea edi, [rsi + 0x57]
jmp 0x14003405c
jle 0x140034065
movzx edi, di
or edi, 0x80070000
mov r8d, edi
lea rdx, str.Failed_to_get_information_from_inf_with_error_code_0x_x._r_n
mov ecx, 4
call fcn.140019b1c
mov eax, edi
jmp 0x1400345a7
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 rsi, rax
test rax, rax
je 0x140034561
mov edi, 0x57
mov r8, rsi
lea rdx, str._Parsing_CreateServices_section:_S._r_n
mov ecx, 4
call fcn.140019b1c
mov r9, r15
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
nop dword [rax + rax]
test eax, eax
je 0x14003453d
mov rdx, rsi
mov rcx, r14
mov r12d, 1
call qword [sym.imp.SETUPAPI.dll_SetupGetLineCountW]
nop dword [rax + rax]
mov ecx, eax
mov dword [rsp + 0x78], eax
mov esi, eax
call fcn.140019314
cmp esi, r12d
jb 0x14003453d
xor r14d, r14d
mov ecx, r12d
inc r12d
mov dword [rsp + 0x74], r12d
call fcn.140019120
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp - 0x60]
mov edx, 1
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp + 0x9f0]
mov edx, 2
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp + 0x7e0]
mov edx, 3
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp + 0x3c0]
mov edx, 4
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp + 0x5d0]
mov edx, 5
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
mov r9d, 0x105
mov qword [rsp + 0x20], r14
lea r8, [rbp + 0x1b0]
mov edx, 6
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
nop dword [rax + rax]
test eax, eax
je 0x14003451a
lea r8, [rsp + 0x7c]
mov qword [rbp - 0x80], r14
lea rdx, [rbp - 0x80]
mov dword [rsp + 0x7c], r14d
lea rcx, [rbp + 0x1b0]
mov rsi, r14
call fcn.140034e68
mov r9d, dword [rsp + 0x7c]
mov r11d, r14d
mov r12, qword [rbp - 0x80]
test r9d, r9d
jle 0x1400342fa
mov rdx, r12
or rbx, 0xffffffffffffffff
mov r8, qword [rdx]
mov r10d, r14d
mov rax, rbx
inc rax
cmp word [r8 + rax*2], r14w
jne 0x140034273
test eax, eax
jle 0x1400342b9
mov rcx, r14
cmp rsi, 0x208
jge 0x1400342f3
movzx eax, word [r8 + rcx]
inc r10d
mov word [rbp + rsi*2 + 0xc00], ax
inc rsi
mov r8, qword [rdx]
add rcx, 2
mov rax, rbx
inc rax
cmp word [r8 + rax*2], r14w
jne 0x1400342aa
cmp r10d, eax
jl 0x140034284
cmp rsi, 0x208
jge 0x1400342f3
lea rax, [rsi + rsi]
inc rsi
cmp rax, 0x410
jae 0x1400345d2
inc r11d
mov word [rbp + rax + 0xc00], r14w
add rdx, 8
cmp r11d, r9d
jl 0x14003426a
cmp rsi, 0x208
jl 0x1400342fa
mov ebx, 0x80004005
jmp 0x140034316
add rsi, rsi
mov ebx, r14d
cmp rsi, 0x410
jae 0x1400345d2
mov word [rbp + rsi + 0xc00], r14w
test r9d, r9d
jle 0x14003433f
mov rsi, r12
mov r14, r9
xor eax, eax
mov rcx, qword [rsi]
test rcx, rcx
je 0x140034335
call fcn.140001454
xor eax, eax
mov qword [rsi], rax
add rsi, 8
sub r14, 1
jne 0x140034323
test r12, r12
je 0x14003434c
mov rcx, r12
call fcn.140001454
test ebx, ebx
js 0x140034511
mov ebx, 0x10
lea rdx, [rbp - 0x70]
mov r8d, ebx
lea rcx, [rbp + 0x3c0]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstol]
nop dword [rax + rax]
mov r12d, dword [rbp + 0x1080]
mov r14d, eax
cmp r12d, 0xffffffff
jne 0x1400343a6
mov r8d, ebx
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x5d0]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstol]
nop dword [rax + rax]
mov r12d, eax
mov dword [rbp + 0x1080], eax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov esi, 1
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
nop dword [rax + rax]
xor ecx, ecx
mov rbx, rax
test rax, rax
je 0x1400344b9
mov qword [rsp + 0x60], rcx
lea rax, str.NT_AUTHORITYLocalService
mov qword [rsp + 0x58], rax
lea r8, [rbp + 0x9f0]
lea rax, [rbp + 0xc00]
mov r9d, 0xf003f
mov qword [rsp + 0x50], rax
lea rdx, [rbp - 0x60]
mov qword [rsp + 0x48], rcx
lea rax, [rbp + 0x7e0]
mov qword [rsp + 0x40], rcx
mov rcx, rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
nop dword [rax + rax]
xor r14d, r14d
test rax, rax
je 0x140034463
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
lea r9, str.succeeded
lea r8, [rbp - 0x60]
lea rdx, str.Creating_service__S__S._r_n
lea ecx, [rsi + 3]
call fcn.140019b1c
jmp 0x14003448f
mov esi, r14d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea r8, [rbp - 0x60]
mov ecx, 2
test eax, eax
lea rdx, str.ERROR:_Failed_to_create_service:__S.__Result:_0x_x._r_n
cmove eax, edi
mov r9d, eax
call fcn.140019b1c
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop dword [rax + rax]
test esi, esi
je 0x1400344e4
mov rcx, qword [rbp - 0x68]
lea r8, [rbp - 0x60]
mov edx, 0x104
call fcn.140010dd0
mov ebx, r14d
jmp 0x140034511
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
xor r14d, r14d
lea r8, [rbp - 0x60]
test eax, eax
lea rdx, str.ERROR:_Failed_to_open_SCM:__S.__Result:_0x_x._r_n
cmove eax, edi
mov r9d, eax
lea ecx, [r14 + 2]
call fcn.140019b1c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x1400344fa
mov ebx, edi
jmp 0x1400344fc
jle 0x140034505
movzx ebx, bx
or ebx, 0x80070000
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r12d, dword [rsp + 0x74]
mov esi, dword [rsp + 0x78]
mov rdx, r15
mov rcx, r15
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
nop dword [rax + rax]
test eax, eax
je 0x140034539
cmp r12d, esi
jbe 0x14003410c
mov r14, qword [rbp - 0x78]
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 rsi, rax
test rax, rax
jne 0x1400340a7
mov rcx, r13
call fcn.140001454
jmp 0x1400345a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x140034582
lea edi, [rax + 0x57]
jmp 0x140034588
mov edi, eax
test eax, eax
jle 0x140034591
movzx ebx, di
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
mov rcx, qword [rbp + 0x1010]
xor rcx, rsp
call fcn.1400017f0
mov rbx, qword [rsp + 0x1178]
add rsp, 0x1120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140001938
int3