Function at 0x1000d8a9
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb18
push ebx
push esi
push edi
xor ebx, ebx
push 0x143c
push ebx
push 0x10022100
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.1000ab40
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x10022600
mov dword [0x100232e4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [0x100232e4]
push eax
call fcn.1000bc69
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
pop ecx
pop ecx
push 0x105
mov edi, 0x100232e8
push edi
push ebx
call esi
test eax, eax
je 0x1000d91b
push 0x5c
push edi
call fcn.1000abfe
pop ecx
pop ecx
mov dword [0x100233f0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.1000cfaf
mov dword [0x100221c4], eax
push dword [eax]
call fcn.1000d0ae
pop ecx
pop ecx
test eax, eax
je 0x1000d945
mov dword [0x100222c8], 3
jmp 0x1000d958
call fcn.1000cff1
xor ecx, ecx
test eax, eax
setg cl
inc ecx
mov dword [0x100222c8], ecx
mov eax, dword [ebp + 8]
mov dword [0x100222cc], eax
mov eax, 0x80
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x10022248
lea eax, [ebp - 8]
push eax
mov eax, dword [0x100221c4]
push 0x100221c8
push dword [eax]
push ebx
call dword [0x100236ec]
mov edi, 0x100222d0
cmp dword [ebp + 0xc], ebx
je 0x1000d9a4
mov ebx, 0x104
push ebx
push dword [ebp + 0xc]
jmp 0x1000d9b2
cmp dword [ebp + 0x10], ebx
mov ebx, 0x104
push ebx
je 0x1000d9bd
push dword [ebp + 0x10]
push edi
call fcn.1000bb14
add esp, 0xc
jmp 0x1000d9c6
push edi
push dword [0x100222cc]
call esi
push 0x20
push 0x5c
push edi
call fcn.1000abfe
pop ecx
pop ecx
push eax
mov esi, 0x100221a4
push esi
call fcn.1000bb14
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x100223d4
push edi
mov byte [eax + 0x100221a0], 0
call fcn.1000ac22
push 0
push esi
push 0x100223d4
push ebx
mov edi, 0x100224fc
push edi
push 0x10012770
call fcn.1000ae48
add esp, 0x20
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x1824
mov byte [eax + 0x100224fb], 0
call fcn.1000b76d
push 0
push eax
push edi
push ebx
push edi
push 0x10016b44
mov dword [ebp + 0xc], eax
call fcn.1000ae48
lea eax, [ebp + 0xc]
push eax
call fcn.1000b814
push 0x10022600
push 0xf
push 0xa
push 0x100224d8
call fcn.1000acb4
add esp, 0x30
push 0x10022fc4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
call fcn.1000be10
add esp, 0xc
push eax
call fcn.1000ea3c
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.1000d0fb
mov esi, 0x9c
push esi
movsx eax, al
push 0
mov edi, 0x10022100
push edi
mov dword [0x10022fd4], eax
call fcn.1000ab40
add esp, 0x10
push edi
mov dword [0x10022100], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10023538], eax
call fcn.1000d85e
push eax
mov dword [0x100221a0], eax
call fcn.1000d885
mov dword [esp], 0x103
mov esi, 0x10022fd8
push esi
mov word [0x1002219c], ax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push ebx
lea eax, [ebp - 0x154]
push eax
push str.SystemRoot
call edi
test eax, eax
jne 0x1000db21
push esi
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x103
push 0x100230dc
push dword [0x10023e54]
call edi
test eax, eax
jne 0x1000db62
push eax
push str.TEMP
push esi
push ebx
push 0x100230dc
push 0x10012770
call fcn.1000ae48
add esp, 0x18
push 0x100230dc
push dword [0x10023e54]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x103
push 0x100231e0
push dword [0x100238ec]
call edi
test eax, eax
jne 0x1000dba0
push eax
push str.TEMP
push esi
push ebx
mov esi, 0x100231e0
push esi
push 0x10012770
call fcn.1000ae48
add esp, 0x18
push esi
push dword [0x100238ec]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x3f
lea eax, [ebp - 0x4c]
push eax
mov esi, str.SystemDrive
push esi
call edi
test eax, eax
jne 0x1000dbbe
push 0x10016b94
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0xb18]
push eax
push 0
mov esi, 0x10022fc4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
call fcn.1000be10
add esp, 0xc
push eax
call fcn.1000bc69
push 0x20
lea eax, [ebp - 0xb18]
push 0x100233f4
push eax
call fcn.1000bde4
lea eax, [ebp - 0xb18]
push eax
push 0x1e
push 0x14
push 0x10023414
call fcn.1000acb4
add esp, 0x24
test byte [ebp + 0x14], 1
pop edi
pop esi
pop ebx
jne 0x1000dc21
call fcn.1000d6cb
mov dword [0x10023434], eax
call fcn.1000ba80
xor eax, eax
inc eax
leave
ret