Function at 0x401749
Capabilities:
Access peb ldr_data
Get common file path
Query environment variable

Disassembly:
jmp 0x403660
push 0xffffffffffffffff
push 0x46fef8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push esi
mov esi, ecx
push edi
push 0x480d40
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_3
mov eax, dword [esp + 0xc]
push 0
push 2
push eax
mov dword [esp + 0x30], 0
call fcn.004012bc
add esp, 0xc
lea ecx, [esp + 8]
push 0x486f38
call sub.MFC42u.DLL_CString::CString_3
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 1
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push 0x480d18
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x104
jbe 0x40370e
call edi
push eax
lea ecx, [esp + 0x10]
push 0x480cb8
push ecx
call sub.MFC42u.DLL_CString::Format
mov edx, dword [esp + 0x18]
push 0
push 1
push edx
call fcn.004012bc
add esp, 0x18
lea ecx, [esp + 8]
call sub.MFC42u.DLL_CString::Empty
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push 0x4809cc
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::TrimRight_2
lea eax, [esp + 0x10]
push 0x480c98
lea ecx, [esp + 0x1c]
push eax
push ecx
call sub.MFC42u.DLL_CTime::GetTickCount
mov ecx, eax
call sub.MFC42u.DLL_CTime::Format
lea edx, [esp + 8]
mov ecx, esi
push edx
mov byte [esp + 0x28], 2
call sub.MFC42u.DLL_CString::operator_1
mov eax, dword [esp + 8]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x403772
mov ecx, dword [esp + 0x10]
push ecx
push eax
push 0x480c6c
push esi
call sub.MFC42u.DLL_CString::Format
add esp, 0x10
mov edx, dword [esi]
lea eax, [esp + 0xc]
push edx
push 0x480c24
push eax
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x18]
push 0
push 2
push ecx
call fcn.004012bc
mov eax, dword [esi]
push eax
call fcn.0040174e
add esp, 0x1c
test eax, eax
jne 0x40388a
call edi
push eax
lea edx, [esp + 0x10]
push 0x480bc8
push edx
call sub.MFC42u.DLL_CString::Format
mov eax, dword [esp + 0x18]
push 0
push 1
push eax
call fcn.004012bc
add esp, 0x18
lea ecx, [esp + 8]
push 0x486f38
call sub.MFC42u.DLL_CString::operator
push 0x104
push 0x104
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push 0x4809cc
lea ecx, [esp + 0xc]
call sub.MFC42u.DLL_CString::TrimRight_2
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 8]
push ecx
push edx
push 0x480b90
push esi
call sub.MFC42u.DLL_CString::Format
mov eax, dword [esi]
add esp, 0x10
lea ecx, [esp + 0xc]
push eax
push 0x480c24
push ecx
call sub.MFC42u.DLL_CString::Format
mov edx, dword [esp + 0x18]
push 0
push 2
push edx
call fcn.004012bc
mov esi, dword [esi]
push esi
call fcn.0040174e
add esp, 0x1c
test eax, eax
jne 0x40388a
call edi
push eax
lea eax, [esp + 0x10]
push 0x480bc8
push eax
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x18]
push 0
push 1
push ecx
call fcn.004012bc
add esp, 0x18
lea edx, [esp + 0x14]
mov dword [esp + 0x14], 0
push 0x478f10
push edx
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 8]
mov byte [esp + 0x24], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x20
ret