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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x200], rbx
mov rax, qword [0x1802240e0]
xor rax, rsp
mov qword [rbp + 0xb0], rax
mov r14, rdx
mov rbx, rcx
lea rdi, [rcx + 0x10]
cmp qword [rdi], 0
jne 0x1800cfcd0
xor al, al
jmp 0x1800d014a
xor r15d, r15d
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
xor r8d, r8d
lea rdx, [0x1801acae8]
lea rcx, [rsp + 0x78]
call fcn.1800055c0
nop
mov byte [rbp - 0x60], r15b
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], r15
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r15w
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x38]
call fcn.180005440
nop
cmp qword [rbp - 0x28], r15
jne 0x1800cfd49
lea r8d, [r15 + 3]
lea rdx, [0x1801bfc30]
lea rcx, [rbp - 0x38]
call fcn.1800055c0
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x1800cfd8d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800cfd88
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800cfd88
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18017df04
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r15w
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
lea r8, [rsp + 0x50]
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x60]
call fcn.1800fa4c0
test al, al
jne 0x1800cfddb
xor dil, dil
jmp 0x1800d00c5
mov qword [rbp], r15
mov qword [rbp + 8], r15
mov qword [rbp], r15
mov qword [rbp + 8], 7
mov word [rbp - 0x10], r15w
mov qword [rbp + 0x20], r15
mov qword [rbp + 0x28], r15
mov qword [rbp + 0x20], r15
mov qword [rbp + 0x28], 7
mov word [rbp + 0x10], r15w
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x48], r15
mov qword [rbp + 0x40], r15
mov qword [rbp + 0x48], 7
mov word [rbp + 0x30], r15w
mov qword [rbp + 0x60], r15
mov qword [rbp + 0x68], r15
mov qword [rbp + 0x60], r15
mov qword [rbp + 0x68], 7
mov word [rbp + 0x50], r15w
mov word [rbp + 0x70], 0x101
mov qword [rbp + 0x78], r15
mov qword [rbp + 0x80], r15
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa0], r15
mov qword [rbp + 0x98], r15
mov qword [rbp + 0xa0], 7
mov word [rbp + 0x88], r15w
lea rax, [rbp - 0x10]
cmp rax, rbx
je 0x1800cfe9a
cmp qword [rbx + 0x18], 8
jb 0x1800cfe8b
mov rbx, qword [rbx]
mov r8, qword [rdi]
mov rdx, rbx
lea rcx, [rbp - 0x10]
call fcn.1800055c0
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
mov r8, qword [rsp + 0x60]
lea rcx, [rbp + 0x10]
call fcn.1800055c0
mov ecx, InitCommonControls
call fcn.18017df38
mov rbx, rax
mov qword [rsp + 0x30], rax
mov qword [rax], r15
mov ecx, 0x28
call fcn.18017df38
mov qword [rbx + 8], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
nop
mov qword [rsp + 0x38], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x38]
call fcn.180103240
test al, al
jne 0x1800cff0b
xor dil, dil
jmp 0x1800d0040
mov ecx, 8
call fcn.18017df38
mov qword [rsp + 0x70], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, 1
mov r8d, 0x80000000
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.18005b2a0
mov rbx, qword [rsp + 0x30]
test al, al
je 0x1800d0010
mov rdi, r15
test rbx, rbx
je 0x1800cff99
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1800cff99
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0xffffffff
jne 0x1800cff8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1800cff99
mov edi, dword [rsp + 0x70]
shl rdi, 0x20
mov rax, rsi
add rdi, rsi
mov edi, edi
mov edx, edi
mov rcx, r14
call fcn.18004fe90
mov dword [rsp + 0x40], r15d
mov rdx, qword [r14]
test rbx, rbx
je 0x1800d0010
test rdx, rdx
je 0x1800cfff6
cmp qword [rbx], 0xffffffffffffffff
je 0x1800d0010
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, edi
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1800cfff6
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1800cfff1
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1800cfff1
mov qword [rbx], 0xffffffffffffffff
mov dil, 1
jmp 0x1800d0013
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x1800d0010
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1800d0010
mov qword [rbx], 0xffffffffffffffff
xor dil, dil
test rbx, rbx
je 0x1800d0040
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1800d002e
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.18017df04
mov qword [rsp + 0x30], r15
mov rbx, qword [rsp + 0x38]
test rbx, rbx
je 0x1800d0090
mov qword [rsp + 0x38], rbx
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1800d0070
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov edx, 0x28
mov rcx, qword [rbx + 8]
call fcn.18017df04
mov qword [rbx + 8], r15
mov rcx, qword [rbx]
test rcx, rcx
je 0x1800d007e
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov edx, InitCommonControls
mov rcx, rbx
call fcn.18017df04
mov qword [rsp + 0x38], r15
lea rcx, [rbp + 0x88]
call fcn.180005540
nop
lea rcx, [rbp + 0x50]
call fcn.180005540
nop
lea rcx, [rbp + 0x30]
call fcn.180005540
nop
lea rcx, [rbp + 0x10]
call fcn.180005540
nop
lea rcx, [rbp - 0x10]
call fcn.180005540
nop
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x1800d010a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1800d0105
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1800d0105
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.18017df04
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r15w
cmp byte [rbp - 0x60], 0
je 0x1800d0133
lea rcx, [rbp - 0x58]
call fcn.18005e2b0
test al, al
sete byte [rbp - 0x60]
lea rcx, [rbp - 0x38]
call fcn.180005540
nop
lea rcx, [rbp - 0x58]
call fcn.180005540
movzx eax, dil
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.18017dee0
mov rbx, qword [rsp + 0x200]
add rsp, 0x1c0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret