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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x1099a38]
mov ecx, dword [ebp + 0x18]
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x22c], ecx
push eax
xor ecx, ecx
inc ecx
push 0x1024cc8
push ecx
mov dword [ebp - 0x230], edi
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x220], ecx
call fcn.01081c80
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
push 0x1024cbc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov ebx, 0x1000
push ebx
call sub.msvcrt.dll_malloc
push ebx
mov dword [ebp - 0x210], eax
call sub.msvcrt.dll_malloc
xor esi, esi
cmp dword [ebp - 0x210], esi
pop ecx
pop ecx
mov dword [ebp - 0x228], eax
je 0x1073a3d
cmp eax, esi
je 0x1073a3d
lea eax, [ebp - 0x240]
push eax
push esi
push dword [ebp - 0x218]
push edi
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindFirstLineA]
test eax, eax
je 0x1073a25
push esi
push ebx
push dword [ebp - 0x210]
lea eax, [ebp - 0x240]
push esi
push esi
push esi
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
je 0x1073a25
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x108], 0
lea edi, [ebp - 0x107]
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 - 0x20c]
push eax
mov dword [ebp - 0x21c], esi
mov esi, dword [ebp - 0x210]
push 0x1024ca8
mov dword [ebp - 0x224], 1
call edi
mov eax, esi
cmp byte [eax], 0x2a
jne 0x107380f
mov dword [ebp - 0x21c], 1
lea esi, [eax + 1]
jmp 0x107380a
inc esi
cmp byte [esi], 0x20
je 0x1073809
cmp byte [esi], 0x7e
jne 0x1073830
inc esi
cmp dword [0x10bd0b4], 0
je 0x1073830
push esi
push 0x1024c8c
call fcn.01071ac0
pop ecx
pop ecx
jmp 0x1073a71
cmp byte [esi], 0x3f
jne 0x1073842
and dword [ebp - 0x224], 0
inc esi
cmp byte [esi], 0x20
je 0x107383c
cmp byte [esi], 0x23
jne 0x107386e
inc esi
mov eax, esi
jmp 0x1073852
cmp byte [esi], 0x2c
je 0x1073859
inc esi
cmp byte [esi], 0
jne 0x107384c
jmp 0x107385d
mov byte [esi], 0
inc esi
cmp byte [esi], 0x20
je 0x107385c
push eax
call fcn.01030e6f
test eax, eax
jne 0x107386e
mov byte [esi], al
cmp byte [esi], 0x40
jne 0x10738dd
inc esi
mov eax, esi
jmp 0x107387e
cmp byte [esi], 0x2c
je 0x1073885
inc esi
cmp byte [esi], 0
jne 0x1073878
jmp 0x1073889
mov byte [esi], 0
inc esi
cmp byte [esi], 0x20
je 0x1073888
cmp byte [esi], 0
je 0x10738da
push 0
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
push 0
push dword [ebp - 0x230]
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetTargetPathA]
test eax, eax
je 0x10738da
cmp byte [ebp - 0x108], 0
je 0x10738da
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x108]
push eax
push 0x1024ca8
call edi
jmp 0x10738dd
mov byte [esi], 0
cmp byte [esi], 0
je 0x1073a71
mov edi, dword [ebp - 0x228]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x1073a71
and dword [ebp - 0x214], 0
cmp dword [ebp - 0x21c], 0
je 0x107391e
push 0x1024c74
call fcn.01071aad
mov esi, 0x10f4480
jmp 0x1073938
push edi
push 0x1024c5c
mov esi, 0x10f4480
push esi
call fcn.0106bf51
add esp, 0xc
push esi
call fcn.01071aad
cmp byte [ebp - 0x108], 0
je 0x107396c
cmp dword [ebp - 0x21c], 0
je 0x1073951
push 0x1024c44
jmp 0x1073967
lea eax, [ebp - 0x108]
push eax
push 0x1024c2c
push esi
call fcn.0106bf51
add esp, 0xc
push esi
call fcn.01071aad
lea eax, [ebp - 0x214]
push eax
push dword [ebp + 0x10]
push edi
call fcn.01070db7
test eax, eax
jne 0x10739b1
cmp dword [ebp - 0x21c], eax
push dword [ebp - 0x214]
push dword [ebp - 0x218]
je 0x10739a3
push 0x1024bd8
call fcn.01071ac0
add esp, 0xc
jmp 0x10739b1
push edi
push 0x1024b80
call fcn.01071ac0
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp - 0x214]
push 0x1024b6c
push ebx
push esi
call sub.msvcrt.dll__snprintf
add esp, 0x10
push esi
call fcn.01071aad
cmp dword [ebp - 0x224], 0
jne 0x1073a71
mov ecx, dword [ebp - 0x214]
cmp ecx, 0xbc2
jne 0x1073a02
mov eax, dword [ebp - 0x22c]
mov dword [eax], 1
jmp 0x1073a71
test ecx, ecx
je 0x1073a71
xor eax, eax
mov dword [ebp - 0x220], eax
cmp ecx, dword [eax + 0x1099a64]
je 0x1073a67
add eax, 4
cmp eax, 0xc
jb 0x1073a0e
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x210]
call fcn.0106bf39
push dword [ebp - 0x228]
call fcn.0106bf39
pop ecx
pop ecx
push dword [ebp - 0x218]
push 0x1024b50
push 1
call fcn.01081c80
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x220]
add esp, 0xc
pop edi
pop esi
pop ebx
call fcn.0106bc50
leave
ret 0x14
mov dword [ebp - 0x220], 1
lea eax, [ebp - 0x240]
push eax
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpFindNextLine]
test eax, eax
je 0x1073a25
xor eax, eax
push eax
push ebx
push dword [ebp - 0x210]
push eax
push eax
push eax
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.UPDSPAPI.dll_UpdSpGetLineTextA]
test eax, eax
je 0x1073a25
xor esi, esi
jmp 0x10737b2