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

Disassembly:
mov eax, 0x40a778
call fcn.0040a620
sub esp, 0x470
mov eax, dword [0x40c324]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0x10], eax
je 0x40839d
cmp dword [ebp + 0x10], edi
je 0x40839d
cmp dword [ebp + 0x14], edi
je 0x40839d
cmp dword [ebp + 0x1c], edi
je 0x40839d
cmp dword [ebp + 0x20], edi
je 0x40839d
mov esi, dword [ebp + 8]
cmp dword [esi + 0x294], edi
je 0x40839d
push 0x4000
mov dword [ebp - 0x424], edi
mov dword [esi + 0x2a0], edi
call sub.MFC42u.dll_operatornew
cmp eax, edi
pop ecx
mov dword [ebp - 0x448], eax
je 0x40839d
push ebx
mov dword [ebp - 0x428], edi
jmp 0x407de7
mov esi, dword [ebp + 8]
cmp dword [esi + 0x2a0], edi
jne 0x408383
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x428]
lea eax, [eax + ecx*2]
cmp eax, edi
mov dword [ebp - 0x43c], eax
je 0x408383
cmp word [eax], di
je 0x408383
mov esi, dword [sym.imp.msvcrt.dll__snwprintf]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x420]
push 0x402eb0
push 0x103
push eax
mov dword [ebp - 0x440], edi
call esi
add esp, 0x14
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea eax, [ebp - 0x420]
push eax
mov word [ebp - 0x21a], di
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x430], eax
jne 0x407ea6
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x407e7b
call edi
jmp 0x407e87
call edi
and eax, 0xffff
or eax, 0x80070000
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 0x8004
mov ebx, 0x8001
push ebx
push dword [ebp + 0x18]
mov dword [ebp - 0x424], eax
call edi
jmp 0x407eb1
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, 0x8001
cmp dword [ebp - 0x424], 0
jl 0x408337
cmp dword [ebp - 0x430], 0xffffffff
je 0x408157
push 0x40265c
push dword [ebp + 0x10]
call dword [sym.imp.msvcrt.dll_wcscmp]
pop ecx
pop ecx
push dword [ebp - 0x43c]
test eax, eax
lea eax, [ebp - 0x218]
jne 0x407efd
push 0x402ea8
push 0x103
push eax
call esi
add esp, 0x10
jmp 0x407f10
push dword [ebp + 0x10]
push 0x402eb0
push 0x103
push eax
call esi
add esp, 0x14
push 8
pop ecx
lea edx, [ebp - 0x47c]
push edx
xor esi, esi
xor eax, eax
mov dword [ebp - 0x47c], esi
lea edi, [ebp - 0x474]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
lea edx, [ebp - 0x218]
push edx
push eax
mov word [ebp - 0x12], si
call dword [ecx + 0x30]
test eax, eax
jl 0x408078
lea ecx, [ebp - 0x42c]
call fcn.00409bc2
lea eax, [ebp - 0x42c]
push 0x8b
push eax
mov dword [ebp - 4], esi
call sub.MFC42u.dll_CString::Format
test byte [ebp - 0x47c], 1
pop ecx
pop ecx
je 0x407fd1
lea ecx, [ebp - 0x44c]
call fcn.00409bc2
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x44c]
push 0x82cc
push eax
mov byte [ebp - 4], 1
call sub.MFC42u.dll_CString::Format
add esp, 0xc
push esi
push dword [ebp - 0x42c]
push dword [ebp - 0x44c]
push dword [ebp + 0x18]
call dword [sym.imp.USER32.dll_MessageBoxW]
push dword [ebp - 0x43c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x44c]
jmp 0x408037
lea ecx, [ebp - 0x444]
call fcn.00409bc2
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x444]
push 0x82c9
push eax
mov byte [ebp - 4], 2
call sub.MFC42u.dll_CString::Format
add esp, 0xc
push 0x124
push dword [ebp - 0x42c]
push dword [ebp - 0x444]
push dword [ebp + 0x18]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
jne 0x40805a
push dword [ebp - 0x43c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
lea ecx, [ebp - 0x444]
mov dword [ebp - 0x428], eax
mov byte [ebp - 4], 0
call sub.MFC42u.dll_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x42c]
call sub.MFC42u.dll_CString::CString
jmp 0x408375
lea ecx, [ebp - 0x444]
mov byte [ebp - 4], 0
call sub.MFC42u.dll_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x42c]
call sub.MFC42u.dll_CString::CString
push esi
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x440], eax
mov eax, dword [esi + 0x294]
mov edx, dword [eax + 0xc]
push 4
pop ecx
push dword [ebp - 0x440]
add edx, ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 8], edx
mov ebx, dword [esi + 0x294]
call fcn.0040956f
mov ebx, dword [esi + 0x294]
lea eax, [ebp - 0x218]
push eax
call fcn.00409580
mov eax, dword [ebp + 0x1c]
mov esi, dword [esi + 0x294]
push 0xffffffffffffffff
push 8
call fcn.00409456
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x1c]
mov edi, dword [eax + 0x294]
or ebx, 0xffffffff
call fcn.00409487
test eax, eax
je 0x408142
cmp eax, 8
jne 0x408142
and dword [ebp - 0x434], 0
lea eax, [ebp - 0x434]
push eax
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x294]
call fcn.004095a5
mov eax, dword [ebp - 0x434]
test eax, eax
je 0x40814c
jle 0x408126
and eax, 0xffff
or eax, 0x80070000
push eax
push 0x8004
push 0x8001
push dword [ebp + 0x18]
mov dword [ebp - 0x424], eax
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x40814c
mov dword [ebp - 0x424], 0x80004005
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, 0x8001
cmp dword [ebp - 0x424], 0
jl 0x408337
lea eax, [ebp - 0x420]
push eax
push 0x8006
push ebx
push dword [ebp + 0x18]
call edi
lea eax, [ebp - 0x218]
push eax
push 0x8007
push ebx
push dword [ebp + 0x18]
call edi
push dword [ebp - 0x440]
push 0x8003
push ebx
push dword [ebp + 0x18]
call edi
xor esi, esi
mov dword [ebp - 0x434], esi
mov dword [ebp - 0x454], esi
push esi
lea eax, [ebp - 0x438]
push eax
push 0x4000
push dword [ebp - 0x448]
mov dword [ebp - 0x450], esi
push dword [ebp - 0x430]
mov dword [ebp - 0x438], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, esi
push 4
je 0x4082de
cmp dword [ebp - 0x438], esi
je 0x4082af
mov esi, dword [ebp + 0x1c]
mov eax, dword [esi]
push 0x4021f4
push 0xffffffffffffffff
push esi
call dword [eax + 0x20]
test eax, eax
mov dword [ebp - 0x424], eax
jl 0x408326
mov eax, dword [esi]
push 4
lea ecx, [ebp - 0x438]
push ecx
push 0xffffffffffffffff
push esi
call dword [eax + 0x20]
test eax, eax
mov dword [ebp - 0x424], eax
jl 0x408326
push dword [ebp - 0x438]
mov eax, dword [esi]
push dword [ebp - 0x448]
push 0xffffffffffffffff
push esi
call dword [eax + 0x20]
test eax, eax
mov dword [ebp - 0x424], eax
jl 0x408326
mov eax, dword [esi]
lea ecx, [ebp - 0x454]
push ecx
lea ecx, [ebp - 0x450]
push ecx
push 0xffffffffffffffff
push esi
mov dword [ebp - 0x454], 4
call dword [eax + 0x24]
test eax, eax
mov eax, dword [ebp - 0x450]
jl 0x408312
test eax, eax
jne 0x408314
mov eax, dword [ebp - 0x434]
add eax, dword [ebp - 0x438]
push eax
push 0
push 0x8002
push dword [ebp + 0x18]
mov dword [ebp - 0x434], eax
call edi
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a0], 0
jne 0x4082fb
xor esi, esi
jmp 0x4081a7
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax]
push 0x4021f0
push 0xffffffffffffffff
push eax
call dword [ecx + 0x20]
push dword [ebp - 0x440]
mov dword [ebp - 0x424], eax
push esi
push 0x8002
push dword [ebp + 0x18]
call edi
push esi
push 0x8005
jmp 0x408331
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax]
push 0x4021f8
push 0xffffffffffffffff
push eax
call dword [ecx + 0x20]
mov dword [ebp - 0x424], eax
push 0x80004005
jmp 0x40832c
mov eax, dword [esi]
push 4
push 0x4021f8
push 0xffffffffffffffff
push esi
call dword [eax + 0x20]
mov dword [ebp - 0x424], eax
jmp 0x408337
test eax, eax
jle 0x408320
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 0x424], eax
push dword [ebp - 0x424]
push 0x8004
push ebx
push dword [ebp + 0x18]
call edi
cmp dword [ebp - 0x430], 0xffffffff
je 0x40834c
push dword [ebp - 0x430]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2a0], 0
jne 0x408375
push dword [ebp - 0x43c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
mov ecx, dword [ebp - 0x428]
lea eax, [ecx + eax + 1]
mov dword [ebp - 0x428], eax
xor edi, edi
cmp dword [ebp - 0x424], edi
jge 0x407de4
push dword [ebp - 0x448]
call sub.MFC42u.dll_operatordelete
xor eax, eax
cmp dword [ebp - 0x424], edi
pop ecx
setge al
pop ebx
jmp 0x40839f
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
call fcn.0040a572
leave
ret 0x1c