Function at 0x140008530
Capabilities:
Get file size

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x60
mov rax, qword [0x14004a0c0]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rdi, rdx
mov rbx, rcx
mov rcx, qword [rcx + 0x18]
xor ebp, ebp
test rcx, rcx
je 0x14000856e
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rbx + 0x18], rbp
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140008581
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rbp
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x140008597
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], 0xffffffffffffffff
mov byte [rbx + 0x20], bpl
mov qword [rbx + 0x10], rbp
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov rcx, rbp
mov qword [rsp + 0x40], rcx
mov edx, 7
mov qword [rsp + 0x48], rdx
mov word [rsp + 0x30], bp
mov rsi, rbp
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp byte [rdi + rax], sil
jne 0x1400085d0
test rax, rax
je 0x14000863c
nop
movsx r9d, byte [rdi + rsi]
cmp rcx, rdx
jae 0x14000860e
lea rax, [rcx + 1]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x30]
cmp rdx, 7
cmova rax, qword [rsp + 0x30]
mov word [rax + rcx*2], r9w
mov word [rax + rcx*2 + 2], bp
jmp 0x140008618
lea rcx, [rsp + 0x30]
call fcn.140020640
inc rsi
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], 0
jne 0x140008622
mov rdx, qword [rsp + 0x48]
cmp rsi, rax
jae 0x14000863c
mov rcx, qword [rsp + 0x40]
jmp 0x1400085e0
lea rcx, [rsp + 0x30]
cmp rdx, 7
cmova rcx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rbp
mov edx, 0x80000000
mov r9d, 3
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CreateFile2]
mov qword [rbx], rax
cmp rax, 0xffffffffffffffff
je 0x140008749
mov qword [rsp + 0x50], rbp
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140008749
mov r9, qword [rsp + 0x50]
mov qword [rbx + 0x10], r9
mov qword [rsp + 0x20], rbp
xor edx, edx
mov r8d, 2
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingFromApp]
mov qword [rbx + 8], rax
test rax, rax
jne 0x14000878b
mov rcx, qword [rbx + 0x18]
cmp qword [rbx + 0x10], rax
jne 0x140008709
test rcx, rcx
je 0x1400086d4
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rbx + 0x18], rbp
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400086e7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rbp
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1400086fd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], 0xffffffffffffffff
mov qword [rbx + 0x10], rbp
mov byte [rbx + 0x20], 1
mov bl, 1
jmp 0x14000874b
test rcx, rcx
je 0x140008718
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rbx + 0x18], rbp
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x14000872b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], rbp
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x140008741
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], 0xffffffffffffffff
mov byte [rbx + 0x20], 0
mov qword [rbx + 0x10], rbp
xor bl, bl
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x1400087b6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400087b1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400087b1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFileFromApp]
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140008705
jmp 0x140008718
call fcn.140035304
movzx eax, bl
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.140034f90
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret