Function at 0x41348e
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query environment variable
Set file attributes

Disassembly:
push 0x174
mov eax, 0x41a139
call fcn.004180c5
mov esi, dword [0x433dfc]
lea ecx, [ebp - 0x17c]
call fcn.00417496
and dword [ebp - 4], 0
lea ecx, [ebp - 0x12c]
call dword [0x424328]
lea eax, [esi + 0x18]
mov byte [ebp - 4], 1
mov dword [ebp - 0x144], eax
call fcn.004121c1
call dword [sym.imp.pcoshelper.dll_Ordinal_1043]
mov ebx, 0x104
test eax, eax
je 0x413585
push ebx
push ebx
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x413585
push 0xffffffffffffffff
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push ecx
lea eax, [ebp - 0x12c]
mov ecx, esp
mov dword [ebp - 0x138], esp
push eax
lea edi, [ebp - 0x17c]
call dword [0x42433c]
call fcn.0041327f
test al, al
jne 0x413585
push 8
call sub.mfc90u.dll_new
mov esi, eax
pop ecx
test esi, esi
je 0x41354f
mov ecx, esi
call dword [0x424328]
and dword [esi + 4], 0
jmp 0x413551
xor esi, esi
push dword [ebp - 0x12c]
mov dword [ebp - 0x140], esi
push str._sTemp
push esi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea eax, [ebp - 0x140]
push eax
mov eax, dword [ebp - 0x144]
mov dword [esi + 4], 1
call fcn.004163dd
push 0x1c
push ebx
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
call fcn.00413c2d
push 0xffffffffffffffff
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x13c]
call dword [0x42433c]
lea ecx, [ebp - 0x134]
call dword [0x424328]
push 3
push 0x5c
pop edi
push edi
lea ecx, [ebp - 0x13c]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find_1]
cmp eax, 0xffffffff
je 0x4139f1
mov ecx, dword [ebp - 0x13c]
mov ecx, dword [ecx - 0xc]
sub ecx, eax
push ecx
push eax
lea ecx, [ebp - 0x13c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Delete]
lea ecx, [ebp - 0x128]
call dword [sym.imp.pcoshelper.dll_Ordinal_60]
lea ecx, [ebp - 0x128]
call dword [sym.imp.pcoshelper.dll_Ordinal_708]
test al, al
jne 0x4137fc
mov esi, dword [sym.imp.pcoshelper.dll_Ordinal_1258]
call esi
cmp eax, 5
ja 0x4137fc
lea ecx, [ebp - 0x128]
call dword [sym.imp.pcoshelper.dll_Ordinal_709]
test al, al
jne 0x413651
call esi
cmp eax, 5
je 0x413651
push str._Unknown_path_
jmp 0x413801
lea eax, [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x134]
call dword [0x424334]
push edi
lea ecx, [ebp - 0x134]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::ReverseFind]
mov ecx, dword [ebp - 0x134]
mov ecx, dword [ecx - 0xc]
sub ecx, eax
push ecx
push eax
lea ecx, [ebp - 0x134]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Delete]
lea eax, [ebp - 0x134]
push eax
lea ecx, [ebp - 0x150]
call dword [0x42433c]
lea ecx, [ebp - 0x150]
mov byte [ebp - 4], 4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::MakeLower]
lea eax, [ebp - 0x138]
push eax
call fcn.00413e97
mov ebx, eax
lea eax, [ebp - 0x148]
push edi
push eax
lea esi, [ebp - 0x13c]
mov byte [ebp - 4], 5
call fcn.00403573
lea ecx, [ebp - 0x154]
push ebx
push ecx
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.0040a739
add esp, 0x10
mov ecx, eax
mov byte [ebp - 4], 7
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::MakeLower]
push eax
lea ecx, [ebp - 0x130]
call dword [0x42433c]
lea ecx, [ebp - 0x154]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x148]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x138]
mov byte [ebp - 4], 0xb
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor esi, esi
push esi
push dword [ebp - 0x130]
lea ecx, [ebp - 0x150]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find]
cmp eax, 0xffffffff
je 0x4137ab
mov eax, dword [ebp - 0x134]
mov eax, dword [eax - 0xc]
mov ecx, dword [ebp - 0x130]
sub eax, dword [ecx - 0xc]
lea ecx, [ebp - 0x134]
push eax
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Right]
push eax
lea ecx, [ebp - 0x134]
mov byte [ebp - 4], 0xc
call dword [0x424334]
lea ecx, [ebp - 0x140]
mov byte [ebp - 4], 0xb
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push esi
lea ecx, [ebp - 0x134]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetAt]
cmp ax, di
jne 0x4137ab
push 1
push esi
lea ecx, [ebp - 0x134]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Delete]
push str.Temp
lea ecx, [ebp - 0x140]
call dword [0x424498]
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x134]
push eax
mov byte [ebp - 4], 0xd
call dword [sym.imp.pcoshelper.dll_Ordinal_1048]
pop ecx
pop ecx
lea ecx, [ebp - 0x140]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x130]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x150]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x41380d
push str.AppDataLocalTemp
lea ecx, [ebp - 0x134]
call dword [0x424340]
lea ecx, [ebp - 0x14c]
call dword [0x424328]
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 0xe
call fcn.00417496
lea eax, [ebp - 0x168]
push eax
push ecx
mov byte [ebp - 4], 0xf
lea eax, [ebp - 0x13c]
mov ecx, esp
mov dword [ebp - 0x138], esp
push eax
call dword [0x42433c]
call fcn.00413c6d
lea eax, [ebp - 0x138]
push eax
call fcn.00413e97
mov byte [ebp - 4], 0x10
push dword [eax]
lea eax, [ebp - 0x14c]
push dword [ebp - 0x13c]
push 0x429700
push eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea ecx, [ebp - 0x138]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor ebx, ebx
cmp dword [ebp - 0x160], ebx
jle 0x4139cd
lea ecx, [ebp - 0x130]
call dword [0x424328]
mov byte [ebp - 4], 0x11
test ebx, ebx
jl 0x413a5d
cmp ebx, dword [ebp - 0x160]
jge 0x413a5d
push dword [ebp - 0x134]
mov eax, dword [ebp - 0x164]
lea eax, [eax + ebx*4]
push dword [eax]
lea eax, [ebp - 0x130]
push dword [ebp - 0x13c]
push str._s_s_s
push eax
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0x10
lea eax, [ebp - 0x130]
mov ecx, esp
mov dword [ebp - 0x138], esp
push eax
call dword [0x42433c]
call fcn.00413e67
cmp eax, 1
jne 0x4139b4
push ecx
lea eax, [ebp - 0x130]
mov ecx, esp
mov dword [ebp - 0x138], esp
push eax
lea edi, [ebp - 0x17c]
call dword [0x42433c]
call fcn.0041327f
test al, al
jne 0x4139b4
push 8
call sub.mfc90u.dll_new
mov esi, eax
pop ecx
test esi, esi
je 0x41394d
mov ecx, esi
call dword [0x424328]
and dword [esi + 4], 0
jmp 0x41394f
xor esi, esi
lea eax, [ebp - 0x130]
push eax
mov ecx, esi
mov dword [ebp - 0x138], esi
call dword [0x424334]
push 0
push dword [ebp - 0x14c]
lea ecx, [ebp - 0x130]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 4], eax
push dword [ebp - 0x130]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4139b4
push eax
push dword [ebp - 0x130]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x4139b4
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x144]
call fcn.004163dd
lea ecx, [ebp - 0x130]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
inc ebx
cmp ebx, dword [ebp - 0x160]
jl 0x413895
lea ecx, [ebp - 0x168]
mov byte [ebp - 4], 0xe
call sub.mfc90u.dll_CStringArray::CStringArray
lea ecx, [ebp - 0x14c]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov ebx, 0x104
push ebx
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x413ab4
push 0xffffffffffffffff
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push ecx
lea eax, [ebp - 0x12c]
mov ecx, esp
mov dword [ebp - 0x138], esp
push eax
lea edi, [ebp - 0x17c]
call dword [0x42433c]
call fcn.0041327f
test al, al
jne 0x413ab4
push 8
call sub.mfc90u.dll_new
mov esi, eax
pop ecx
test esi, esi
je 0x413a62
mov ecx, esi
call dword [0x424328]
and dword [esi + 4], 0
jmp 0x413a64
call fcn.004174a2
xor esi, esi
lea eax, [ebp - 0x12c]
push eax
mov ecx, esi
mov dword [ebp - 0x138], esi
call dword [0x424334]
mov dword [esi + 4], 1
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x413ab4
push eax
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x413ab4
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 0x144]
call fcn.004163dd
and dword [ebp - 0x130], 0
mov ebx, 0x400
cmp dword [ebp - 0x130], 0
mov esi, str._TEMP_
jne 0x413ad3
mov esi, str._TMP_
push ebx
push ebx
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x413bdb
push 0xffffffffffffffff
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push 0
push 0x3b
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Find_1]
test eax, eax
jle 0x413b48
push eax
lea eax, [ebp - 0x138]
push eax
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Left]
push eax
lea ecx, [ebp - 0x12c]
mov byte [ebp - 4], 0x12
call dword [0x424334]
lea ecx, [ebp - 0x138]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push ecx
lea eax, [ebp - 0x12c]
mov ecx, esp
mov dword [ebp - 0x148], esp
push eax
lea edi, [ebp - 0x17c]
call dword [0x42433c]
call fcn.0041327f
test al, al
jne 0x413bdb
push 8
call sub.mfc90u.dll_new
mov esi, eax
pop ecx
test esi, esi
je 0x413b89
mov ecx, esi
call dword [0x424328]
and dword [esi + 4], 0
jmp 0x413b8b
xor esi, esi
lea eax, [ebp - 0x12c]
push eax
mov ecx, esi
mov dword [ebp - 0x148], esi
call dword [0x424334]
mov dword [esi + 4], 1
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x413bdb
push eax
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x413bdb
lea eax, [ebp - 0x148]
push eax
mov eax, dword [ebp - 0x144]
call fcn.004163dd
inc dword [ebp - 0x130]
cmp dword [ebp - 0x130], 2
jl 0x413ac0
lea ecx, [ebp - 0x134]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x13c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp - 0x12c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x17c]
call sub.mfc90u.dll_CStringArray::CStringArray
mov eax, dword [ebp - 0x144]
call fcn.0041810f
ret