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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x18], 1
mov esi, ecx
mov dword [ebp - 0x1c], 0
mov ecx, 3
mov dword [ebp - 0x20], 0xc
mov eax, ebx
mov dword [ebp - 0xc], ecx
and eax, ecx
cmp eax, 2
ja 0x4195c8
test bl, 1
jne 0x404f4c
push edi
test eax, eax
jne 0x404b24
mov edi, 0x80000000
mov eax, ecx
mov dword [ebp - 0x10], edi
push 0
push 0x80
cmp ebx, 0x10a
je 0x407357
push eax
lea eax, [ebp - 0x20]
push eax
push ecx
push edi
push esi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x416123
push 8
push edi
call dword [sym.imp.msvcrt.dll__open_osfhandle]
add esp, 8
mov esi, eax
test bl, 8
jne 0x40738f
lea eax, [esi - 3]
xor edx, edx
mov ecx, esi
cmp eax, 0x5b
ja 0x4048c4
cmp esi, 0x1f
jg 0x4195b3
mov eax, 1
shl eax, cl
or dword [edx*4 + 0x42650c], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x404b18
mov edi, 0x40000000
push esi
mov dword [ebp - 0x10], edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x407942
mov ecx, 1
mov dword [ebp - 0xc], ecx
lea eax, [ecx + 1]
jmp 0x40485e
test bl, 8
je 0x40484b
jmp 0x4195c8
push 3
lea eax, [ebp - 0x20]
or edi, 0x80000000
push eax
push ecx
push edi
push esi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40488a
push 0
push 0x80
push 4
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
jmp 0x404878
mov ecx, esi
call fcn.004048d4
test eax, eax
jne 0x4048a1
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileSize]
test eax, eax
je 0x4048a1
xor eax, eax
mov dword [ebp - 8], 0xffffffff
push 2
mov word [ebp - 4], ax
lea eax, [ebp - 8]
push eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x41954a
push 0
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_ReadFile]
test eax, eax
je 0x41957d
cmp word [ebp - 4], 0x1a
jne 0x4048a1
jmp 0x419598
mov ecx, 3
lea eax, [ecx - 1]
jmp 0x40485e
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [0x4260a4], eax
cmp eax, 0x6e
je 0x41693b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
mov dword [0x4260a4], 2
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov dword [0x4260a4], eax
test eax, eax
je 0x4073d3
cmp esi, 0xffffffff
je 0x419571
push esi
call dword [sym.imp.msvcrt.dll__close]
add esp, 4
jmp 0x416137
push edi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x416137
push 2
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
jmp 0x4073ee
push 2
lea eax, [ebp - 8]
mov dword [ebp - 8], 0xffffffff
push eax
push 0xffffffffffffffff
push edi
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetFilePointer]
jmp 0x4048a1
lea edx, [esi - 0x20]
mov ecx, esi
shr edx, 5
inc edx
mov eax, edx
shl eax, 5
sub ecx, eax
jmp 0x4048b6
or eax, 0xffffffff
jmp 0x4048c7