Function at 0x180218ba0
Capabilities:
Get file size

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1804e0010]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rdi, rcx
mov eax, dword [rcx + 0x6c]
dec eax
lea rdx, [rax + rax*8]
mov rax, qword [rcx + 0x5f8]
mov rcx, qword [rax]
mov ebx, dword [rcx + rdx*8 + 0x40]
xor r15d, r15d
cmp ebx, 2
jne 0x180218cd8
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r15w
mov r8d, dword [rdi + 0x600]
lea rdx, [0x1803e1098]
lea rcx, [rbp - 0x38]
call fcn.18015a250
mov rcx, qword [rdi + 0x650]
cmp dword [rdi + 0x600], 0x64
jne 0x180218c5b
lea rdx, [0x1803e1030]
call qword [sym.imp.USER32.dll_SetWindowTextW]
xor r9d, r9d
xor r8d, r8d
mov edx, pe_nt_image_headers64
mov rcx, qword [rdi + 8]
call qword [sym.imp.USER32.dll_SendMessageW]
jmp 0x180218c68
lea rdx, [0x1803cd4c0]
call qword [sym.imp.USER32.dll_SetWindowTextW]
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 8
cmovae rdx, qword [rbp - 0x38]
mov rcx, qword [rdi + 0x640]
call qword [sym.imp.USER32.dll_SetWindowTextW]
nop
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x180218cc7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180218cc2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180218cc2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180393fb0
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r15w
mov qword [rbp - 0x38], r15
mov rcx, qword [rdi + 0x580]
test rcx, rcx
je 0x180218cf5
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [rdi + 0x580], r15
mov eax, dword [rbp - 0x30]
mov dword [rdi + 0x588], eax
mov eax, dword [rbp - 0x2c]
mov dword [rdi + 0x58c], eax
cmp ebx, 2
jne 0x180218d1d
cmp dword [rdi + 0x5e8], ebx
jne 0x180218d1d
cmp dword [rdi + 0x600], 0x64
jne 0x180218d25
cmp ebx, dword [rdi + 0x5e8]
je 0x180218d32
mov rcx, rdi
call fcn.180219a40
jmp 0x180218df8
mov esi, r15d
mov ecx, 8
call fcn.180393f74
mov qword [rbp - 0x18], rax
mov qword [rax], 0xffffffffffffffff
mov qword [rbp - 0x38], rax
lea rdx, [rdi + 0x558]
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, 1
mov r8d, 0x80000000
lea rcx, [rbp - 0x38]
call fcn.180179420
test al, al
jne 0x180218d84
mov rbx, qword [rbp - 0x38]
jmp 0x180218dc2
mov rbx, qword [rbp - 0x38]
test rbx, rbx
je 0x180218dbe
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x180218dbe
lea rdx, [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x180218db2
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x180218dbe
mov esi, dword [rbp - 0x18]
shl rsi, 0x20
add rsi, r14
jmp 0x180218dc2
mov rsi, qword [rbp - 0x38]
test rbx, rbx
je 0x180218dee
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x180218ddd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], r15
mov edx, 8
mov rcx, rbx
call fcn.180393fb0
mov qword [rbp - 0x38], r15
mov edx, esi
mov rcx, rdi
call fcn.180219e40
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.180393f50
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret