Function at 0x409470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x568533
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
call fcn.00558d20
xor ebx, ebx
mov dword [ebp - 4], ebx
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
push 0x57e764
push eax
mov dword [ebp - 0x64], 0x77190912
mov dword [ebp - 0x68], vtable.CFileInputStream.0
call dword [sym.imp.MSVCR71.dll_fopen]
add esp, 8
cmp eax, ebx
mov dword [ebp - 0x60], eax
jne 0x4094e5
call dword [sym.imp.MSVCR71.dll___doserrno]
mov ecx, dword [eax]
lea eax, [ebp - 0xa8]
call fcn.00460c60
push 0x5a697c
push eax
call sub.MSVCR71.dll__CxxThrowException
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 1
call fcn.0046e970
test al, al
jne 0x409775
mov eax, dword [esi]
lea esi, [ebp - 0x40]
call fcn.00441a00
mov ecx, dword [ebp - 0x38]
mov esi, dword [sym.imp.MSVCR71.dll_ftell]
push ecx
call esi
mov edx, dword [ebp - 0x38]
push 2
push ebx
mov ebx, dword [sym.imp.MSVCR71.dll_fseek]
push edx
mov edi, eax
call ebx
mov eax, dword [ebp - 0x38]
push eax
call esi
mov ecx, dword [ebp - 0x38]
push 0
push edi
push ecx
mov esi, eax
call ebx
inc esi
push esi
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 0x24
mov edi, eax
lea edx, [esi - 1]
push edx
push edi
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 3
call fcn.00441a70
lea ebx, [esi + edi - 1]
mov dword [ebp - 0x14], ebx
lea esp, [esp]
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x409599
push eax
push 1
push 1
push ebx
call dword [sym.imp.MSVCR71.dll_fread]
add esp, 0x10
cmp eax, 1
je 0x409599
call dword [sym.imp.MSVCR71.dll___doserrno]
mov ecx, dword [eax]
lea eax, [ebp - 0xb0]
call fcn.00460c60
push 0x5a697c
push eax
call sub.MSVCR71.dll__CxxThrowException
inc ebx
mov ecx, ebx
sub ecx, edi
cmp ecx, esi
mov dword [ebp - 0x14], ebx
jne 0x409560
lea ebx, [esi + 0x400]
push ebx
push edi
call dword [sym.imp.MSVCR71.dll_realloc]
add esp, 8
test eax, eax
jne 0x4095e0
push edi
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
push 0x5a6944
lea edx, [ebp - 0x78]
push edx
mov dword [ebp - 0x78], vtable.CFormatException.0
mov dword [ebp - 0x74], 0x5247
call sub.MSVCR71.dll__CxxThrowException
mov edi, eax
add eax, esi
mov esi, ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], eax
mov ebx, eax
jmp 0x409560
mov eax, dword [ebp - 0x60]
cmp eax, ebx
mov dword [ebp - 0x68], vtable.CFileInputStream.0
je 0x409707
push eax
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
push ebx
push 0x5c5f34
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
push 0x5c5f50
push ebx
push eax
mov ecx, 0x68cc90
call sub.MFC71.DLL_CWinApp::OpenDocumentFile
push eax
call sub.MSVCR71.dll___RTDynamicCast
mov esi, eax
add esp, 0x14
cmp esi, ebx
mov dword [ebp - 0x1c], esi
jne 0x4097ac
mov edx, dword [ebp + 8]
mov dword [edx + 4], 0xf
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x5c], vtable.CNeroCoverEditorFile.0
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x58], ebx
mov byte [ebp - 4], 8
mov edx, dword [0x68c9b4]
mov edi, dword [edx + 4]
lea eax, [ebp - 0x5c]
push eax
lea esi, [ebp - 0x68]
call fcn.00460260
jmp 0x4096ef
call fcn.0040bdb0
mov dword [ebp - 0x28], eax
mov byte [eax + 0x15], 1
mov eax, dword [ebp - 0x28]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [eax], eax
mov eax, dword [ebp - 0x28]
mov dword [eax + 8], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], 0xa
mov eax, dword [esi + 0xb0]
mov ecx, dword [eax]
cmp ecx, eax
mov dword [ebp - 0x14], ecx
je 0x409937
mov ebx, dword [sym.imp.MSVCR71.dll__mbspbrk]
jmp 0x4097f1
mov ecx, dword [ebp - 0x14]
mov edi, dword [ecx + 8]
mov eax, dword [edi + 0x94]
mov esi, dword [eax]
add edi, 0x8c
cmp esi, eax
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x18], esi
je 0x40991f
jmp 0x409815
mov esi, dword [ebp - 0x18]
mov eax, dword [esi + 8]
push 0
push 0x5c6188
push 0x5c61a4
push 0
push eax
call sub.MSVCR71.dll___RTDynamicCast
add esp, 0x14
test eax, eax
je 0x40990e
mov ecx, dword [eax + 4]
mov edx, dword [ecx + 0x10]
push 0
push 0x5c613c
push 0x5c61c0
lea ecx, [edx + eax + 4]
mov eax, dword [ecx]
push 0
push 0x5c613c
call dword [eax + 4]
push eax
call sub.MSVCR71.dll___RTDynamicCast
add esp, 0x14
add eax, 0x68
lea esi, [ebp - 0x20]
call fcn.0040c220
mov byte [ebp - 4], 0xb
mov edi, dword [ebp - 0x20]
push 0x57e88c
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
je 0x4098d1
mov ecx, esi
sub ecx, edi
push ecx
push edi
lea ecx, [ebp + 0x10]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_6]
mov byte [ebp - 4], 0xc
mov edx, dword [ebp + 0x10]
mov eax, dword [edx - 0xc]
test eax, eax
je 0x4098b0
lea ecx, [ebp + 0x10]
lea edi, [ebp - 0x2c]
call fcn.0040a810
mov byte [eax], 1
lea ecx, [ebp + 0x10]
lea edi, [esi + 1]
mov byte [ebp - 4], 0xb
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
push 0x57e88c
push edi
call ebx
mov esi, eax
add esp, 8
test esi, esi
jne 0x409885
cmp byte [edi], 0
je 0x4098fb
push edi
lea ecx, [ebp - 0x30]
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_8]
lea ecx, [ebp - 0x30]
lea edi, [ebp - 0x2c]
mov byte [ebp - 4], 0xd
call fcn.0040a810
lea ecx, [ebp - 0x30]
mov byte [eax], 1
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0xa
call dword [sym.imp.MFC71.DLL_ATL::CStringT::CStringT_1]
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp - 0x18]
mov esi, dword [esi]
cmp esi, dword [edi + 8]
mov dword [ebp - 0x18], esi
jne 0x409812
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ecx]
cmp ecx, dword [eax + 0xb0]
mov dword [ebp - 0x14], ecx
jne 0x4097ee
mov esi, eax
xor ebx, ebx
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x84]
call fcn.00558d20
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 0xe
mov eax, dword [eax]
push 0x57e888
push eax
call dword [sym.imp.MSVCR71.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [ebp + 0xc], esi
jne 0x409987
call dword [sym.imp.MSVCR71.dll___doserrno]
mov ecx, dword [eax]
lea eax, [ebp - 0x98]
call fcn.00460c60
push 0x5a697c
mov ecx, eax
push ecx
call sub.MSVCR71.dll__CxxThrowException
mov edx, dword [ebp - 0x28]
mov eax, dword [edx]
mov edi, dword [sym.imp.MSVCR71.dll_fprintf]
mov dword [ebp + 0x10], eax
cmp eax, dword [ebp - 0x28]
je 0x4099ed
mov eax, dword [eax + 0xc]
push eax
push str._s_r_n
push esi
call edi
add esp, 0xc
test eax, eax
jge 0x4099db
call dword [sym.imp.MSVCR71.dll___doserrno]
mov ecx, dword [eax]
lea eax, [ebp - 0xa0]
call fcn.00460c60
push 0x5a697c
push eax
call sub.MSVCR71.dll__CxxThrowException
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], 0x10
mov eax, 0x4099e8
ret
lea edx, [ebp + 0x10]
call fcn.0040b760
mov eax, dword [ebp + 0x10]
jmp 0x409995
cmp esi, ebx
je 0x4099fb
push esi
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx]
push ecx
push eax
lea edx, [ebp + 8]
push edx
lea esi, [ebp - 0x2c]
call fcn.0040b420
mov eax, dword [ebp - 0x28]
push eax
call sub.MFC71.DLL_operator_delete_1
mov ecx, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc