Function at 0x1047f8d
Capabilities:
Check if file exists
Get disk information
Get file attributes
Query environment variable
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push edi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
xor edi, edi
push SysStringLen
mov dword [ebp - 0x18], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x1047fd2
push dword [ebp + 8]
push 0x101547c
call fcn.01071ac0
pop ecx
pop ecx
jmp 0x104819e
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x1048193
mov eax, dword [ebp - 4]
cmp eax, edi
je 0x1048193
cmp eax, 0x2710
ja 0x1048193
cmp dword [ebp - 8], 7
je 0x104801f
cmp dword [ebp - 8], 1
je 0x104801f
cmp dword [ebp - 8], 2
jne 0x1048193
add eax, 2
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
cmp ebx, edi
pop ecx
mov dword [ebp - 0x14], ebx
jne 0x104803d
push 0x1015444
jmp 0x1048198
mov eax, dword [ebp - 4]
mov byte [ebx + eax], 0
mov eax, dword [ebp - 4]
mov byte [ebx + eax + 1], 0
lea eax, [ebp - 4]
push eax
push ebx
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x1048193
cmp byte [ebx], al
je 0x104819d
mov esi, dword [ebp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp + 0x1c]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp eax, 1
mov dword [ebp - 4], eax
jb 0x104817c
cmp eax, dword [ebp + 0x1c]
jae 0x104817c
push esi
call dword [sym.imp.msvcrt.dll__mbslwr]
mov al, byte [esi]
cmp al, 0x61
pop ecx
jl 0x1048142
cmp al, 0x7a
jg 0x1048142
cmp byte [esi + 1], 0x3a
jne 0x1048142
mov byte [ebp - 0x10], al
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 0xf], 0x3a
mov byte [ebp - 0xe], 0x5c
mov byte [ebp - 0xd], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 3
je 0x10480de
cmp eax, 5
jne 0x1048142
push esi
call edi
cmp eax, 0xffffffff
je 0x1048142
test al, 0x10
je 0x1048142
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1048123
cmp byte [ecx], 0
je 0x1048123
mov eax, esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10480fb
push dword [ebp + 0x1c]
sub eax, ecx
push esi
push dword [ebp + 0x14]
mov dword [ebp - 4], eax
push esi
call fcn.01070fc9
push esi
call edi
cmp eax, 0xffffffff
je 0x1048142
mov ecx, dword [ebp - 4]
mov byte [ecx + esi], 0
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1048160
cmp byte [ecx], 0
je 0x1048160
push dword [ebp + 0x1c]
push esi
push ecx
push esi
call fcn.01070fc9
push esi
call edi
cmp eax, 0xffffffff
jne 0x1048160
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1048147
sub eax, edx
lea ebx, [ebx + eax + 1]
cmp byte [ebx], cl
jne 0x1048077
xor edi, edi
jmp 0x104819d
test al, 0x10
je 0x1048173
push dword [ebp + 0x1c]
push esi
push 0x1009220
push esi
call fcn.01070fc9
mov dword [ebp - 0x18], 1
jmp 0x104815c
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10153f0
call fcn.01071aea
add esp, 0xc
jmp 0x104815c
push 0x10153bc
call fcn.01071aad
pop esi
cmp dword [ebp - 0xc], edi
je 0x10481ac
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x14], edi
pop edi
pop ebx
je 0x10481bd
push dword [ebp - 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 0x18]
leave
ret 0x18