Function at 0x405e00
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40938a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x270
push ebx
push esi
lea esi, [ecx + 0xc]
mov dword [esp + 0x10], ecx
push edi
mov ecx, esi
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
test eax, eax
je 0x405f62
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x170]
rep stosd dword es:[edi], eax
mov ecx, esi
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea eax, [esp + 0x174]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x40e25c
push 0x40e1ec
push ebx
push ecx
call sub.MSVCR71.dll___RTDynamicCast
add esp, 0x14
lea ecx, [esp + 0x18]
mov edi, eax
call sub.MFC71.DLL_CStdioFile::CStdioFile
lea ecx, [esp + 0xc]
mov dword [esp + 0x284], ebx
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_2]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_2]
push ebx
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x40]
mov byte [esp + 0x290], 2
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
call fcn.00405b40
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x174]
push eax
mov byte [esp + 0x28c], 3
call sub.MFC71.DLL_CFile::GetStatus
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xfffff000
push ebx
add esi, 0x5002
call dword [sym.imp.MSVCR71.dll__time64]
add esp, 4
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x34], edx
push esi
lea edx, [esp + 0x178]
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x38], eax
call sub.MFC71.DLL_CStdioFile::Open
test eax, eax
jne 0x405f7b
lea ecx, [esp + 0x44]
mov dword [esp + 0x34], vtable.CFileException.0
call dword [0x40a118]
lea ecx, [esp + 0x10]
call dword [0x40a118]
lea ecx, [esp + 0xc]
call dword [0x40a118]
lea ecx, [esp + 0x18]
mov dword [esp + 0x284], 0xffffffff
call fcn.004083bc
xor eax, eax
mov ecx, dword [esp + 0x27c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x14]
cmp dword [eax + 8], 1
jne 0x405fbf
push 0x40b3f4
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x34]
call fcn.00404370
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x288], 4
call dword [0x40a13c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x284], 3
call dword [0x40a118]
jmp 0x405fce
push 0x40ac94
lea ecx, [esp + 0x10]
call dword [0x40a134]
lea edx, [esp + 0x10]
push edx
mov ecx, edi
call fcn.00405410
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
push 0x40b3f0
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_1]
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call fcn.00405360
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
push 0x40b3f0
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_1]
mov eax, dword [edi]
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call dword [eax]
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator]
push 0x40b3ec
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::operator_1]
mov eax, dword [esp + 0x18]
push 2
push ebx
push ebx
lea ecx, [esp + 0x24]
call dword [eax + 0x30]
lea ecx, [esp + 0xc]
call dword [sym.imp.MFC71.DLL_ATL::CSimpleStringT::operator_char_const_]
push eax
lea ecx, [esp + 0x1c]
call sub.MFC71.DLL_CStdioFile::WriteString
lea ecx, [esp + 0x18]
call sub.MFC71.DLL_CStdioFile::Close
lea ecx, [esp + 0x44]
mov dword [esp + 0x34], vtable.CFileException.0
call dword [0x40a118]
lea ecx, [esp + 0x10]
call dword [0x40a118]
lea ecx, [esp + 0xc]
call dword [0x40a118]
lea ecx, [esp + 0x18]
mov dword [esp + 0x284], 0xffffffff
call fcn.004083bc
mov ecx, dword [esp + 0x27c]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4