Function at 0x140001684
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x570]
sub rsp, 0x670
mov rax, qword [0x14000c008]
xor rax, rsp
mov qword [rbp + 0x560], rax
mov r14, rcx
lea rax, [rbp + 0x50]
mov r10, r14
lea rcx, [rbp + 0x50]
sub r10, rax
mov r15, r9
xor r13d, r13d
mov r12, r8
mov edx, 0x104
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400016f2
mov al, byte [r10 + rcx]
test al, al
je 0x1400016f2
mov byte [rcx], al
inc rcx
sub rdx, 1
jne 0x1400016d3
test rdx, rdx
lea rax, [rcx - 1]
cmovne rax, rcx
mov byte [rax], r13b
cmp byte [rbp + 0x50], 0x22
jne 0x140001713
lea rdx, [0x140009730]
lea rax, [rbp + 0x51]
jmp 0x14000171e
lea rdx, [0x140009734]
lea rax, [rbp + 0x50]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x30], rax
call fcn.1400015e8
mov rdi, qword [rsp + 0x30]
or rbx, 0xffffffffffffffff
mov rsi, rax
test rdi, rdi
je 0x1400017aa
mov rax, rbx
inc rax
cmp byte [rdi + rax], r13b
jne 0x140001741
cmp rax, 3
jb 0x1400017aa
mov al, byte [rdi + 1]
mov cl, 0x5c
cmp al, 0x3a
jne 0x14000175e
cmp byte [rdi + 2], cl
je 0x140001766
cmp byte [rdi], cl
jne 0x1400017aa
cmp al, cl
jne 0x1400017aa
lea rax, [rsp + 0x40]
mov r8, rdi
sub r8, rax
lea rcx, [rsp + 0x40]
mov edx, 0x104
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x14000179a
mov al, byte [r8 + rcx]
test al, al
je 0x14000179a
mov byte [rcx], al
inc rcx
sub rdx, 1
jne 0x14000177b
test rdx, rdx
lea rax, [rcx - 1]
cmovne rax, rcx
mov byte [rax], r13b
jmp 0x140001804
mov r9d, 0x104
lea r8, [0x14000d610]
lea rax, [rsp + 0x40]
mov edx, r9d
sub r8, rax
lea rcx, [rsp + 0x40]
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x1400017e6
mov al, byte [r8 + rcx]
test al, al
je 0x1400017e6
mov byte [rcx], al
inc rcx
sub rdx, 1
jne 0x1400017c7
test rdx, rdx
lea rax, [rcx - 1]
mov r8, rdi
mov edx, r9d
cmovne rax, rcx
lea rcx, [rsp + 0x40]
mov byte [rax], r13b
call fcn.140007ba8
mov edx, 0x2e
mov rcx, rdi
call fcn.140007d68
test rax, rax
je 0x140001a1b
lea rcx, str..INF
mov dword [rsp + 0x28], ebx
mov edx, 1
mov qword [rsp + 0x20], rcx
mov r9d, ebx
mov r8, rax
lea ecx, [rdx + 0x7e]
call qword [sym.imp.KERNEL32.dll_CompareStringA]
nop dword [rax + rax]
cmp eax, 2
jne 0x140001a1b
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x1400019f3
shr eax, 4
not eax
and eax, 1
je 0x1400019f3
lea rdx, [0x140009740]
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x30]
call fcn.1400015e8
mov rcx, rax
test rax, rax
je 0x1400018b5
cmp byte [rcx], r13b
lea rdx, [0x140009744]
mov rax, qword [rsp + 0x30]
cmovne rax, rcx
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x30], rax
call fcn.1400015e8
mov edx, 0x200
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140001aa2
mov rsi, qword [rsp + 0x30]
lea rdi, str.DefaultInstall
mov rcx, rdi
lea r9, [rsp + 0x40]
lea rdx, str.Reboot
cmp byte [rsi], r13b
cmovne rcx, rsi
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
nop dword [rax + rax]
mov r9, rbx
mov dword [r15], 1
mov dword [0x14000d540], eax
lea r8, [0x140009700]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.AdvancedINF
lea rcx, str.Version
mov dword [rsp + 0x20], 8
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
nop dword [rax + rax]
test eax, eax
je 0x140001984
or dword [0x14000de64], 4
mov edx, 0x104
cmp byte [rsi], r13b
mov rcx, r14
cmovne rdi, rsi
mov r8, rdi
call fcn.140001008
lea r8, [rsp + 0x40]
mov edx, 0x200
mov rcx, rbx
call fcn.140001008
jmp 0x140001bd1
and dword [0x14000de64], 0xfffffffb
cmp word [0x14000de78], r13w
jne 0x1400019ba
mov r8d, 0x104
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x40]
lea r14, str.setupx.dll
call qword [sym.imp.KERNEL32.dll_GetShortPathNameA]
nop dword [rax + rax]
jmp 0x1400019c1
lea r14, str.setupapi.dll
cmp byte [rsi], r13b
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea r8, str.rundll32.exe__s_InstallHinfSection__s_128__s
cmovne rdi, rsi
mov r9, r14
mov edx, 0x200
mov qword [rsp + 0x20], rdi
mov rcx, rbx
call fcn.14000114c
jmp 0x140001bd1
xor r9d, r9d
lea r8, [rsp + 0x40]
mov edx, 0x525
mov dword [rsp + 0x28], r13d
xor ecx, ecx
mov dword [rsp + 0x20], FDIDestroy
call fcn.140004dcc
xor eax, eax
jmp 0x140001bda
mov edx, 0x2e
mov rcx, rdi
call fcn.140007d68
test rax, rax
je 0x140001acb
lea rdx, str..BAT
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdx
mov r9d, ebx
mov edx, 1
mov r8, rax
lea ecx, [rdx + 0x7e]
call qword [sym.imp.KERNEL32.dll_CompareStringA]
nop dword [rax + rax]
cmp eax, 2
jne 0x140001acb
lea rsi, str.Command.com__c__s
mov rax, rbx
inc rax
cmp byte [rsi + rax], r13b
jne 0x140001a6a
lea rcx, [rsp + 0x40]
inc rbx
cmp byte [rcx + rbx], r13b
jne 0x140001a78
lea rdi, [rax + rbx]
mov ecx, 0x40
lea rdx, [rdi + 8]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x140001ab2
xor r9d, r9d
mov edx, 0x4b5
xor r8d, r8d
jmp 0x140001a00
lea r9, [rsp + 0x40]
mov r8, rsi
lea rdx, [rdi + 8]
mov rcx, rax
call fcn.14000114c
jmp 0x140001bd1
mov edi, 0x400
mov ecx, 0x40
mov edx, edi
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140001aa2
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
nop dword [rax + rax]
cmp eax, 0xffffffff
je 0x140001b7e
test al, 0x10
jne 0x140001b7e
lea r8, [rsp + 0x40]
mov edx, edi
lea rax, [rbp + 0x160]
sub r8, rax
lea rcx, [rbp + 0x160]
lea rax, [rdx + 0x7ffffbfe]
test rax, rax
je 0x140001b3c
mov al, byte [rcx + r8]
test al, al
je 0x140001b3c
mov byte [rcx], al
inc rcx
sub rdx, 1
jne 0x140001b1d
test rdx, rdx
lea rax, [rcx - 1]
cmovne rax, rcx
mov byte [rax], r13b
test rsi, rsi
je 0x140001bbc
cmp byte [rsi], r13b
je 0x140001bbc
lea r8, [0x140009734]
mov rdx, rdi
lea rcx, [rbp + 0x160]
call fcn.140001084
mov r8, rsi
lea rcx, [rbp + 0x160]
mov rdx, rdi
call fcn.140001084
jmp 0x140001bbc
lea rax, [rbp + 0x160]
sub r14, rax
lea rdx, [rbp + 0x160]
lea rax, [rdi + 0x7ffffbfe]
test rax, rax
je 0x140001bae
mov al, byte [rdx + r14]
test al, al
je 0x140001bae
mov byte [rdx], al
inc rdx
sub rdi, 1
jne 0x140001b8f
test rdi, rdi
lea rcx, [rdx - 1]
cmovne rcx, rdx
mov byte [rcx], r13b
mov r8, rbx
mov byte [rbx], r13b
mov rdx, rbx
lea rcx, [rbp + 0x160]
call fcn.140002a6c
mov qword [r12], rbx
mov eax, 1
mov rcx, qword [rbp + 0x560]
xor rcx, rsp
call fcn.140008470
mov rbx, qword [rsp + 0x6b8]
add rsp, 0x670
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret