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

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rbp, r8
mov rsi, rdx
mov rbx, rcx
mov rdx, qword [rdx]
lea rcx, [0x01006570]
call fcn.0100fdd0
mov rdx, qword [rbp]
lea rcx, [0x010065b8]
call fcn.0100fdd0
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r15d, [rdi + 1]
mov r8d, r15d
mov edx, 0x80000000
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1012a1c
lea rcx, [0x01006600]
call fcn.0100fdd0
nop
mov rcx, rsi
call fcn.0100d9e0
nop
mov rcx, rbp
call fcn.0100d9e0
xor eax, eax
jmp 0x1012c8e
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r13d, eax
cmp eax, 0xffffffff
jne 0x1012a5d
lea rcx, [0x01006650]
call fcn.0100fdd0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rsi
call fcn.0100d9e0
nop
mov rcx, rbp
call fcn.0100d9e0
xor eax, eax
jmp 0x1012c8e
mov rcx, qword [rbx + 0x48]
cmp rcx, rdi
je 0x1012a77
call fcn.01027054
mov qword [rbx + 0x48], rdi
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], rdi
lea eax, [r13 + 1]
mov r14d, eax
mov ecx, eax
call fcn.010270b8
mov qword [rbx + 0x48], rax
cmp rax, rdi
jne 0x1012abc
lea rcx, [0x010066a0]
call fcn.0100fdd0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, rsi
call fcn.0100d9e0
nop
mov rcx, rbp
call fcn.0100d9e0
xor eax, eax
jmp 0x1012c8e
mov r8, r14
xor edx, edx
mov rcx, rax
call fcn.010328a0
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, r13d
mov rdx, qword [rbx + 0x48]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x1012b25
lea rcx, [0x010066f0]
call fcn.0100fdd0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x48]
call fcn.01027054
mov qword [rbx + 0x48], rdi
mov rcx, rsi
call fcn.0100d9e0
nop
mov rcx, rbp
call fcn.0100d9e0
xor eax, eax
jmp 0x1012c8e
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], r13d
je 0x1012b66
lea rcx, [0x01006740]
call fcn.0100fdd0
mov rcx, qword [rbx + 0x48]
call fcn.01027054
mov qword [rbx + 0x48], rdi
mov rcx, rsi
call fcn.0100d9e0
nop
mov rcx, rbp
call fcn.0100d9e0
xor eax, eax
jmp 0x1012c8e
mov rax, qword [rbx + 0x48]
mov qword [rbx + 0x50], rax
mov qword [rbx + 0x58], rax
mov rax, qword [rbp]
cmp qword [rax - 0x10], rdi
jne 0x1012ba6
lea rdx, [0x01006784]
lea rcx, [rsp + 0xb8]
call fcn.0100da98
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.01012fdc
mov r12d, eax
jmp 0x1012c3a
mov rax, qword [0x01043880]
mov qword [rsp + 0x48], rax
mov eax, 0x5b
mov word [rsp + 0xb8], ax
lea r8, [rsp + 0xb8]
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.0100db10
mov rdx, qword [rbp]
mov r8, rdx
mov rdx, qword [rdx - 0x10]
lea rcx, [rsp + 0x48]
call fcn.0100de4c
mov r11d, 0x5d
mov word [rsp + 0xb8], r11w
lea r8, [rsp + 0xb8]
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.0100de4c
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0xb8]
call fcn.0100d7ec
xor r8d, r8d
mov rdx, rax
mov rcx, rbx
call fcn.01012fdc
mov r12d, eax
lea rcx, [rsp + 0x48]
call fcn.0100d9e0
cmp r12d, edi
jne 0x1012c6b
lea rcx, [0x01006790]
call fcn.0100fdd0
mov rcx, qword [rbx + 0x48]
call fcn.01027054
mov qword [rbx + 0x48], rdi
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], rdi
mov rcx, rsi
call fcn.0100d9e0
nop
jmp 0x1012c84
lea rcx, [0x010067e8]
call fcn.0100fdd0
nop
mov rcx, rsi
call fcn.0100d9e0
nop
mov edi, r15d
mov rcx, rbp
call fcn.0100d9e0
mov eax, edi
mov rbx, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret