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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, edx
sub esp, 0x4c
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 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 0x6900ac10
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 [esp + 0x10], 0
mov dword [ebp - 0x1c], eax
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 0x6900ab60
test byte [0x6900d038], 4
jne 0x6900ac40
mov eax, dword fs:[0x18]
mov edi, dword [eax + 0x34]
test edi, edi
jle 0x6900ab35
movzx edi, di
or edi, 0x80070000
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1c]
mov ecx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x28], ecx
mov dword [esp + 8], eax
mov dword [esp], 0
call ecx
lea ecx, [eax + 1]
sub esp, 0x18
mov dword [ebp - 0x30], eax
mov dword [esp + 4], 2
mov dword [esp], ecx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.ucrtbase.dll_calloc]
mov ecx, dword [ebp - 0x2c]
mov esi, eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 8], eax
call dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
xor eax, eax
mov ecx, dword [ebp - 0x24]
sub esp, 0x18
mov word [esi + edx*2], ax
mov eax, dword [ebp - 0x20]
mov edx, esi
call fcn.69009c20
mov dword [esp], esi
mov edi, eax
mov esi, dword [sym.imp.ucrtbase.dll_free]
call esi
jmp 0x6900ab3b
test byte [0x6900d038], 4
jne 0x6900acb0
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
test esi, esi
je 0x6900ad60
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x6900ad20
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
mov edx, str._invalid_
jne 0x6900ac80
mov edx, 0xffffffff
mov eax, esi
call fcn.69008300
mov edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.Failed_to_read_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x6900d038
mov dword [esp], 2
call fcn.690084b0
jmp 0x6900ab1f
test esi, esi
je 0x6900ad6a
mov eax, esi
shr eax, 0x10
test eax, eax
je 0x6900ad40
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
mov edx, str._invalid_
jne 0x6900acec
mov edx, 0xffffffff
mov eax, esi
call fcn.69008300
mov edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.Could_not_open_file__s_n
mov dword [esp + 8], str.file_register
mov dword [esp + 4], 0x6900d038
mov dword [esp], 2
call fcn.690084b0
jmp 0x6900ac1d
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call fcn.69008190
mov edx, eax
jmp 0x6900ac80
movzx esi, si
mov dword [esp], str._04x
mov dword [esp + 4], esi
call fcn.69008190
mov edx, eax
jmp 0x6900acec
mov edx, str._null_
jmp 0x6900ac80
mov edx, str._null_
jmp 0x6900acec