Function at 0x180017680
Capabilities:
Get file size

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0xe8]
sub rsp, 0x1c0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1801aed20]
xor rax, rsp
mov qword [rbp + 0xb8], rax
mov rsi, rcx
xor r14d, r14d
mov qword [rsp + 0x40], r14
lea rdx, [rsp + 0x40]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180017a4b
mov eax, dword [rsi + 0x34]
cmp qword [rsp + 0x40], rax
jle 0x180017a4b
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or r12, 0xffffffffffffffff
mov qword [rsi + 8], r12
mov eax, dword [rsi + 0x38]
shl eax, 0x1f
not eax
and eax, 0x88000080
or eax, 0x8000080
lea rdi, [rsi + 0x10]
cmp qword [rdi + 0x18], 8
jb 0x18001771f
mov rcx, qword [rdi]
jmp 0x180017722
mov rcx, rdi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], eax
mov eax, 4
mov dword [rsp + 0x20], eax
xor r9d, r9d
lea r13d, [rax + 3]
mov r8d, r13d
mov edx, eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 8], rax
cmp rax, r12
je 0x180017a4b
mov qword [rsp + 0x40], r14
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x180017a4b
mov eax, dword [rsi + 0x34]
cmp qword [rsp + 0x40], rax
jle 0x180017a4b
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 8], r12
mov qword [rbp - 0x10], r13
mov qword [rbp - 0x18], r14
mov word [rbp - 0x28], r14w
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x1800177cc
cmp qword [rdi + 0x18], 8
jb 0x1800177ac
mov rax, qword [rdi]
jmp 0x1800177af
mov rax, rdi
cmp qword [rdi + 0x18], 8
jb 0x1800177bb
mov rdx, qword [rdi]
jmp 0x1800177be
mov rdx, rdi
lea r8, [rax + rcx*2]
lea rcx, [rbp - 0x28]
call fcn.18001c338
nop
lea rdx, [rsi + 0x30]
lea rcx, [rbp + 0x58]
call fcn.1800244b0
nop
mov r8, rax
mov rdx, rdi
lea rcx, [rbp + 0x38]
call fcn.180024520
nop
mov qword [rbp - 0x30], r13
mov qword [rbp - 0x38], r14
mov word [rbp - 0x48], r14w
mov r9, r12
xor r8d, r8d
mov rdx, rax
lea rcx, [rbp - 0x48]
call fcn.18001edc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x38]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x58]
call fcn.18001ea24
xor edx, edx
lea rcx, [rbp - 0x48]
call fcn.1800cc3e0
mov ebx, dword [rsi + 0x30]
jmp 0x18001795b
lea rcx, [rbp + 0x98]
call fcn.1800244b0
nop
mov r8, rax
mov rdx, rdi
lea rcx, [rbp + 0x78]
call fcn.180024520
nop
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], r14
mov word [rsp + 0x58], r14w
mov r9, r12
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.18001edc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x78]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x98]
call fcn.18001ea24
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x50]
call fcn.1800cc670
cmp dword [rax], r14d
je 0x1800178b9
cmp dword [rax], 1
mov al, 1
jne 0x1800178bc
mov al, r14b
test al, al
je 0x18001794c
lea eax, [rbx + 1]
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x18]
call fcn.1800244b0
nop
mov r8, rax
mov rdx, rdi
lea rcx, [rbp - 8]
call fcn.180024520
nop
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x78], r14
mov word [rsp + 0x78], r14w
mov r9, r12
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.18001edc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 8]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x18]
call fcn.18001ea24
xor r8d, r8d
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x58]
call fcn.1800cc590
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x78]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x58]
call fcn.18001ea24
dec ebx
cmp ebx, 1
mov dword [rsp + 0x40], ebx
lea rdx, [rsp + 0x40]
jae 0x18001783a
mov dword [rsp + 0x40], 1
lea rcx, [rbp - 8]
call fcn.180024440
nop
mov r8, rax
mov rdx, rdi
lea rcx, [rbp + 0x18]
call fcn.180024520
nop
mov qword [rbp - 0x50], r13
mov qword [rbp - 0x58], r14
mov word [rbp - 0x68], r14w
mov r9, r12
xor r8d, r8d
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.18001edc0
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x18]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 8]
call fcn.18001ea24
xor r8d, r8d
lea rdx, [rbp - 0x68]
lea rcx, [rbp - 0x28]
call fcn.1800cc590
mov eax, dword [rsi + 0x38]
shl eax, 0x1f
not eax
and eax, 0x88000080
or eax, 0x8000080
cmp qword [rdi + 0x18], 8
jb 0x1800179fa
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], eax
mov edx, 4
mov dword [rsp + 0x20], edx
xor r9d, r9d
mov r8d, r13d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 8], rax
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x68]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x48]
call fcn.18001ea24
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x28]
call fcn.18001ea24
mov rcx, qword [rbp + 0xb8]
xor rcx, rsp
call fcn.1800a6240
lea r11, [rsp + 0x1c0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret