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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4114b5
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x417040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x4c], edx
push 0
push 0x80
push 4
push 0
push 0
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x5c], edi
cmp edi, 0xffffffff
je 0x40acf6
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
je 0x40aced
push esi
call fcn.0041008d
add esp, 4
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x48]
push 0
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40ace2
push dword [ebp - 0x48]
xorps xmm0, xmm0
mov dword [ebp - 0x34], 0
push dword [ebp - 0x58]
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x30], 0
movups xmmword [ebp - 0x44], xmm0
call fcn.0040e720
push 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x44]
cmp dword [ebp - 0x30], 0xf
push 0
push dword [ebp - 0x34]
cmova eax, dword [ebp - 0x44]
push eax
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x54], eax
xorps xmm0, xmm0
xor eax, eax
mov dword [ebp - 0x1c], 0
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
push 0x65
push dword [ebp - 0x4c]
mov byte [ebp - 4], 1
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ecx, eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x60], ecx
test eax, eax
je 0x40ac37
mov esi, dword [ebp - 0x1c]
cmp eax, esi
ja 0x40ab83
cmp dword [ebp - 0x18], 7
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
cmova ecx, dword [ebp - 0x2c]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x40abe2
mov ecx, dword [ebp - 0x18]
mov edx, eax
mov eax, ecx
sub edx, esi
sub eax, esi
cmp edx, eax
ja 0x40abd0
lea eax, [edx + esi]
cmp ecx, 7
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
mov dword [ebp - 0x50], eax
lea eax, [eax + esi*2]
mov dword [ebp - 0x4c], eax
test edx, edx
je 0x40abc2
mov edi, dword [ebp - 0x4c]
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x50]
lea eax, [esi + edx]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x40abe2
push ecx
push edx
mov byte [ebp - 0x50], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x50]
push edx
call fcn.0040e880
cmp dword [ebp - 0x18], 7
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x44]
cmova ecx, dword [ebp - 0x2c]
cmp dword [ebp - 0x30], 0xf
push edx
cmova eax, dword [ebp - 0x44]
push ecx
push dword [ebp - 0x34]
push eax
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40ac29
cmp dword [ebp - 0x18], 7
lea eax, [ebp - 0x2c]
cmova eax, dword [ebp - 0x2c]
push eax
push dword [ebp - 0x60]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x40ac62
push 0x10
push str.Error
push str.Error_reading_characters_in_file._Maybe_there_is_an_invalid_character_
jmp 0x40ac5a
cmp dword [ebp - 0x30], 0xf
lea eax, [ebp - 0x44]
cmova eax, dword [ebp - 0x44]
push eax
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
test eax, eax
jne 0x40ac62
push 0x10
push str.Error
push str.Error_displaying_text_as_ANSI.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x18]
cmp ecx, 7
jbe 0x40ac98
mov edx, dword [ebp - 0x2c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40ac8e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40acd2
push ecx
push edx
call fcn.0041007f
add esp, 8
mov ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ecx, 0xf
jbe 0x40ace2
mov edx, dword [ebp - 0x44]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40acd8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40acd8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041007f
add esp, 8
push dword [ebp - 0x58]
call fcn.0041004a
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40ad0a
push 0x30
push str.Warning:_Nothing_Selected
push str.No_File_Selected.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041003c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret