Function at 0x14003d374
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x690]
sub rsp, 0x790
mov rax, qword [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0x680], rax
mov rax, qword [rbp + 0x6f0]
xor r13d, r13d
mov qword [rsp + 0x68], rdx
mov ebx, 1
mov qword [rsp + 0x38], r8
mov edi, r13d
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x30], r13d
test rdx, rdx
jne 0x14003d3d9
mov eax, 0x80004003
jmp 0x14003dd34
or rax, 0xffffffffffffffff
cmp r8, rax
je 0x14003dd30
test r9, r9
mov dword [rsp + 0x28], ebx
lea rax, str.DEFAULTINSTALL
cmove r9, rax
lea r8, [rbp - 0x50]
lea rax, str.CUSTOMDESTINATION
xor ecx, ecx
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x20], rax
call fcn.14003c7c0
test eax, eax
je 0x14003dd30
mov ecx, 0x26d6
call fcn.140019024
lea rcx, [rbp - 0x50]
call fcn.14003ca58
mov qword [rsp + 0x78], rax
mov rsi, rax
test rax, rax
je 0x14003dd30
xor edx, edx
lea rcx, [rbp + 0x50]
mov r8d, 0x208
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor r8d, r8d
lea rdx, [0x14004ca38]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstok]
nop dword [rax + rax]
mov qword [rsp + 0x58], rax
mov rsi, rax
test rax, rax
je 0x14003dd1e
mov r14, qword [rsp + 0x38]
mov qword [rsp + 0x48], r14
mov r8, rsi
lea rdx, str._Parsing_CustomDestination_INFSection:_S_r_n
mov ecx, 4
call fcn.140019b1c
lea r9, [rbp - 0x80]
xor r8d, r8d
mov rdx, rsi
mov rcx, r14
call fcn.14001f858
test eax, eax
je 0x14003dcf5
mov rdx, rsi
mov rcx, r14
mov r15d, 1
call fcn.14001f904
mov ecx, eax
mov dword [rsp + 0x54], eax
mov esi, eax
call fcn.140019314
cmp esi, r15d
jb 0x14003dcf5
mov ecx, r15d
inc r15d
mov dword [rsp + 0x50], r15d
call fcn.140019120
lea rcx, [rbp - 0x80]
call fcn.14003ca58
mov qword [rsp + 0x60], rax
mov rsi, rax
test rax, rax
je 0x14003dce5
lea rdx, [0x140051038]
mov qword [rsp + 0x40], rax
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsstr]
nop dword [rax + rax]
mov r12, rax
mov r14d, r13d
xor eax, eax
test r12, r12
je 0x14003d715
or rcx, 0xffffffffffffffff
mov rsi, rcx
inc rsi
cmp word [r12 + rsi*2], ax
jne 0x14003d537
add rsi, 5
mov eax, 2
mul rsi
cmovo rax, rcx
mov rcx, rax
call fcn.1400014a0
mov r15, rax
test rax, rax
je 0x14003d707
lea rdi, [r12 + 2]
jmp 0x14003d575
cmp cx, word [rdi]
je 0x14003d58a
add rdi, 2
movzx ecx, word [rdi]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_iswalnum]
nop dword [rax + rax]
xor ecx, ecx
test eax, eax
je 0x14003d56c
mov r8, rdi
mov rdx, rsi
mov rcx, r15
call fcn.140010dd0
mov edx, 0x2c
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcschr]
nop dword [rax + rax]
xor esi, esi
mov rdi, rax
test rax, rax
je 0x14003d5c5
lea rcx, [rax + 2]
call fcn.14001e4e8
mov r13d, eax
mov word [rdi], si
lea rdx, str.SourceDir
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsicmp]
nop dword [rax + rax]
test eax, eax
jne 0x14003d67a
mov rax, qword [rsp + 0x68]
lea rcx, [rbp + 0x50]
cmp rcx, rax
je 0x14003d635
lea r9, [rbp + 0x50]
mov r8, rax
sub r8, r9
lea rcx, [rbp + 0x50]
mov edx, 0x103
lea rax, [rdx + 0x7ffffefb]
test rax, rax
je 0x14003d627
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003d627
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d604
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], si
mov edx, 0x5c
lea rcx, [rbp + 0x50]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsrchr]
nop dword [rax + rax]
test rax, rax
je 0x14003d655
mov word [rax + 2], si
jmp 0x14003d659
mov word [rbp + 0x50], si
mov r9, qword [rsp + 0x58]
lea r8, [rbp + 0x50]
mov r14d, 1
lea rdx, str._Assigned_destination:__S_for_section__S_r_n
lea ecx, [r14 + 3]
call fcn.140019b1c
jmp 0x14003d6f9
mov dword [rsp + 0x28], esi
lea r8, [rbp - 0x68]
mov r9, r15
mov qword [rsp + 0x20], rsi
lea rdx, [rsp + 0x38]
xor ecx, ecx
call fcn.14003c7c0
test eax, eax
je 0x14003d6ef
lea rcx, [rbp - 0x68]
call fcn.14003ca58
mov rdi, rax
test rax, rax
je 0x14003d6ef
lea r8, [rbp + 0x50]
lea rcx, [rbp - 0x68]
call fcn.14003aa84
test eax, eax
je 0x14003d6db
mov r9, qword [rsp + 0x58]
lea r8, [rbp + 0x50]
mov r14d, 1
lea rdx, str._Assigned_destination:__S_for_section__S_r_n
lea ecx, [r14 + 3]
call fcn.140019b1c
mov rcx, rdi
call fcn.140001454
mov rdi, qword [rsp + 0x38]
mov qword [rsp + 0x48], rdi
jmp 0x14003d6f9
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov rcx, r15
call fcn.140001454
mov edi, dword [rsp + 0x30]
jmp 0x14003d709
xor esi, esi
mov word [r12], si
mov rsi, qword [rsp + 0x60]
jmp 0x14003d729
mov r8, rsi
lea rdx, str.ERROR:_CustomDestination__S_not_settable:_LDIDs_require_8_characters_previous_to__due_to_setupapi._r_n
mov ecx, 2
call fcn.140019b1c
test r14d, r14d
je 0x14003dc91
xor r13d, r13d
lea r8, [0x1400486c8]
lea rax, [rbp + 0x470]
mov r15d, r13d
sub r8, rax
lea rcx, [rbp + 0x470]
mov edx, 0x103
lea rax, [rdx + 0x7ffffefb]
test rax, rax
je 0x14003d778
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003d778
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d755
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
test r12, r12
je 0x14003dcbe
mov r12, qword [rsp + 0x40]
lea rax, [rbp - 0x30]
mov r8, r12
sub r8, rax
lea rcx, [rbp - 0x30]
mov edx, 0x3f
lea rax, [rdx + 0x7fffffbf]
test rax, rax
je 0x14003d7cb
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003d7cb
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d7a8
test rdx, rdx
lea rax, [rcx - 2]
lea rdx, [0x14004ca38]
cmovne rax, rcx
lea rcx, [rbp - 0x30]
mov word [rax], r13w
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_wcsstr]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14003d809
add rax, 2
mov word [r14], r13w
mov qword [rsp + 0x40], rax
mov r12, rax
lea rcx, [rbp - 0x30]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wtol]
nop dword [rax + rax]
mov esi, eax
mov eax, r15d
test r15d, r15d
je 0x14003d974
sub eax, 1
je 0x14003d83e
sub eax, 1
je 0x14003d974
cmp eax, 1
jne 0x14003daa8
mov ebx, 0x104
lea r8, [rbp + 0x50]
lea rax, [rbp + 0x260]
mov edx, ebx
sub r8, rax
lea rcx, [rbp + 0x260]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14003d87d
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003d87d
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d85a
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
je 0x14003d92a
or rdx, 0xffffffffffffffff
lea r12d, [rdx + 0x5d]
lea rcx, [rbp + 0x260]
mov rax, rdx
inc rax
cmp word [rcx + rax*2], r13w
jne 0x14003d8a4
test rax, rax
je 0x14003d8e2
cmp word [rbp + rax*2 + 0x25e], r12w
jne 0x14003d8e2
lea rcx, [rbp + 0x260]
mov rax, rdx
inc rax
cmp word [rcx + rax*2], r13w
jne 0x14003d8c8
test rax, rax
je 0x14003d8e2
mov word [rbp + rax*2 + 0x25e], r13w
jmp 0x14003d89a
lea rcx, [rbp + 0x260]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
mov r12, qword [rsp + 0x40]
cmp eax, 0xffffffff
je 0x14003d92a
test al, 0x10
je 0x14003d92a
mov r8d, ebx
lea rdx, [rbp + 0x470]
lea rcx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
nop dword [rax + rax]
dec eax
cmp eax, 0x103
jbe 0x14003daa8
lea r8, [rbp + 0x50]
mov edx, 0x103
lea rax, [rbp + 0x470]
sub r8, rax
lea rcx, [rbp + 0x470]
lea rax, [rdx + 0x7ffffefb]
test rax, rax
je 0x14003da99
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003da99
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d944
jmp 0x14003da99
mov ebx, 0x104
lea r8, [rbp + 0x50]
lea rax, [rbp + 0x260]
mov edx, ebx
sub r8, rax
lea rcx, [rbp + 0x260]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14003d9b3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003d9b3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003d990
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
je 0x14003da5c
or rdx, 0xffffffffffffffff
lea r12d, [rdx + 0x5d]
lea rcx, [rbp + 0x260]
mov rax, rdx
inc rax
cmp word [rcx + rax*2], r13w
jne 0x14003d9da
test rax, rax
je 0x14003da18
cmp word [rbp + rax*2 + 0x25e], r12w
jne 0x14003da18
lea rcx, [rbp + 0x260]
mov rax, rdx
inc rax
cmp word [rcx + rax*2], r13w
jne 0x14003d9fe
test rax, rax
je 0x14003da18
mov word [rbp + rax*2 + 0x25e], r13w
jmp 0x14003d9d0
lea rcx, [rbp + 0x260]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
mov r12, qword [rsp + 0x40]
cmp eax, 0xffffffff
je 0x14003da5c
test al, 0x10
je 0x14003da5c
mov r8d, ebx
lea rdx, [rbp + 0x470]
lea rcx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetShortPathNameW]
nop dword [rax + rax]
dec eax
cmp eax, 0x103
jbe 0x14003daa8
lea r8, [rbp + 0x50]
mov edx, 0x103
lea rax, [rbp + 0x470]
sub r8, rax
lea rcx, [rbp + 0x470]
lea rax, [rdx + 0x7ffffefb]
test rax, rax
je 0x14003da99
movzx eax, word [r8 + rcx]
test ax, ax
je 0x14003da99
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14003da76
test rdx, rdx
lea rax, [rcx - 2]
cmovne rax, rcx
mov word [rax], r13w
lea rcx, str.setupapi.dll
inc r15d
mov edi, r13d
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x14003db1c
lea rdx, str.SetupSetDirectoryIdW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
nop dword [rax + rax]
test rax, rax
je 0x14003db04
movabs r10, 0x9d002ece5adf5970
mov rcx, qword [rsp + 0x48]
lea r8, [rbp + 0x470]
mov edx, esi
call qword [0x140048188]
mov edi, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop dword [rax + rax]
test edi, edi
je 0x14003db1c
mov ebx, r13d
jmp 0x14003db4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x14003db33
mov eax, 0x57
jmp 0x14003db39
jle 0x14003dc63
movzx ebx, ax
or ebx, 0x80070000
mov eax, ebx
jne 0x14003dc63
mov r13, qword [rsp + 0x70]
test r13, r13
je 0x14003dc6d
cmp esi, 0x8000
jb 0x14003dc48
mov ecx, 0x18
call fcn.140001460
mov rbx, rax
xor eax, eax
test rbx, rbx
jne 0x14003dbba
lea rdx, str.ERROR:_Out_of_memory._r_n
lea ecx, [rax + 2]
call fcn.140019ae0
mov ebx, 0x8007000e
xor r13d, r13d
mov r9d, ebx
mov dword [rsp + 0x30], ebx
mov r8d, esi
lea rdx, str.ERROR:_Could_not_set_CustomDestination__lu._Result:_0x_x._r_n
mov ecx, 2
mov edi, ebx
call fcn.140019b1c
test r14, r14
jne 0x14003d795
jmp 0x14003dcbe
or r8, 0xffffffffffffffff
mov qword [rbx], rax
mov rdi, r8
lea rcx, [rbp + 0x470]
inc rdi
cmp word [rcx + rdi*2], ax
jne 0x14003dbcb
inc rdi
mov eax, 2
mul rdi
cmovo rax, r8
mov rcx, rax
call fcn.1400014a0
mov qword [rbx + 8], rax
test rax, rax
jne 0x14003dc15
lea rdx, str.ERROR:_Out_of_memory._r_n
lea ecx, [rax + 2]
call fcn.140019ae0
mov edx, 0x18
mov rcx, rbx
call fcn.140001818
jmp 0x14003db87
lea r8, [rbp + 0x470]
mov rdx, rdi
mov rcx, rax
call fcn.140010dd0
mov dword [rbx + 0x10], esi
mov rax, qword [r13 + 8]
test rax, rax
jne 0x14003dc39
mov qword [r13], rbx
jmp 0x14003dc3c
mov qword [rax], rbx
mov qword [r13 + 8], rbx
xor r13d, r13d
mov ebx, r13d
jmp 0x14003dc6d
lea rdx, str.ERROR:_Invalid_arguments_passed_to_AddDirectoryToList._r_n
mov ecx, 2
call fcn.140019ae0
mov ebx, 0x80004003
jmp 0x14003db8c
mov ebx, eax
test eax, eax
js 0x14003db8f
lea r9, [rbp + 0x470]
mov r8d, esi
lea rdx, str._Added_CustomDestination__lu_as__S._r_n
mov ecx, 4
call fcn.140019b1c
mov edi, dword [rsp + 0x30]
jmp 0x14003dbac
test r13b, 2
je 0x14003dca4
mov eax, 0x80070003
mov ebx, eax
mov dword [rsp + 0x30], eax
mov edi, eax
mov r9d, edi
lea rdx, str.ERROR:_Could_not_set_CustomDestination__S._Result:_0x_x._r_n
mov r8, rsi
mov ecx, 2
call fcn.140019b1c
xor r13d, r13d
mov rcx, qword [rsp + 0x60]
call fcn.140001454
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x80]
call qword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
nop dword [rax + rax]
test eax, eax
je 0x14003dcf0
mov r15d, dword [rsp + 0x50]
cmp r15d, dword [rsp + 0x54]
jbe 0x14003d4da
mov r14, 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 qword [rsp + 0x58], rax
mov rsi, rax
test rax, rax
jne 0x14003d485
mov rcx, qword [rsp + 0x78]
call fcn.140001454
test ebx, ebx
js 0x14003dd30
test edi, edi
jne 0x14003dd32
mov edi, ebx
mov eax, edi
mov rcx, qword [rbp + 0x680]
xor rcx, rsp
call fcn.1400017f0
mov rbx, qword [rsp + 0x7d0]
add rsp, 0x790
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret