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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [ebp + 0x14]
push ebx
push esi
push edi
xor esi, esi
push 3
pop ebx
and ecx, 1
push esi
pop eax
sete al
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], esi
mov edi, ebx
mov dword [ebp - 8], 1
lea eax, [eax + eax + 2]
mov dword [ebp - 0x10], eax
mov eax, dword [0x1042400]
neg eax
sbb eax, eax
and eax, 0x2000000
test byte [ebp + 0x14], 4
je 0x1023598
cmp dword [ebp + 0x20], esi
je 0x10235b6
xor edi, edi
mov edx, dword [ebp + 0x1c]
cmp edx, esi
je 0x10235a1
mov dword [edx], esi
cmp ecx, esi
je 0x10235a8
mov dword [ebp - 8], ebx
cmp dword [ebp + 0xc], esi
je 0x10235b1
or dword [ebp - 8], 8
cmp dword [ebp + 8], esi
jne 0x10235c3
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1023742
push esi
push eax
push ebx
push esi
push edi
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [ebp + 8], ebx
je 0x102372e
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x102372e
cmp dword [ebp - 0x14], esi
je 0x102360c
push 0x20010600
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x102372e
mov edi, dword [ebp + 0x10]
cmp edi, esi
jbe 0x1023618
cmp edi, dword [ebp - 0x18]
jb 0x10235fc
test byte [ebp + 0x14], 2
je 0x1023694
cmp edi, dword [ebp - 0x18]
jae 0x1023626
mov edi, dword [ebp - 0x18]
push esi
push dword [ebp + 0xc]
push edi
push esi
push 4
push 0xffffffffffffffff
call fcn.01023358
mov ebx, eax
cmp ebx, esi
je 0x102372e
cmp ebx, 0xffffffff
je 0x102371e
push edi
push esi
push esi
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, esi
je 0x102371e
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 0x1023713
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jne 0x1023713
cmp dword [ebp + 0x18], esi
jne 0x10236cd
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, esi
jmp 0x10236cd
push esi
push dword [ebp + 0xc]
push edi
push esi
push 4
push ebx
call fcn.01023358
mov ebx, eax
cmp ebx, esi
je 0x102372e
cmp ebx, 0xffffffff
je 0x102371e
cmp dword [ebp + 0x18], esi
je 0x10236ca
push edi
push esi
push esi
push dword [ebp - 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, esi
mov dword [ebp - 4], eax
je 0x102371e
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0x1c]
cmp eax, esi
je 0x10236dd
cmp dword [ebp + 0xc], esi
je 0x10236dd
mov dword [eax], ebx
jmp 0x10236e6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov eax, dword [ebp + 0x20]
cmp eax, esi
je 0x10236f4
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
jmp 0x10236fd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x18], esi
mov dword [ebp + 8], esi
je 0x102374b
push dword [ebp - 8]
push dword [ebp - 0x18]
push edi
call dword [ebp + 0x18]
cmp eax, esi
jne 0x1023744
cmp edi, esi
je 0x102371e
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp ebx, esi
je 0x102372e
cmp ebx, 0xffffffff
je 0x102372e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], esi
je 0x1023742
cmp dword [ebp + 8], 0xffffffff
je 0x1023742
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 0x1023744