Function at 0x101fe9c0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
push 0x104
mov ebx, ecx
mov byte [ebp - 2], 0
call fcn.10450898
push 0x104
mov esi, eax
push 0
push esi
mov dword [ebp - 0xc], esi
call fcn.10425c00
mov al, byte [0x11d23ce2]
add esp, 0x10
cmp byte [0x11d23ce3], 0
mov byte [ebp - 1], al
jne 0x101fea4e
test al, al
jne 0x101fea47
push 0x10468d00
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x101fea38
push 0x10468d90
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x101fea38
lea eax, [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
cmp dword [ebp - 8], 1
sete al
mov byte [ebp - 1], al
mov byte [0x11d23ce2], al
mov byte [0x11d23ce3], 1
push 0x104
push 0
push ebx
call fcn.10425c00
add esp, 0xc
lea eax, [ebp - 0x10]
push eax
push 0x20219
push 0
push 0x1046d0e0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x101fec7c
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x104
push eax
push esi
lea eax, [ebp - 0x18]
push eax
push 0
push 0x1046d110
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x101fec73
push esi
call fcn.1043a9cb
push 0x1046d120
push esi
call fcn.10425570
add esp, 0xc
push 0x104
test eax, eax
je 0x101feb85
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x101feb13
cmp byte [ebp - 1], 0
je 0x101feafd
push 0x5c
push ebx
call fcn.10425990
movq xmm0, qword [0x1046d0b0]
mov ecx, eax
add esp, 8
movq qword [ecx + 1], xmm0
mov al, byte [0x1046d0b8]
mov byte [ecx + 9], al
lea edi, [ebx - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x101feb00
mov ax, word [0x10468d10]
mov word [edi], ax
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101feb18
sub ecx, edx
lea eax, [ecx + 0xb]
cmp eax, 0x104
ja 0x101fec73
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x101feb32
mov eax, dword [0x1046bb70]
mov dword [ecx], eax
mov eax, dword [0x1046bb74]
mov dword [ecx + 4], eax
mov eax, dword [0x1046bb78]
push ebx
mov dword [ecx + 8], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x101feb6c
test al, 0x10
jne 0x101feb6c
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
push 0x104
push 0
push ebx
call fcn.10425c00
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
call fcn.10425c00
add esp, 0xc
push 0x104
push ebx
push 0x1046d130
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x5c
push esi
call fcn.10425990
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x101fec73
movq xmm0, qword [0x1046bb70]
movq qword [ecx + 1], xmm0
mov eax, dword [0x1046bb78]
push 0x1046d140
push esi
mov dword [ecx + 9], eax
call fcn.10425570
mov edi, eax
add esp, 8
test edi, edi
je 0x101fec73
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101febe8
sub ecx, edx
mov edx, ebx
lea eax, [edx + 1]
mov dword [ebp - 0x14], eax
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x101fec00
sub edx, dword [ebp - 0x14]
lea eax, [edx + ecx]
cmp eax, 0x104
jae 0x101fec73
push 0x5c
push edi
call fcn.104257e0
mov edx, eax
add esp, 8
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x101fec23
sub edx, esi
lea edi, [ebx - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x101fec30
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x101fec5c
test al, 0x10
jne 0x101fec5c
mov byte [ebp - 2], 1
jmp 0x101fec70
push 0x104
push 0
push ebx
call fcn.10425c00
add esp, 0xc
mov byte [ebp - 2], 0
mov esi, dword [ebp - 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.10450877
mov al, byte [ebp - 2]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret