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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x34
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x1000a370
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
mov edi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x10], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x1000a3a0
test byte [0x1000c038], 4
jne 0x1000a4c0
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
mov esi, dword [sym.imp.ucrtbase.dll_free]
movzx eax, di
mov edx, edi
or eax, 0x80070000
test edi, edi
cmovg edx, eax
mov edi, edx
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x1000c038], 4
jne 0x1000a450
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
movzx eax, di
or eax, 0x80070000
test edi, edi
cmovg edi, eax
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
mov dword [ebp - 0x24], edx
call edx
mov ecx, eax
sub esp, 0x18
mov dword [ebp - 0x1c], eax
add ecx, 1
mov dword [esp + 4], 2
mov dword [esp], ecx
mov dword [ebp - 0x20], ecx
call dword [sym.imp.ucrtbase.dll_calloc]
mov ecx, dword [ebp - 0x20]
mov dword [esp + 0xc], edi
mov esi, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x24]
call edx
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov edx, esi
sub esp, 0x18
mov word [esi + ecx*2], ax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.100094c0
mov dword [esp], esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov edi, eax
call esi
jmp 0x1000a34f
test esi, esi
je 0x1000a560
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x1000a530
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x1000a490
mov edx, 0xffffffff
mov eax, esi
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Could_not_open_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x1000a37d
test esi, esi
je 0x1000a570
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x1000a548
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x1000a4fc
mov edx, 0xffffffff
mov eax, esi
call fcn.10007bc0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Failed_to_read_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x1000c038
mov dword [esp], 2
call fcn.10007e40
jmp 0x1000a32f
mov dword [esp + 4], esi
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x1000a490
mov dword [esp + 4], esi
mov dword [esp], str._04x
call fcn.10007a90
jmp 0x1000a4fc
mov eax, str._null_
jmp 0x1000a490
mov eax, str._null_
jmp 0x1000a4fc