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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
push edi
push 0x6a0
call fcn.01035a36
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jne 0x1019d28
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x1019e87
xor eax, eax
mov ecx, 0x1a8
mov edi, esi
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x1019de6
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
jne 0x1019dc0
cmp dword [ebp + 0x10], ebx
lea eax, reloc.msvcrt.dll___p__fmode
je 0x1019d86
push eax
mov eax, dword [ebp + 0xc]
push dword [eax + 0xc]
mov eax, edi
push dword [eax + 0x11c]
lea ebx, [esi + 0x38]
call fcn.01018876
mov edi, eax
xor ebx, ebx
test edi, edi
jne 0x1019e70
mov edi, dword [ebp + 8]
jmp 0x1019e0a
push 0x100
push dword [edi + 0x11c]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
push 0x100
mov word [esi + 0x436], bx
push dword [edi + 0x11c]
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0x18
mov word [esi + 0x236], bx
jmp 0x1019e0a
push 0x100
lea eax, reloc.msvcrt.dll___p__fmode
push eax
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
push 0xff
push dword [edi + 0x11c]
jmp 0x1019daa
lea eax, reloc.msvcrt.dll___p__fmode
push 0x1001818
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
lea eax, [esi + 0x38]
push 0x1001818
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
add esp, 0x10
mov eax, dword [ebp + 0xc]
or dword [esi + 0x34], 0xffffffff
push 0x11
pop ecx
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x14]
push ebx
lea edx, reloc.msvcrt.dll___p__fmode
push ebx
mov dword [esi + reloc.msvcrt.dll___p__fmode], edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
xor eax, eax
mov edi, edx
push ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + reloc.msvcrt.dll___p__fmode], ebx
mov dword [esi + reloc.msvcrt.dll___p__fmode], ebx
rep stosd dword es:[edi], eax
push ebx
mov dword [edx], DocumentPropertiesW
mov dword [esi + reloc.msvcrt.dll___p__fmode], 1
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
jne 0x1019e9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi + reloc.msvcrt.dll___p__fmode]
cmp eax, ebx
je 0x1019e81
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.01035abf
xor esi, esi
cmp edi, ebx
je 0x1019e94
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0x10
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push 0x10416f8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 0xc]
test byte [edi + 0x30], 4
jne 0x1019edf
cmp dword [edi + 0x18], ebx
jne 0x1019edf
push edi
call fcn.01024f3a
test eax, eax
jne 0x1019edf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10416f8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1019e70
mov eax, dword [edi + 0x1c]
mov al, byte [eax + 0x848]
and al, 2
neg al
push 0x10416f8
sbb eax, eax
not eax
and eax, esi
mov dword [edi + 0x20], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1019e94