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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp + 0x27], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1401a7d98]
xor rax, rsp
mov qword [rbp + 0x3f], rax
mov rsi, rdx
mov rbx, rcx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 1], xmm0
mov qword [rbp + 0xf], rax
lea rdx, [rbp - 1]
call fcn.1400c5bb0
test eax, eax
js 0x1400123b8
and qword [rbp + 0x1f], 0
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbx, rax
mov qword [rbp + 0x1f], rax
cmp rax, 0xffffffffffffffff
jne 0x140012254
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x14001221d
mov eax, 0x36fd
jmp 0x14001222e
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x14001222e
int3
lea rcx, str.onecore_basewcp_toolsmtmtmt_main.cpp
mov qword [rbp - 1], rcx
lea rcx, str.TfwBlobFromFilePath
mov qword [rbp + 7], rcx
mov dword [rbp + 0xf], 0xf9b
lea rcx, str.FileHandle_____HANDLE__LONG_PTR__1_
jmp 0x1400122a7
lea rdx, [rbp + 0x33]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
mov dword [rbp + 0x2f], eax
mov edi, 0xffffffff
cmp eax, edi
jne 0x1400122cb
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
je 0x1400122c8
lea rcx, str.onecore_basewcp_toolsmtmtmt_main.cpp
mov qword [rbp - 1], rcx
lea rcx, str.TfwBlobFromFilePath
mov qword [rbp + 7], rcx
mov dword [rbp + 0xf], 0xfa6
lea rcx, str.dwLastError
mov qword [rbp + 0x17], rcx
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14009dbd4
mov edi, eax
mov r8d, eax
jmp 0x140012363
mov eax, dword [rbp + 0x2f]
cmp qword [rbp + 0x2f], rdi
ja 0x140012392
mov ecx, eax
mov dword [rbp + 0x37], ecx
cmp qword [rbp + 0x2f], rcx
je 0x1400122ea
mov edi, 0xc00000e5
jmp 0x140012397
mov rdx, rsi
call fcn.1400c9d54
mov edi, eax
test eax, eax
js 0x140012397
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x37]
mov r8d, dword [rbp + 0x37]
mov rdx, qword [rsi + 0x10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14001236e
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ecx, eax
call fcn.1400cc8ac
mov edi, eax
shr eax, 0x1f
xor al, 1
je 0x14001233e
int3
lea rcx, str.onecore_basewcp_toolsmtmtmt_main.cpp
mov qword [rbp - 1], rcx
lea rcx, str.TfwBlobFromFilePath
mov qword [rbp + 7], rcx
mov dword [rbp + 0xf], 0xfac
and qword [rbp + 0x17], 0
mov r8d, edi
lea rcx, [rbp - 1]
call fcn.1400c81b4
jmp 0x140012397
mov eax, dword [rbp + 0x37]
mov qword [rsi], rax
test rbx, rbx
je 0x14001238e
and qword [rbp + 0x1f], 0
mov rcx, rbx
call qword [sym.imp.NTDLL.dll_NtClose]
nop dword [rax + rax]
nop
xor eax, eax
jmp 0x1400123b8
mov edi, 0xc0000095
lea rcx, [rbx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400123b6
and qword [rbp + 0x1f], 0
mov rcx, rbx
call qword [sym.imp.NTDLL.dll_NtClose]
nop dword [rax + rax]
nop
mov eax, edi
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.140109af0
mov rbx, qword [rsp + 0xc0]
add rsp, 0x90
pop rdi
pop rsi
pop rbp
ret