Function at 0x40bf80
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x414ef2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
push esi
push edi
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push str.Entering_CheckTag...
call fcn.00413dc4
call fcn.0040c2c0
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0xa8]
add esp, 4
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x20]
push str.z:hps.dat
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xc]
stosb byte es:[edi], al
call fcn.00413dc4
mov dword [esp + 0x130], 0
call fcn.0040c6b0
test al, al
jne 0x40c0b9
mov esi, dword [sym.imp.MSVCRT.dll_getenv]
push str.IBMShare
call esi
add esp, 4
test eax, eax
jne 0x40c055
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push 0x41f214
call fcn.00413dc4
call fcn.0040c2c0
add esp, 4
lea ecx, [esp + 8]
mov dword [esp + 0x130], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov al, 1
mov ecx, dword [esp + 0x128]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x12c
ret
push str.IBMShare
call esi
add esp, 4
lea ecx, [esp + 0x18]
push eax
call sub.MFC42u.DLL_CString::CString_3
lea eax, [esp + 0x18]
push str.hps.dat
lea ecx, [esp + 0x20]
push eax
push ecx
mov byte [esp + 0x13c], 1
call sub.MFC42u.DLL_operator_1
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x134], 2
call fcn.00413dfa
lea ecx, [esp + 0x1c]
mov byte [esp + 0x130], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x130], 0
call sub.MFC42u.DLL_CString::CString
push ecx
lea eax, [esp + 0xc]
mov edx, esp
mov dword [esp + 0x18], esp
push eax
push str.tag_file_location_
push edx
call sub.MFC42u.DLL_operator_2
call fcn.0040c2c0
mov ecx, dword [esp + 0xc]
push 0x41f210
push ecx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x40c112
push ecx
lea eax, [esp + 0xc]
mov edx, esp
mov dword [esp + 0x18], esp
push eax
push str.couldnt_open
push edx
call sub.MFC42u.DLL_operator_2
call fcn.0040c2c0
add esp, 4
jmp 0x40c293
mov ecx, 0x20
xor eax, eax
mov edi, 0x4207d0
push esi
rep stosd dword es:[edi], eax
push 0x80
push 1
push 0x4207d0
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, 0x20
mov esi, 0x4207d0
lea edi, [esp + 0xb8]
push 0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0xbc]
push ecx
call fcn.0040ad10
mov ecx, 8
mov esi, eax
lea edi, [esp + 0x3c]
add esp, 0x1c
rep movsd dword es:[edi], dword [esi]
call sub.MFC42u.DLL_AfxGetEmptyString
mov edx, dword [eax]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edx
call fcn.00413e78
mov byte [esp + 0x130], 3
call sub.MFC42u.DLL_AfxGetEmptyString
mov ecx, dword [eax]
mov edi, dword [esp + 0x138]
mov dword [esp + 0xc], ecx
push edi
lea ecx, [esp + 0x10]
call fcn.00413e78
lea edx, [esp + 0x10]
push str._
lea eax, [esp + 0x20]
push edx
push eax
mov byte [esp + 0x13c], 4
call sub.MFC42u.DLL_operator_1
push ecx
lea edx, [esp + 0x10]
mov ecx, esp
mov dword [esp + 0x18], esp
push edx
push eax
push ecx
mov byte [esp + 0x140], 5
call sub.MFC42u.DLL_operator_3
call fcn.0040c2c0
add esp, 4
lea ecx, [esp + 0x1c]
mov byte [esp + 0x130], 4
call sub.MFC42u.DLL_CString::CString
mov ecx, 8
lea esi, [esp + 0x20]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
jne 0x40c271
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push str.CheckTag_match
call fcn.00413dc4
call fcn.0040c2c0
add esp, 4
lea ecx, [esp + 0xc]
mov byte [esp + 0x130], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x130], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x130], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov al, 1
mov ecx, dword [esp + 0x128]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0x12c
ret
lea ecx, [esp + 0xc]
mov byte [esp + 0x130], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x130], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 8]
mov dword [esp + 0x130], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x128]
pop edi
xor al, al
mov dword fs:[0], ecx
pop esi
add esp, 0x12c
ret