Function at 0x140001d20
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 0x140001f4a
cmp qword [r14 + 0x30], 0
je 0x140001e87
lea r8, [rbp + 0x170]
mov edx, 0x104
lea rcx, [rbp + 0x280]
call fcn.140002510
lea rcx, [rbp + 0x280]
call fcn.140002530
mov rbx, rax
test rax, rax
je 0x140001e82
lea rsi, [rbp + 0x280]
nop dword [rax]
cmp byte [rsi + rbx - 1], 0x5c
je 0x140001dda
test rbx, rbx
je 0x140001e82
dec rbx
cmp byte [rsi + rbx - 1], 0x5c
jne 0x140001dc7
test rbx, rbx
je 0x140001e82
dec rbx
lea r8, [rbp + 0x280]
mov edx, 0x104
lea rcx, [rbp + 0x60]
mov byte [rbp + rbx + 0x280], 0
call fcn.140002510
mov rdi, qword [r14 + 0x30]
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rbp + 0x60]
call fcn.1400024e0
mov rcx, rax
mov r8, rdi
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rbp + 0x60]
call fcn.140002530
test rax, rax
je 0x140001e79
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rbp + 0x60]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rbp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001e79
test al, 0x10
je 0x140002333
test rbx, rbx
jne 0x140001dc0
mov r9d, dword [rsp + 0x30]
cmp qword [r14 + 0x28], 0
je 0x140001f4a
lea ecx, [r9 - 4]
mov eax, r9d
mov edx, 0x104
lea r8, str..ini
sub rdx, rcx
lea rcx, [rbp + rax + 0x16c]
call fcn.140002510
mov rcx, qword [r14 + 0x28]
lea rax, [rbp + 0x170]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x50]
lea r8, [0x14000f931]
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.140002530
test rax, rax
je 0x140001f4a
lea rcx, [rsp + 0x50]
call fcn.140002530
test rax, rax
je 0x140001f4a
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001f4a
test al, 0x10
je 0x14000231c
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 0x140001fea
lea r8d, [rax - 1]
cmp byte [rsp + r8 + 0x50], 0x5c
je 0x140001f92
nop word [rax + rax]
mov edx, r8d
dec r8d
mov dword [rsp + 0x30], edx
cmp byte [rsp + r8 + 0x50], 0x5c
jne 0x140001f80
lea eax, [rdx - 1]
lea rcx, [rsp + 0x50]
mov byte [rsp + rax + 0x50], 0
call fcn.140002530
test rax, rax
je 0x140001fea
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140001fea
test al, 0x10
je 0x14000231c
cmp qword [r14], 0
je 0x1400023ee
mov r8, qword [r14 + 0x20]
xor edi, edi
mov qword [rsp + 0x38], rdi
test r8, r8
je 0x140002158
mov edx, 0xc8
lea rcx, [rbp + 0x60]
call fcn.140002510
mov rbx, qword [r14]
lea r8, [0x14000f928]
mov edx, 0xc8
lea rcx, [rbp + 0x60]
call fcn.1400024e0
mov rcx, rax
mov r8, rbx
mov edx, 0xc8
call fcn.1400024e0
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 0x140002143
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 0x140002143
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x40], 2
mov qword [rsp + 0x38], rdi
jne 0x1400020f3
lea r8, [rsp + 0x50]
mov edx, 0x104
lea rcx, [rbp + 0x170]
call fcn.140002510
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.140002530
test rax, rax
je 0x140002143
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140002143
test al, 0x10
je 0x14000231c
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140002153
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x38], rdi
mov rcx, qword [r14 + 8]
test rcx, rcx
je 0x140002207
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 0x140002207
cmp byte [rsp + 0x50], 0x25
je 0x140002207
mov rbx, qword [r14]
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call fcn.140002530
test rax, rax
je 0x140002207
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140002207
test al, 0x10
je 0x14000231c
cmp qword [r14 + 0x18], rdi
je 0x140002359
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 0x140002349
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 0x140002349
mov rbx, qword [r14 + 0x18]
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024e0
mov rbx, qword [r14]
lea r8, [0x14000f928]
mov edx, 0x104
mov rcx, rax
call fcn.1400024e0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call fcn.140002530
test rax, rax
je 0x140002349
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x140002349
test al, 0x10
jne 0x140002349
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r8, [rsp + 0x50]
mov rdx, r15
mov rcx, r12
call fcn.140002510
xor eax, eax
jmp 0x140002401
lea r8, [rbp + 0x60]
mov rdx, r15
mov rcx, r12
call fcn.140002510
xor eax, eax
jmp 0x140002401
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140002359
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r8, qword [r14 + 0x10]
test r8, r8
je 0x1400023ee
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.140002510
mov rbx, qword [r14]
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, rbx
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call fcn.140002530
test rax, rax
je 0x1400023ee
lea r8, [0x14000f928]
mov edx, 0x104
lea rcx, [rsp + 0x50]
call fcn.1400024e0
mov rcx, rax
mov r8, r13
mov edx, 0x104
call fcn.1400024e0
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [rax - 1]
cmp ecx, 0xfffffffd
ja 0x1400023ee
test al, 0x10
je 0x14000231c
mov r8, r13
mov rdx, r15
mov rcx, r12
call fcn.140002510
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