Function at 0x100962a
Capabilities:
Get common file path
Query environment variable
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
push ebx
push esi
push edi
mov edi, 0x104
push edi
lea eax, [ebp - 0x224]
push eax
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push dword [ebp + 0x14]
push 0x10020f0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov esi, 0x1000
push esi
call sub.msvcrt.dll_malloc
push esi
mov dword [ebp + 0x14], eax
call sub.msvcrt.dll_malloc
xor ebx, ebx
cmp dword [ebp + 0x14], ebx
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x1009884
cmp eax, ebx
je 0x1009884
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
je 0x1009872
push ebx
push edi
jmp 0x100985a
mov esi, dword [ebp + 0x14]
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x120], bl
lea edi, [ebp - 0x11f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x224]
push eax
push 0x10020dc
mov dword [ebp - 0xc], 1
call edi
mov eax, esi
cmp byte [eax], 0x3f
jne 0x10096f3
mov dword [ebp - 0xc], ebx
lea esi, [eax + 1]
jmp 0x10096ee
inc esi
cmp byte [esi], 0x20
je 0x10096ed
cmp byte [esi], 0x23
jne 0x100971d
inc esi
mov eax, esi
jmp 0x1009703
cmp byte [esi], 0x2c
je 0x1009709
inc esi
cmp byte [esi], bl
jne 0x10096fd
jmp 0x100970c
mov byte [esi], bl
inc esi
cmp byte [esi], 0x20
je 0x100970b
push eax
call fcn.01003f0a
test eax, eax
jne 0x100971d
mov byte [esi], bl
cmp byte [esi], 0x40
jne 0x1009782
inc esi
mov eax, esi
jmp 0x100972d
cmp byte [esi], 0x2c
je 0x1009733
inc esi
cmp byte [esi], bl
jne 0x1009727
jmp 0x1009736
mov byte [esi], bl
inc esi
cmp byte [esi], 0x20
je 0x1009735
cmp byte [esi], bl
je 0x1009780
push ebx
push 0x104
lea ecx, [ebp - 0x120]
push ecx
push eax
push ebx
push dword [ebp + 8]
call dword [sym.imp.SETUPAPI.dll_SetupGetTargetPathA]
test eax, eax
je 0x1009780
cmp byte [ebp - 0x120], bl
je 0x1009780
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x120]
push eax
push 0x10020dc
call edi
jmp 0x1009782
mov byte [esi], bl
cmp byte [esi], bl
je 0x1009842
mov edi, 0x1000
push edi
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x1009842
push dword [ebp - 4]
mov esi, 0x1021640
push 0x10020c4
push esi
mov dword [ebp + 0xc], ebx
call sub.ntdll.dll_sprintf
add esp, 0xc
push esi
call fcn.01008343
cmp byte [ebp - 0x120], bl
je 0x10097e4
lea eax, [ebp - 0x120]
push eax
push 0x10020ac
push esi
call sub.ntdll.dll_sprintf
add esp, 0xc
push esi
call fcn.01008343
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 0x10]
push dword [ebp - 4]
call fcn.010074f5
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp + 0xc]
push 0x1002098
push edi
push esi
call sub.ntdll.dll__snprintf
add esp, 0x10
push esi
call fcn.01008343
cmp dword [ebp - 0xc], ebx
jne 0x1009842
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x1009842
mov dword [ebp - 8], ebx
xor eax, eax
cmp ecx, dword [eax + 0x100f130]
je 0x100983b
add eax, 4
cmp eax, 0xc
jb 0x1009829
jmp 0x1009872
mov dword [ebp - 8], 1
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
je 0x1009872
push ebx
push 0x104
push dword [ebp + 0x14]
lea eax, [ebp - 0x1c]
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
test eax, eax
jne 0x10096aa
push dword [ebp + 0x14]
call sub.msvcrt.dll_free
push dword [ebp - 4]
call sub.msvcrt.dll_free
pop ecx
pop ecx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x10