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

Disassembly:
sub esp, 0x10
push esi
push edi
mov esi, 0x1770
push esi
call fcn.0041375e
mov dword [0x44a4e0], eax
mov byte [eax], 0
mov dword [esp], 0x2ee0
call fcn.0041375e
xor ecx, ecx
mov dword [0x44a4e4], eax
mov word [eax], cx
mov dword [esp], 0x2719
call fcn.004038fd
pop ecx
push dword [0x44a4e0]
test eax, eax
push esi
setne byte [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x405761
push dword [esp + 0xc]
xor edi, edi
inc edi
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405761
push dword [0x44a4e4]
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x405761
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e7a
push ebx
push ebp
push esi
push dword [0x44a4e0]
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLongPathNameA]
test eax, eax
jbe 0x40588f
push str.AppDataLocalTemp
push dword [0x44a4e0]
call fcn.00414590
pop ecx
pop ecx
test eax, eax
je 0x40588f
mov eax, dword [0x44a4e0]
push eax
mov dword [esp + 0x1c], eax
call fcn.00414100
pop ecx
test eax, eax
jbe 0x405843
push 0
push 0
push dword [esp + 0x20]
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x405837
lea edi, [eax + 0xa]
push edi
call fcn.0041375e
pop ecx
push edi
mov edi, dword [esp + 0x1c]
mov ebp, eax
push ebp
push edi
mov byte [esp + 0x1f], 1
call ebx
test eax, eax
jbe 0x405829
push 0x3f
push ebp
call fcn.00414040
pop ecx
pop ecx
test eax, eax
je 0x4057fa
mov byte [esp + 0x13], 0
jmp 0x405829
cmp byte [esp + 0x14], 0
je 0x405829
cmp dword [esp + 0x1c], esi
jge 0x405829
push ebp
push edi
call fcn.00415ec0
pop ecx
pop ecx
test eax, eax
je 0x405829
push ebp
push str.using_long_path__S
call fcn.0040ff78
push ebp
push edi
call fcn.00414580
add esp, 0x10
push ebp
call fcn.00414445
cmp byte [esp + 0x17], 0
pop ecx
je 0x40588f
push dword [esp + 0x18]
call fcn.00405303
pop ecx
jmp 0x405845
xor al, al
test al, al
je 0x40588f
push esi
push dword [0x44a4e4]
push 0x434398
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jbe 0x40588f
push 0x434370
push dword [0x44a4e4]
call fcn.00414e6c
pop ecx
pop ecx
test eax, eax
je 0x40588f
push 1
push 0
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
push dword [0x44a4e0]
push str.HOMEDRIVE
call edi
test eax, eax
jbe 0x4059ee
push dword [0x44a4e0]
call fcn.00414100
pop ecx
mov ecx, esi
sub ecx, eax
push ecx
push dword [0x44a4e0]
call fcn.00414100
add eax, dword [0x44a4e0]
pop ecx
push eax
push str.HOMEPATH
call edi
test eax, eax
jbe 0x4059ee
mov eax, dword [0x44a4e0]
push eax
mov dword [esp + 0x1c], eax
call fcn.00414100
pop ecx
test eax, eax
jbe 0x405984
push 0
push 0
push dword [esp + 0x20]
call ebx
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x405978
lea edi, [eax + 0xa]
push edi
call fcn.0041375e
pop ecx
push edi
mov edi, dword [esp + 0x1c]
mov ebp, eax
push ebp
push edi
mov byte [esp + 0x1f], 1
call ebx
test eax, eax
jbe 0x40596a
push 0x3f
push ebp
call fcn.00414040
pop ecx
pop ecx
test eax, eax
je 0x40593b
mov byte [esp + 0x13], 0
jmp 0x40596a
cmp byte [esp + 0x14], 0
je 0x40596a
cmp dword [esp + 0x1c], esi
jge 0x40596a
push ebp
push edi
call fcn.00415ec0
pop ecx
pop ecx
test eax, eax
je 0x40596a
push ebp
push str.using_long_path__S
call fcn.0040ff78
push ebp
push edi
call fcn.00414580
add esp, 0x10
push ebp
call fcn.00414445
cmp byte [esp + 0x17], 0
pop ecx
je 0x4059ee
push dword [esp + 0x18]
call fcn.00405303
pop ecx
jmp 0x405986
xor al, al
test al, al
je 0x4059ee
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
push dword [0x44a4e4]
push 0x434344
call edi
test eax, eax
jbe 0x4059ee
push dword [0x44a4e4]
call fcn.0041492b
pop ecx
mov ecx, esi
sub ecx, eax
push ecx
push dword [0x44a4e4]
call fcn.0041492b
pop ecx
mov ecx, dword [0x44a4e4]
lea eax, [ecx + eax*2]
push eax
push 0x434330
call edi
test eax, eax
jbe 0x4059ee
push 1
push 0
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
call fcn.00404fe8
mov eax, dword [0x442fa0]
xor ebx, ebx
mov edi, 0x434328
mov ebp, 0x43431c
cmp eax, ebx
je 0x405ae6
push dword [0x44a4e0]
push ebx
push ebx
push 0x23
push ebx
call eax
test eax, eax
jne 0x405ae6
push dword [0x44a4e0]
call fcn.00414100
pop ecx
test eax, eax
jbe 0x405ae6
mov eax, dword [0x442fa4]
cmp eax, ebx
je 0x405ae6
push dword [0x44a4e4]
push ebx
push ebx
push 0x23
push ebx
call eax
test eax, eax
jne 0x405ae6
push dword [0x44a4e4]
call fcn.0041492b
pop ecx
test eax, eax
jbe 0x405ae6
push 0x434310
push dword [0x44a4e0]
call fcn.00414590
push dword [0x44a4e0]
call fcn.00415f48
push edi
push dword [0x44a4e0]
call fcn.00414590
push 0x4342f8
push dword [0x44a4e4]
call fcn.00414e6c
push dword [0x44a4e4]
call fcn.00415fde
push ebp
push dword [0x44a4e4]
call fcn.00414e6c
push dword [esp + 0x3c]
inc ebx
push ebx
push ebx
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x38
test al, al
je 0x405ae6
push ebx
push ebx
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
mov ebx, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push esi
push dword [0x44a4e0]
call ebx
test eax, eax
jbe 0x405b5f
push edi
push dword [0x44a4e0]
call fcn.00414590
pop ecx
pop ecx
test eax, eax
je 0x405b5f
xor edi, edi
push edi
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405b61
push esi
push dword [0x44a4e4]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x405b61
push ebp
push dword [0x44a4e4]
call fcn.00414e6c
pop ecx
pop ecx
test eax, eax
je 0x405b61
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
jmp 0x405b61
xor edi, edi
push str.c:_temp
push dword [0x44a4e0]
call fcn.00414580
pop ecx
pop ecx
test eax, eax
je 0x405bba
push edi
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405bba
push 0x4342e0
push dword [0x44a4e4]
call fcn.00414e9a
pop ecx
pop ecx
test eax, eax
je 0x405bba
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
mov ebp, str.c:_tmp
push ebp
push dword [0x44a4e0]
call fcn.00414580
pop ecx
pop ecx
test eax, eax
je 0x405c14
push edi
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405c14
push 0x4342c8
push dword [0x44a4e4]
call fcn.00414e9a
pop ecx
pop ecx
test eax, eax
je 0x405c14
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
push esi
push dword [0x44a4e0]
call ebx
test eax, eax
jbe 0x405c5f
push edi
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405c5f
push esi
push dword [0x44a4e4]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x405c5f
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
push ebp
push dword [0x44a4e0]
call fcn.00414580
pop ecx
pop ecx
test eax, eax
je 0x405cb6
push edi
push edi
push 1
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405cb6
push 0x4342c8
push dword [0x44a4e4]
call fcn.00414e9a
pop ecx
pop ecx
test eax, eax
je 0x405cb6
push edi
push 1
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
push dword [0x44a4e0]
mov byte [0x44a4da], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x405d11
push dword [esp + 0x14]
push edi
push 1
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405d11
push dword [0x44a4e4]
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jbe 0x405d11
push edi
push 1
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push esi
push dword [0x44a4e0]
push str.USERPROFILE
call ebx
test eax, eax
jbe 0x405d9b
push str.AppDataLocalTemp
push dword [0x44a4e0]
call fcn.00414590
pop ecx
pop ecx
test eax, eax
je 0x405d9b
push dword [esp + 0x14]
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405d9b
push esi
push dword [0x44a4e4]
push 0x434398
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jbe 0x405d9b
push 0x434370
push dword [0x44a4e4]
call fcn.00414e6c
pop ecx
pop ecx
test eax, eax
je 0x405d9b
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
push esi
push dword [0x44a4e0]
push str.HOMEDRIVE
call ebx
test eax, eax
jbe 0x405e54
push dword [0x44a4e0]
call fcn.00414100
pop ecx
mov ecx, esi
sub ecx, eax
push ecx
push dword [0x44a4e0]
call fcn.00414100
add eax, dword [0x44a4e0]
pop ecx
push eax
push str.HOMEPATH
call ebx
test eax, eax
jbe 0x405e54
push dword [esp + 0x14]
push edi
push edi
push dword [0x44a4e0]
call fcn.00405467
add esp, 0x10
test al, al
je 0x405e54
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
push dword [0x44a4e4]
push 0x434344
call ebx
test eax, eax
jbe 0x405e54
push dword [0x44a4e4]
call fcn.0041492b
pop ecx
sub esi, eax
push esi
push dword [0x44a4e4]
call fcn.0041492b
pop ecx
mov ecx, dword [0x44a4e4]
lea eax, [ecx + eax*2]
push eax
push 0x434330
call ebx
test eax, eax
jbe 0x405e54
push edi
push edi
push dword [0x44a4e4]
call fcn.00405542
add esp, 0xc
test al, al
jne 0x405e78
push dword [0x44a4e0]
call fcn.00416040
push dword [0x44a4e4]
mov dword [0x44a4e0], edi
call fcn.00416040
pop ecx
pop ecx
mov dword [0x44a4e4], edi
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x10
ret