Function at 0x401740
Capabilities:
Query environment variable
Resolve function by parsing pe exports
Set file attributes

Disassembly:
sub esp, 0x64
lea ecx, [esp + 8]
push ebx
push ebp
push esi
push edi
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esp + 0x3c]
call fcn.0040c916
lea ecx, [esp + 0x28]
call fcn.0040c9e8
push str.SystemDrive
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
lea ecx, [esp + 0x1c]
push eax
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x4017b9
push 0x411204
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::operator
jmp 0x4017c7
push 0x411200
lea ecx, [esp + 0x20]
call fcn.0040c9dc
lea ecx, [esp + 0x10]
push 0x4111e0
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 8
lea ecx, [esp + 0x10]
push 1
push 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
lea ecx, [esp + 0x3c]
mov esi, 1
push 0xffffffffffffffff
push 0
call sub.MFC42.DLL_CStringArray::SetSize
lea edx, [esp + 0x1c]
push str.Autoexec.bat
lea eax, [esp + 0x28]
push edx
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x14]
push 0
push 0x4000
push ecx
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x40185d
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edx
push 0x4111b8
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x401b83
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x401901
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.0040c9c4
call fcn.00402ee0
add esp, 4
test eax, eax
jne 0x4018d8
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x18]
push 0x411190
push edx
xor esi, esi
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x10]
push 4
push esi
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
mov eax, dword [0x41103c]
add esp, 8
test eax, eax
jne 0x4018eb
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x18]
push eax
push ecx
jmp 0x4018e2
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
jne 0x401873
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Close
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ebp, dword [esp + 0x78]
test esi, esi
jne 0x4019f8
test ebp, ebp
je 0x4019f8
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x50]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x14]
and ecx, 0xfffffffc
push ecx
push edx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov eax, dword [esp + 0x14]
push 0
push 0x5002
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
je 0x401b69
mov eax, dword [esp + 0x44]
xor edi, edi
test eax, eax
jle 0x4019ad
lea eax, [esp + 0x78]
push edi
push eax
lea ecx, [esp + 0x44]
call fcn.00401d00
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x78]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::WriteString
mov eax, dword [esp + 0x44]
inc edi
cmp edi, eax
jl 0x401974
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Flush
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Close
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x14]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push 0x41117c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x10]
push 3
push 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
xor eax, eax
push 0xffffffffffffffff
test esi, esi
sete al
push 0
lea ecx, [esp + 0x44]
mov dword [esp + 0x2c], eax
call sub.MFC42.DLL_CStringArray::SetSize
lea ecx, [esp + 0x1c]
push str.Config.sys
lea edx, [esp + 0x7c]
push ecx
push edx
mov esi, 1
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x78]
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x14]
push 0
push 0x4000
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x401a71
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push 0x4111b8
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x401b83
lea eax, [esp + 0x18]
lea ecx, [esp + 0x28]
push eax
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
je 0x401b10
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x7c], esp
push edx
call fcn.0040c9c4
call fcn.00402ee0
add esp, 4
test eax, eax
jne 0x401ae7
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x18]
push 0x411190
push edx
xor esi, esi
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x10]
push 4
push esi
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
test ebp, ebp
jne 0x401afa
mov ecx, dword [esp + 0x44]
lea eax, [esp + 0x18]
push eax
push ecx
jmp 0x401af1
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CStringArray::SetAtGrow_1
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::ReadString
test eax, eax
jne 0x401a87
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Close
test esi, esi
jne 0x401c70
test ebp, ebp
je 0x401c70
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x50]
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x14]
and ecx, 0xfffffffc
push ecx
push edx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov eax, dword [esp + 0x14]
push esi
push 0x5002
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CStdioFile::Open
test eax, eax
jne 0x401be2
call edi
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x18]
push 0x411154
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x10
push 5
push 0
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x3c]
call fcn.0040c91c
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov eax, dword [esp + 0x44]
xor edi, edi
test eax, eax
jle 0x401c25
lea eax, [esp + 0x78]
push edi
push eax
lea ecx, [esp + 0x44]
call fcn.00401d00
push eax
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0x78]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CStdioFile::WriteString
mov eax, dword [esp + 0x44]
inc edi
cmp edi, eax
jl 0x401bec
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Flush
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::Close
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x14]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
push 0x41117c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [esp + 0x10]
push 3
push 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
mov ecx, dword [esp + 0x24]
xor eax, eax
test esi, esi
sete al
or eax, ecx
jne 0x401c8b
lea ecx, [esp + 0x10]
push 0x411130
push ecx
jmp 0x401c95
lea edx, [esp + 0x10]
push 0x411118
push edx
call sub.MFC42.DLL_CString::Format
add esp, 8
lea ecx, [esp + 0x10]
push 1
push 0
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00401240
add esp, 8
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0x3c]
call fcn.0040c91c
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret