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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x10], ecx
mov edx, 3
mov dword [ebp - 0x1c], 1
mov esi, ebx
mov dword [ebp - 0xc], edx
and esi, edx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0xc
push edi
cmp esi, 2
ja 0x41014f
mov eax, ebx
and eax, 9
cmp al, 9
jne 0x41015b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 4
test esi, esi
jne 0x410273
mov esi, 0x80000000
mov eax, edx
push 0
push 0x80
cmp ebx, 0x10a
je 0x4101d6
push eax
lea eax, [ebp - 0x24]
push eax
push edx
push esi
push ecx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x42150c
push 8
push edi
call dword [sym.imp.msvcrt.dll__open_osfhandle]
add esp, 8
mov esi, eax
test bl, 8
jne 0x410205
lea eax, [esi - 3]
xor ecx, ecx
mov edx, esi
cmp eax, 0x5b
ja 0x4101cb
cmp esi, 0x1f
jg 0x421598
mov eax, dword [ecx*4 + 0x439824]
bts eax, edx
mov dword [ecx*4 + 0x439824], eax
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 3
lea eax, [ebp - 0x24]
push eax
push edx
mov eax, esi
or eax, 0x80000000
push eax
push ecx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4102a7
push 8
push edi
call dword [sym.imp.msvcrt.dll__open_osfhandle]
add esp, 8
mov esi, eax
mov ecx, esi
call fcn.0040cc8e
test eax, eax
jne 0x4101a5
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSize]
mov dword [ebp - 0x14], eax
or eax, dword [ebp - 0x10]
je 0x4101a5
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_1_0.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x42152f
push 0
lea eax, [ebp - 0x18]
push eax
push 1
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x421562
cmp word [ebp - 4], 0x1a
jne 0x4101a5
jmp 0x42157d
push 0x402504
push ecx
mov esi, 0x40000000
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x4102a0
mov edx, 1
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 0x10]
mov eax, 2
jmp 0x41016a
mov edx, 3
jmp 0x410293
push 0
push 0x80
push 4
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0xc]
push esi
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4101f7
jmp 0x42150c
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [0x439820], eax
cmp eax, 0x6e
jne 0x41014f
mov dword [0x439820], 2
jmp 0x41014f
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [0x439820], eax
test eax, eax
je 0x410248
cmp esi, 0xffffffff
je 0x421556
push esi
call dword [sym.imp.msvcrt.dll__close]
add esp, 4
jmp 0x41014f
push edi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
jmp 0x41014f
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_1_0.dll_SetFilePointer]
jmp 0x410263
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_1_0.dll_SetFilePointer]
jmp 0x4101a5
lea ecx, [esi - 0x20]
mov edx, esi
shr ecx, 5
inc ecx
mov eax, ecx
shl eax, 5
sub edx, eax
jmp 0x4101ba