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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
xor esi, esi
push 3
pop edi
mov dword [ebp + 0x14], ebx
and dword [ebp + 0x14], 1
push esi
pop eax
sete al
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov ecx, edi
mov dword [ebp - 8], 1
lea eax, [eax + eax + 2]
mov dword [ebp - 0x10], eax
mov eax, dword [0x1034fb4]
neg eax
sbb eax, eax
and eax, 0x2000000
test bl, 4
je 0x101dd4d
cmp dword [ebp + 0x20], esi
je 0x101dd6c
xor ecx, ecx
mov edx, dword [ebp + 0x1c]
cmp edx, esi
je 0x101dd56
mov dword [edx], esi
cmp dword [ebp + 0x14], esi
je 0x101dd5e
mov dword [ebp - 8], edi
cmp dword [ebp + 0xc], esi
je 0x101dd67
or dword [ebp - 8], 8
cmp dword [ebp + 8], esi
jne 0x101dd79
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x101df06
push esi
push eax
push edi
push esi
mov eax, ebx
or eax, 0xfffffffe
push ecx
shl eax, 0x1e
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
je 0x101def2
lea ecx, [ebp - 0x18]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x101def2
cmp dword [ebp - 0x14], esi
je 0x101ddc4
push 0x20010600
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x101def2
mov edi, dword [ebp + 0x10]
cmp edi, esi
jbe 0x101ddd0
cmp edi, dword [ebp - 0x18]
jb 0x101ddb4
test bl, 2
je 0x101de4b
cmp edi, dword [ebp - 0x18]
jae 0x101dddd
mov edi, dword [ebp - 0x18]
push esi
push dword [ebp + 0xc]
push edi
push esi
push 4
push 0xffffffffffffffff
call fcn.0101db0a
mov ebx, eax
cmp ebx, esi
je 0x101def2
cmp ebx, 0xffffffff
je 0x101dee2
push edi
push esi
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x101dee2
push esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x18]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101ded7
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jne 0x101ded7
cmp dword [ebp + 0x18], esi
jne 0x101de91
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, esi
jmp 0x101de91
xor eax, eax
cmp dword [ebp + 0x14], esi
push esi
push dword [ebp + 0xc]
setne al
push edi
push esi
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
call fcn.0101db0a
mov ebx, eax
cmp ebx, esi
je 0x101def2
cmp ebx, 0xffffffff
je 0x101dee2
cmp dword [ebp + 0x18], esi
je 0x101de8e
push edi
push esi
push esi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 4], eax
cmp eax, esi
je 0x101dee2
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0x1c]
cmp eax, esi
je 0x101dea1
cmp dword [ebp + 0xc], esi
je 0x101dea1
mov dword [eax], ebx
jmp 0x101deaa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov eax, dword [ebp + 0x20]
cmp eax, esi
je 0x101deb8
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
jmp 0x101dec1
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 8], esi
cmp dword [ebp + 0x18], esi
je 0x101df0f
push dword [ebp - 8]
push dword [ebp - 0x18]
push edi
call dword [ebp + 0x18]
cmp eax, esi
jne 0x101df08
cmp edi, esi
je 0x101dee2
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp ebx, esi
je 0x101def2
cmp ebx, 0xffffffff
je 0x101def2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], esi
je 0x101df06
cmp dword [ebp + 8], 0xffffffff
je 0x101df06
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x1c
or eax, 0xffffffff
jmp 0x101df08