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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
xor esi, esi
mov rbx, r8
mov qword [rdx], rsi
mov r15, rdx
mov qword [rax - 0x38], rsi
xor r9d, r9d
mov qword [r8], rsi
mov edx, 0x80000000
mov dword [rax - 0x40], 0x80
lea r8d, [rsi + 1]
mov r12, rcx
mov dword [rax - 0x48], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x14012e9ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401720a0]
lea rbp, [0x1401720a0]
cmp rcx, rbp
je 0x14012e9d9
test byte [rcx + 0x1c], 1
je 0x14012e9d9
cmp byte [rcx + 0x19], 2
jb 0x14012e9d9
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0xa]
mov r9, r12
mov dword [rsp + 0x20], eax
lea r8, [0x14015b8d8]
call fcn.140005b60
mov rcx, qword [0x1401720a0]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012eb8d
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
lea rbp, [0x1401720a0]
test eax, eax
jne 0x14012ea52
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401720a0]
cmp rcx, rbp
je 0x14012ea3f
test byte [rcx + 0x1c], 1
je 0x14012ea3f
cmp byte [rcx + 0x19], 2
jb 0x14012ea3f
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015b8d8]
mov edx, 0xb
mov dword [rsp + 0x20], eax
mov r9, r12
call fcn.140005b60
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012eb7d
cmp dword [rbx + 4], esi
je 0x14012ea61
mov ebx, 0x80780028
jmp 0x14012eb7d
mov edi, dword [rbx]
test dil, 1
jne 0x14012ea57
lea eax, [rdi + 2]
cmp eax, edi
jb 0x14012eb40
mov ecx, eax
mov ebx, esi
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rsi, rax
xor eax, eax
test rsi, rsi
jne 0x14012ea92
mov ebx, 0x8007000e
jmp 0x14012eb7d
lea r9, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r8d, edi
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
test eax, eax
jne 0x14012eafd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401720a0]
cmp rcx, rbp
je 0x14012eaed
test byte [rcx + 0x1c], 1
je 0x14012eaed
cmp byte [rcx + 0x19], 2
jb 0x14012eaed
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015b8d8]
mov edx, 0xd
mov dword [rsp + 0x20], eax
mov r9, r12
call fcn.140005b60
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012eb30
cmp dword [rsp + 0x78], edi
je 0x14012eb1d
lea r8, str.dwBytesRead__dwBytesToRead
mov edx, 0x8d
lea rcx, [0x14015b838]
call fcn.14008410c
xor edx, edx
mov qword [r15], rsi
mov rcx, rdi
mov rax, qword [r15]
mov rsi, rdx
shr rcx, 1
mov word [rax + rcx*2], dx
test rsi, rsi
je 0x14012eb7d
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x14012eb7d
mov rcx, qword [0x1401720a0]
cmp rcx, rbp
je 0x14012eb78
test byte [rcx + 0x1c], 1
je 0x14012eb78
cmp byte [rcx + 0x19], 2
jb 0x14012eb78
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015b8d8]
mov edx, 0xc
mov dword [rsp + 0x20], 2
mov r9d, edi
call fcn.14000ffdc
mov ebx, 0x80070216
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1401720a0]
test ebx, ebx
jns 0x14012ebbe
cmp rcx, rbp
je 0x14012ebbe
test byte [rcx + 0x1c], 1
je 0x14012ebbe
cmp byte [rcx + 0x19], 2
jb 0x14012ebbe
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015b8d8]
mov edx, 0xe
mov dword [rsp + 0x20], ebx
mov r9, r12
call fcn.140005b60
lea r11, [rsp + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret