Function at 0x140001a40
Capabilities:
Get file attributes
Query environment variable
Query or enumerate registry value
Read .ini file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov r15, r8
mov r12, rdx
mov r13, rcx
lea rdx, [rbp + 0x170]
mov r8d, 0x104
xor ecx, ecx
mov r14, r9
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [rsp + 0x30], eax
mov r9d, eax
test eax, eax
je 0x140001c6a
cmp qword [r14 + 0x30], 0
je 0x140001ba7
lea r8, [rbp + 0x170]
mov edx, 0x104
lea rcx, [rbp + 0x280]
call fcn.140002500
lea rcx, [rbp + 0x280]
call fcn.140002520
mov rbx, rax
test rax, rax
je 0x140001ba2
lea rsi, [rbp + 0x280]
nop dword [rax]
cmp byte [rsi + rbx - 1], 0x5c
je 0x140001afa
test rbx, rbx
je 0x140001ba2
dec rbx
cmp byte [rsi + rbx - 1], 0x5c
jne 0x140001ae7
test rbx, rbx
je 0x140001ba2
dec rbx
lea r8, [rbp + 0x280]
mov edx, 0x104
lea rcx, [rbp + 0x60]
mov byte [rbp + rbx + 0x280], 0
call fcn.140002500
mov rdi, qword [r14 + 0x30]
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rbp + 0x60]
call fcn.1400024d0
mov rcx, rax
mov r8, rdi
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rbp + 0x60]
call fcn.140002520
test rax, rax
je 0x140001b99
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rbp + 0x60]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rbp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001b99
test al, 0x10
je 0x140002053
test rbx, rbx
jne 0x140001ae0
mov r9d, dword [rsp + 0x30]
cmp qword [r14 + 0x28], 0
je 0x140001c6a
lea ecx, [r9 - 4]
mov eax, r9d
mov edx, 0x104
lea r8, str..ini
sub rdx, rcx
lea rcx, [rbp + rax + 0x16c]
call fcn.140002500
mov rcx, qword [r14 + 0x28]
lea rax, [rbp + 0x170]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x50]
lea r8, [0x14000f87d]
mov dword [rsp + 0x20], 0x104
lea rdx, str.DLLPath
mov byte [rsp + 0x50], 0
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x140001c6a
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x140001c6a
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001c6a
test al, 0x10
je 0x14000203c
mov r8d, 0x104
lea rdx, [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [rsp + 0x30], eax
mov edx, eax
test eax, eax
je 0x140001d0a
lea r8d, [rax - 1]
cmp byte [rsp + r8 + 0x50], 0x5c
je 0x140001cb2
nop word [rax + rax]
mov edx, r8d
dec r8d
mov dword [rsp + 0x30], edx
cmp byte [rsp + r8 + 0x50], 0x5c
jne 0x140001ca0
lea eax, [rdx - 1]
lea rcx, [rsp + 0x50]
mov byte [rsp + rax + 0x50], 0
call fcn.140002520
test rax, rax
je 0x140001d0a
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001d0a
test al, 0x10
je 0x14000203c
cmp qword [r14], 0
je 0x14000210e
mov r8, qword [r14 + 0x20]
xor edi, edi
mov qword [rsp + 0x38], rdi
test r8, r8
je 0x140001e78
mov edx, 0xc8
lea rcx, [rbp + 0x60]
call fcn.140002500
mov rbx, qword [r14]
lea r8, [0x14000f874]
mov edx, 0xc8
lea rcx, [rbp + 0x60]
call fcn.1400024d0
mov rcx, rax
mov r8, rbx
mov edx, 0xc8
call fcn.1400024d0
lea rax, [rsp + 0x38]
mov dword [rsp + 0x30], 0x104
lea r9d, [rdi + 1]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x40], edi
lea rdx, [rbp + 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140001e63
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x40]
lea rax, [rsp + 0x50]
xor r8d, r8d
lea rdx, str.Path
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140001e63
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x40], 2
mov qword [rsp + 0x38], rdi
jne 0x140001e13
lea r8, [rsp + 0x50]
mov edx, 0x104
lea rcx, [rbp + 0x170]
call fcn.140002500
mov r8d, 0x104
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [rsp + 0x30], eax
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x140001e63
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001e63
test al, 0x10
je 0x14000203c
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140001e73
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rdi
mov rcx, qword [r14 + 8]
test rcx, rcx
je 0x140001f27
mov r8d, 0x104
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [rsp + 0x30], eax
dec eax
cmp eax, 0x102
ja 0x140001f27
cmp byte [rsp + 0x50], 0x25
je 0x140001f27
mov rbx, qword [r14]
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x140001f27
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001f27
test al, 0x10
je 0x14000203c
cmp qword [r14 + 0x18], rdi
je 0x140002079
lea rax, [rsp + 0x38]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersion
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x140002069
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str.ProgramFilesDir
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x140002069
mov rbx, qword [r14 + 0x18]
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024d0
mov rbx, qword [r14]
lea r8, [0x14000f874]
mov edx, 0x104
mov rcx, rax
call fcn.1400024d0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x140002069
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140002069
test al, 0x10
jne 0x140002069
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r8, [rsp + 0x50]
mov rdx, r15
mov rcx, r12
call fcn.140002500
xor eax, eax
jmp 0x140002121
lea r8, [rbp + 0x60]
mov rdx, r15
mov rcx, r12
call fcn.140002500
xor eax, eax
jmp 0x140002121
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140002079
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r8, qword [r14 + 0x10]
test r8, r8
je 0x14000210e
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.140002500
mov rbx, qword [r14]
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call fcn.140002520
test rax, rax
je 0x14000210e
lea r8, [0x14000f874]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024d0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024d0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x14000210e
test al, 0x10
je 0x14000203c
mov r8, r13
mov rdx, r15
mov rcx, r12
call fcn.140002500
mov eax, 0x485
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret