Function at 0x40d4e0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d4f9
mov eax, dword fs:[0]
push eax
sub esp, 0x320
mov eax, dword [0x551aa8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
mov dword [ebp - 4], ebx
mov dword [ebp - 0x31c], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d571
lea eax, [ebp - 0x328]
push eax
push esi
mov dword [ebp - 0x328], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea edi, [eax + 1]
cmp edi, 5
jae 0x40d582
push ebx
push ebx
push str.Error_the_old_version.cfg.
call dword [sym.imp.mfc100u.dll_AfxMessageBox]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
or eax, 0xffffffff
jmp 0x40d732
lea eax, [edi + 1]
push eax
call dword [sym.imp.mfc100u.dll_new__]
add esp, 4
mov dword [ebp - 0x324], eax
cmp eax, ebx
je 0x40d571
lea ecx, [edi + 1]
push ecx
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
push ebx
lea ecx, [ebp - 0x32c]
push ecx
push edi
mov edi, dword [ebp - 0x324]
push edi
push esi
mov dword [ebp - 0x32c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xff
lea edx, [ebp - 0x10f]
push ebx
push edx
mov byte [ebp - 0x110], bl
call sub.MSVCR100.dll_memset
push 0xff
lea eax, [ebp - 0x313]
push ebx
push eax
mov byte [ebp - 0x314], bl
call sub.MSVCR100.dll_memset
mov cx, word [0x543fc0]
mov dl, byte [0x543fc2]
lea eax, [ebp - 0x320]
mov word [ebp - 0x318], cx
push eax
lea ecx, [ebp - 0x318]
push ecx
push edi
mov dword [ebp - 0x320], ebx
mov byte [ebp - 0x316], dl
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0x24
cmp eax, ebx
je 0x40d719
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, dword [sym.imp.MSVCR100.dll__stricmp]
jmp 0x40d650
push 0x100
lea edx, [ebp - 0x314]
push edx
push 0x100
lea ecx, [ebp - 0x110]
push ecx
push str._s__s
push eax
call dword [sym.imp.MSVCR100.dll_sscanf_s]
add esp, 0x18
test eax, eax
je 0x40d6f3
lea edx, [ebp - 0x110]
push 0x100
push edx
call dword [sym.imp.MSVCR100.dll__strlwr_s]
push 0x103
lea eax, [ebp - 0x213]
push ebx
push eax
mov byte [ebp - 0x214], bl
call sub.MSVCR100.dll_memset
add esp, 0x14
push ebx
push ebx
push 0x104
lea ecx, [ebp - 0x214]
push ecx
push 0xffffffffffffffff
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer_1]
push eax
push ebx
push ebx
call esi
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x110]
push eax
call edi
add esp, 8
test eax, eax
jne 0x40d6f3
lea ecx, [ebp - 0x314]
push ecx
call dword [sym.imp.MSVCR100.dll_atol]
add esp, 4
mov dword [ebp - 0x31c], eax
lea edx, [ebp - 0x320]
push edx
lea eax, [ebp - 0x318]
push eax
push ebx
call dword [sym.imp.MSVCR100.dll_strtok_s]
add esp, 0xc
cmp eax, ebx
jne 0x40d650
mov edi, dword [ebp - 0x324]
push edi
call dword [sym.imp.mfc100u.dll_delete__]
add esp, 4
lea ecx, [ebp + 8]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov eax, dword [ebp - 0x31c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050bf32
mov esp, ebp
pop ebp
ret 4