Function at 0x1000d672
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 0x100210e0
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call fcn.1000a6a0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x100215e0
mov dword [0x100222c4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, dword [0x100222c4]
push eax
call fcn.1000bc28
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
pop ecx
pop ecx
push 0x105
mov edi, 0x100222c8
push edi
push ebx
call esi
test eax, eax
je 0x1000d6e4
push 0x5c
push edi
call fcn.1000abce
pop ecx
pop ecx
mov dword [0x100223d0], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.1000ce55
mov dword [0x100211a4], eax
push dword [eax]
call fcn.1000cf54
pop ecx
pop ecx
test eax, eax
je 0x1000d70e
mov dword [0x100212a8], 3
jmp 0x1000d721
call fcn.1000ce97
xor ecx, ecx
test eax, eax
setg cl
inc ecx
mov dword [0x100212a8], ecx
mov eax, dword [ebp + 8]
mov dword [0x100212ac], 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 0x10021228
lea eax, [ebp - 8]
push eax
mov eax, dword [0x100211a4]
push 0x100211a8
push dword [eax]
push ebx
call dword [0x100226cc]
mov edi, 0x100212b0
cmp dword [ebp + 0xc], ebx
je 0x1000d76d
mov ebx, 0x104
push ebx
push dword [ebp + 0xc]
jmp 0x1000d77b
cmp dword [ebp + 0x10], ebx
mov ebx, 0x104
push ebx
je 0x1000d786
push dword [ebp + 0x10]
push edi
call fcn.1000bae4
add esp, 0xc
jmp 0x1000d78f
push edi
push dword [0x100212ac]
call esi
push 0x20
push 0x5c
push edi
call fcn.1000abce
pop ecx
pop ecx
push eax
mov esi, 0x10021184
push esi
call fcn.1000bae4
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x100213b4
push edi
mov byte [eax + 0x10021180], 0
call fcn.1000abf2
push 0
push esi
push 0x100213b4
push ebx
mov edi, 0x100214dc
push edi
push 0x10012768
call fcn.1000ae18
add esp, 0x20
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x129f
mov byte [eax + 0x100214db], 0
call fcn.1000b73d
push 0
push eax
push edi
push ebx
push edi
push 0x10016afc
mov dword [ebp + 0xc], eax
call fcn.1000ae18
lea eax, [ebp + 0xc]
push eax
call fcn.1000b7e4
push 0x100215e0
push 0xf
push 0xa
push 0x100214b8
call fcn.1000ac84
add esp, 0x30
push 0x10021fa4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
call fcn.1000bdcf
add esp, 0xc
push eax
call fcn.1000e805
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.1000cfa1
mov esi, 0x9c
push esi
movsx eax, al
push 0
mov edi, 0x100210e0
push edi
mov dword [0x10021fb4], eax
call fcn.1000a6a0
add esp, 0x10
push edi
mov dword [0x100210e0], 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 [0x10022518], eax
call fcn.1000d627
push eax
mov dword [0x10021180], eax
call fcn.1000d64e
mov dword [esp], 0x103
mov esi, 0x10021fb8
push esi
mov word [0x1002117c], 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 0x1000d8ea
push esi
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x103
push 0x100220bc
push dword [0x10022c98]
call edi
test eax, eax
jne 0x1000d92b
push eax
push str.TEMP
push esi
push ebx
push 0x100220bc
push 0x10012768
call fcn.1000ae18
add esp, 0x18
push 0x100220bc
push dword [0x10022c98]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x103
push 0x100221c0
push dword [0x10022cb0]
call edi
test eax, eax
jne 0x1000d969
push eax
push str.TEMP
push esi
push ebx
mov esi, 0x100221c0
push esi
push 0x10012768
call fcn.1000ae18
add esp, 0x18
push esi
push dword [0x10022cb0]
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 0x1000d987
push 0x10016b44
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0xb18]
push eax
push 0
mov esi, 0x10021fa4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
call fcn.1000bdcf
add esp, 0xc
push eax
call fcn.1000bc28
push 0x20
lea eax, [ebp - 0xb18]
push 0x100223d4
push eax
call fcn.1000bda3
lea eax, [ebp - 0xb18]
push eax
push 0x1e
push 0x14
push 0x100223f4
call fcn.1000ac84
add esp, 0x24
test byte [ebp + 0x14], 1
pop edi
pop esi
pop ebx
jne 0x1000d9ea
call fcn.1000d491
mov dword [0x10022414], eax
call fcn.1000ba50
xor eax, eax
inc eax
leave
ret