Function at 0x1001dcaa
Capabilities:
Get common file path
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
and byte [edi], 0
cmp dword [ebp + 8], 0x100
jge 0x1001dd0f
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x1001de96
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x1001dd01
push edi
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
mov eax, dword [ebp - 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x1001de96
cmp dword [0x1007abac], 0
mov esi, 0x104
mov ebx, 0x1007a180
jne 0x1001de29
mov edi, 0x1007a284
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
push 0x1007a388
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x1007a89c
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0x1007a89c
call sub.MSVCRT.dll_strlen
add eax, 0x1007a89b
pop ecx
cmp byte [eax], 0x5c
jne 0x1001dd63
and byte [eax], 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x3a
push ebx
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
je 0x1001dd7f
and byte [eax + 1], 0
push esi
mov edi, 0x1007a48c
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
push str.Program_Files
push edi
call dword [sym.imp.SHLWAPI.dll_StrNCatA]
push esi
mov edi, 0x1007a590
push 0
push edi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0xc], esi
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push edi
push eax
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
push esi
mov edi, 0x1007a694
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push str._UserProfile_
call edi
push esi
push 0
push 0x1007a798
call sub.MSVCRT.dll_memset
add esp, 0xc
push esi
push 0x1007a798
push str._AllUserProfile_
call edi
mov edi, dword [ebp + 0xc]
mov dword [0x1007abac], 1
mov eax, dword [ebp + 8]
cmp eax, 0x107
jg 0x1001de4b
add eax, 0xffffff00
push esi
imul eax, eax, 0x104
add eax, ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x1001de96
sub eax, 0x108
je 0x1001de8e
dec eax
je 0x1001de88
dec eax
jne 0x1001de96
lea eax, [ebp - 0x2c]
push 0x1c
push eax
push fcn.1001dfa9
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
push esi
push edi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x5c
push edi
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
test eax, eax
pop ecx
je 0x1001de96
and byte [eax], 0
jmp 0x1001de96
push esi
push edi
push 0
jmp 0x1001de6e
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
pop edi
pop esi
pop ebx
leave
ret