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

Disassembly:
push 0x104
mov eax, 0x10023a9f
call fcn.10012153
mov eax, ecx
mov dword [ebp - 0xfc], eax
xor ebx, ebx
mov dword [ebp - 0x10c], eax
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0xf8], ebx
call fcn.1000802a
mov dword [ebp - 4], 1
lea ecx, [ebp - 0xd4]
call fcn.10009379
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x5c]
push ecx
mov edx, eax
lea ecx, [ebp - 0xec]
call fcn.100076c0
mov byte [ebp - 4], 3
mov edx, eax
lea ecx, [ebp - 0xbc]
call fcn.10006262
pop ecx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x5c]
push ecx
mov edx, eax
lea ecx, [ebp - 0x8c]
call fcn.100076c0
mov byte [ebp - 4], 5
mov edx, eax
lea ecx, [ebp - 0x74]
call fcn.10006262
mov byte [ebp - 4], 6
mov edx, eax
lea ecx, [ebp - 0xa4]
mov dword [esp], 0x1002b3a4
call fcn.10008277
mov byte [ebp - 4], 7
mov edx, eax
lea ecx, [ebp - 0x2c]
call fcn.10006262
mov byte [ebp - 4], 8
mov edx, eax
lea ecx, [ebp - 0x44]
mov dword [esp], 0x1002b380
call fcn.10008277
pop ecx
mov byte [ebp - 4], 0xa
xor esi, esi
push ebx
inc esi
lea ecx, [ebp - 0x2c]
push esi
call fcn.10002c78
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0xa4]
push ebx
push esi
call fcn.10002c78
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x74]
push ebx
push esi
call fcn.10002c78
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x8c]
push ebx
push esi
call fcn.10002c78
mov byte [ebp - 4], 0xe
push ebx
push esi
lea ecx, [ebp - 0xbc]
call fcn.10002c78
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0xec]
push ebx
push esi
call fcn.10002c78
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0xd4]
push ebx
push esi
call fcn.10002c78
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
push ebx
cmovae eax, dword [ebp - 0x44]
push ebx
push 3
push ebx
push 5
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xf4], eax
cmp eax, 0xffffffff
jne 0x10009ae7
lea eax, [ebp - 0xf0]
mov dword [ebp - 0xf0], str.Could_not_open_compatibility_file
push eax
lea ecx, [ebp - 0x108]
call fcn.100109d1
push 0x1002e240
lea eax, [ebp - 0x108]
push eax
call fcn.1001208b
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x100], ecx
mov byte [ebp - 4], 0x11
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10009b2f
mov dword [ebp - 0xf0], str.Invalid_file_size
lea eax, [ebp - 0xf0]
push eax
lea ecx, [ebp - 0x20]
call fcn.100109d1
push 0x1002e240
lea eax, [ebp - 0x20]
jmp 0x10009ae1
lea esi, [ebx + 2]
push esi
call fcn.1000f1a3
mov edi, eax
pop ecx
mov dword [ebp - 0x110], edi
mov byte [ebp - 4], 0x12
push esi
push 0
push edi
call fcn.10017640
mov esi, dword [ebp - 0xf4]
add esp, 0xc
mov ecx, ebx
test ebx, ebx
jmp 0x10009b8c
and dword [ebp - 0xf4], 0
lea eax, [ebp - 0xf4]
push 0
push eax
mov eax, edi
sub eax, ecx
push ecx
add eax, ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10009bf2
mov ecx, dword [ebp - 0xf0]
sub ecx, dword [ebp - 0xf4]
mov dword [ebp - 0xf0], ecx
jne 0x10009b5d
mov ebx, dword [ebp - 0xfc]
mov ecx, ebx
push edi
call fcn.100036b5
mov dword [ebp - 0xf8], 1
mov byte [ebp - 4], 0x11
test edi, edi
je 0x10009bbb
push edi
call fcn.10010e01
pop ecx
mov byte [ebp - 4], 0x10
test esi, esi
je 0x10009bca
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x44]
push 0
push 1
call fcn.10002c78
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c]
push 0
push 1
call fcn.10002c78
mov eax, ebx
call fcn.10012102
ret
mov dword [ebp - 0xf0], str.Could_not_read_file
jmp 0x10009b16