Function at 0x405870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47dcfc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x908
mov eax, dword [0x4ac3b8]
push ebx
mov dword [esp + 0x904], eax
push esi
push edi
xor eax, eax
mov word [esp + 0x40], 0
mov ecx, 0xff
lea edi, [esp + 0x42]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x24]
push eax
call fcn.00405620
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x48]
push str._sdataSpread.dat
push edx
call dword [sym.imp.MSVCR71.dll_swprintf]
add esp, 0x10
lea ecx, [esp + 0x24]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea eax, [esp + 0x40]
push 0x488918
push eax
mov dword [esp + 0x30], 0x4c8
call dword [sym.imp.MSVCR71.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
mov dword [esp + 0x34], ebx
je 0x405c3d
call fcn.0046ffa0
push 0x10
mov dword [esp + 0x20], eax
mov edx, dword [eax]
push str.9A7FCFFD_86CE_4293_869B_61ED963C57EC
mov ecx, eax
call dword [edx]
mov edi, dword [sym.imp.MSVCR71.dll_fseek]
push 2
push 0
push ebx
call edi
push ebx
call dword [sym.imp.MSVCR71.dll_ftell]
push 0
push 0
push ebx
mov esi, eax
call edi
add esp, 0x1c
push 0x488000
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_7]
xor eax, eax
mov byte [esp + 0x440], 0
mov ecx, 0x131
lea edi, [esp + 0x441]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
push 1
stosb byte es:[edi], al
lea eax, [esp + 0x448]
push esi
push eax
mov dword [esp + 0x92c], 0
call dword [sym.imp.MSVCR71.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x405c1f
push 0x4c8
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_CRecordset::GetBoundParamIndex]
mov edx, eax
xor eax, eax
mov edi, edx
mov ecx, 0x132
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
lea edi, [esp + 0x28]
push edi
push edx
push esi
lea edx, [esp + 0x44c]
push edx
push 1
call dword [eax + 8]
test eax, eax
je 0x405c1f
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_CDC::ReleaseAttribDC]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_4]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_4]
lea ecx, [esp + 0x20]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::CStringT_4]
push 0
mov ebx, 3
push 0x488914
lea ecx, [esp + 0x18]
mov byte [esp + 0x924], bl
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Find]
mov esi, eax
xor edi, edi
cmp esi, 0xffffffff
je 0x405bbf
test edi, edi
jne 0x405a78
push esi
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CToolBar::Layout]
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x920], 4
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::operator_3]
lea ecx, [esp + 0x24]
mov byte [esp + 0x91c], bl
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::operator_class_ATL::CSimpleStringT_]
push eax
call dword [sym.imp.MSVCR71.dll__wtoi64]
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], edx
jmp 0x405b8f
cmp edi, 1
jne 0x405acc
push esi
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CToolBar::Layout]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x920], 5
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::operator_3]
lea ecx, [esp + 0x30]
mov byte [esp + 0x91c], bl
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::operator_class_ATL::CSimpleStringT_]
push eax
call dword [sym.imp.MSVCR71.dll__wtol]
mov edx, dword [ebp + 0xc]
mov byte [edx], al
jmp 0x405b91
cmp edi, 2
jne 0x405b09
push esi
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CToolBar::Layout]
mov ecx, dword [ebp + 0x10]
push eax
mov byte [esp + 0x920], 6
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::operator_3]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x91c], bl
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
jmp 0x405b94
cmp edi, ebx
jne 0x405b42
push esi
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CToolBar::Layout]
mov ecx, dword [ebp + 0x14]
push eax
mov byte [esp + 0x920], 7
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::operator_3]
lea ecx, [esp + 0x38]
mov byte [esp + 0x91c], bl
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
jmp 0x405b94
cmp edi, 4
jne 0x405b94
push esi
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CToolBar::Layout]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x920], 8
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::operator_3]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x91c], bl
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x20]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::operator_class_ATL::CSimpleStringT_]
push eax
call dword [sym.imp.MSVCR71.dll__wtol]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
add esp, 4
inc esi
push esi
push 0
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_CMDIFrameWnd::DelayUpdateFrameMenu]
push 0
push 0x488914
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CStringT::Find]
mov esi, eax
inc edi
cmp esi, 0xffffffff
jne 0x405a24
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::operator_class_ATL::CSimpleStringT_]
push eax
call dword [sym.imp.MSVCR71.dll__wtoi64]
mov ecx, dword [ebp + 0x1c]
mov dword [ecx + 4], edx
lea edx, [esp + 0x20]
push edx
mov dword [ecx], eax
call fcn.0046f910
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 0xc
lea ecx, [esp + 0x20]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x14]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x18]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
mov eax, 1
jmp 0x405c3f
lea ecx, [esp + 0x1c]
push ecx
call fcn.0046f910
push ebx
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 8
lea ecx, [esp + 0x10]
call dword [sym.imp.MFC71U.DLL_ATL::CSimpleStringT::CSimpleStringT]
xor eax, eax
mov ecx, dword [esp + 0x914]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x90c]
call fcn.0045015b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret