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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
xor ecx, ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004045cc
mov eax, dword [ebp - 8]
call fcn.004045cc
xor eax, eax
push ebp
push 0x4134e1
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004045dc
push eax
call sub.kernel32.dll_GetEnvironmentVariableA
test eax, eax
setne bl
push 0
push 0
push 0x4134f0
call sub.kernel32.dll_GetEnvironmentVariableA
test eax, eax
setne byte [ebp - 9]
mov eax, ebx
xor al, 1
test al, al
jne 0x413281
cmp byte [ebp - 9], 0
jne 0x4134ac
mov byte [ebp - 0xa], 0
mov dl, 1
mov eax, dword [0x40f958]
call fcn.0040365c
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x4134a5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x413504
call fcn.004075d8
test al, al
je 0x4132bd
mov edx, 0x413504
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x68]
xor bl, 1
test bl, bl
je 0x41342d
mov dl, 1
mov eax, dword [0x412898]
call fcn.00412968
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x413426
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x80000002
mov eax, dword [ebp - 0x20]
call fcn.00412a08
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
call fcn.00412a6c
mov ebx, eax
test bl, bl
jne 0x413336
mov eax, dword [0x4144c0]
mov edx, 0x413518
call fcn.00404770
call fcn.004031ac
call fcn.0040275c
mov edx, 0x80000001
mov eax, dword [ebp - 0x20]
call fcn.00412a08
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
call fcn.00412a6c
mov ebx, eax
test bl, bl
je 0x4133ed
mov edx, 0x413554
mov eax, dword [ebp - 0x20]
call fcn.00412d88
test al, al
je 0x4133ed
lea ecx, [ebp - 0x1c]
mov edx, 0x413554
mov eax, dword [ebp - 0x20]
call fcn.00412c9c
lea eax, [ebp - 0x18]
mov edx, 0x104
call fcn.0040470c
push 0x104
mov eax, dword [ebp - 0x18]
call fcn.004045dc
push eax
mov eax, dword [ebp - 0x1c]
call fcn.004045dc
push eax
call sub.kernel32.dll_GetShortPathNameA
mov edx, eax
lea eax, [ebp - 0x18]
call fcn.0040470c
mov eax, dword [ebp - 0x18]
cmp byte [eax], 0
je 0x4133b4
mov eax, dword [ebp - 0x18]
call fcn.004043dc
mov ebx, eax
mov eax, dword [ebp - 0x1c]
call fcn.004043dc
cmp ebx, eax
jne 0x4133bf
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
call fcn.004041d8
push 0x413564
push dword [ebp - 4]
push 0x413574
push dword [ebp - 0x18]
lea eax, [ebp - 0x24]
mov edx, 4
call fcn.0040449c
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov byte [ebp - 0xa], 1
jmp 0x413410
mov eax, dword [0x4144c0]
mov edx, 0x413580
call fcn.00404770
call fcn.004031ac
call fcn.0040275c
mov eax, 1
call fcn.00404128
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41342d
mov eax, dword [ebp - 0x20]
call fcn.0040368c
ret
cmp byte [ebp - 9], 0
jne 0x41347c
lea eax, [ebp - 0x14]
mov edx, 0x104
call fcn.0040470c
push 0x104
mov eax, dword [ebp - 0x14]
call fcn.004045dc
push eax
call sub.kernel32.dll_GetSystemDirectoryA
mov edx, eax
lea eax, [ebp - 0x14]
call fcn.0040470c
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
mov edx, 0x4135a0
call fcn.00404428
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov byte [ebp - 0xa], 1
cmp byte [ebp - 0xa], 0
je 0x41348f
mov edx, 0x413504
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x74]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4134ac
mov eax, dword [ebp - 0x10]
call fcn.0040368c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4134e8
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00404164
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00404164
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404164
ret