Function at 0x140061f7e
Capabilities:
Get file attributes

Disassembly:
push rbp
push r13
push r12
push rdi
mov eax, 0x40f8
call fcn.140072b30
sub rsp, rax
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x40a0], rcx
mov byte [rbp + 0x406f], 0
mov byte [rbp + 0x405f], 0
lea rdx, [rbp + 0x2030]
mov eax, 0
mov ecx, 0x400
mov rdi, rdx
rep stosq qword [rdi], rax
lea rax, [rbp + 0x2030]
mov qword [rbp + 0x4050], rax
mov rax, qword [rbp + 0x4050]
mov r8d, 0x200
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call rax
mov dword [rbp + 0x404c], eax
mov rax, qword [rbp + 0x4050]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call rax
mov dword [rbp + 0x4048], eax
mov eax, dword [rbp + 0x4048]
and eax, 0x400
mov dword [rbp + 0x4044], eax
cmp dword [rbp + 0x4044], 0
je 0x140062220
mov rax, qword [rbp + 0x4050]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], 3
mov r9d, 0
mov r8d, 1
mov edx, 0x80000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileW]
call rax
mov qword [rbp + 0x4060], rax
cmp qword [rbp + 0x4060], 0xffffffffffffffff
je 0x140062220
mov byte [rbp + 0x406f], 1
lea rdx, [rbp - 0x30]
mov eax, 0
mov ecx, 0x400
mov rdi, rdx
rep stosq qword [rdi], rax
lea rdx, [rbp - 0x30]
mov rax, qword [rbp + 0x4060]
mov r9d, 0
mov r8d, 0x2000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleW]
call rax
mov dword [rbp + 0x4040], eax
cmp dword [rbp + 0x4040], 0x1fff
ja 0x1400621d9
mov ecx, dword [rbp + 0x4040]
lea rax, [rbp - 0x40]
lea rdx, [rbp - 0x30]
mov r8d, ecx
mov rcx, rax
call sym.string_from_wide2
mov rax, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
mov qword [rbp + 0x4030], rax
mov qword [rbp + 0x4038], rdx
mov byte [rbp + 0x405f], 1
lea rcx, [rbp + 0x1ff0]
mov rax, qword [rbp + 0x4030]
mov rdx, qword [rbp + 0x4038]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdx
lea rax, [rbp - 0x40]
mov r9d, 0x7fffffff
mov r8d, 4
mov rdx, rax
call sym.string_substr
lea rcx, [rbp + 0x1fe0]
mov rax, qword [rbp + 0x1ff0]
mov rdx, qword [rbp + 0x1ff8]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rdx
lea rax, [rbp - 0x40]
mov rdx, rax
call sym.string_clone
mov rax, qword [rbp + 0x1fe0]
mov rdx, qword [rbp + 0x1fe8]
mov qword [rbp + 0x1fd0], rax
mov qword [rbp + 0x1fd8], rdx
cmp byte [rbp + 0x405f], 0
je 0x14006219c
lea rax, [rbp + 0x4030]
mov rcx, rax
call sym.string_free
cmp byte [rbp + 0x406f], 0
je 0x1400621b8
mov rax, qword [rbp + 0x4060]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rcx, qword [rbp + 0x40a0]
mov rax, qword [rbp + 0x1fd0]
mov rdx, qword [rbp + 0x1fd8]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
jmp 0x1400622ab
lea r12, str.os.executable___saw_that_the_executable_file_path_was_too_long
mov rdx, r13
movabs rax, 0xffffffff00000000
and rax, rdx
or rax, 0x3e
mov r13, rax
mov rax, r13
mov edx, eax
movabs rax, 0x100000000
or rax, rdx
mov r13, rax
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x38], r13
lea rax, [rbp - 0x40]
mov rcx, rax
call sym.eprintln
mov ecx, dword [rbp + 0x404c]
lea rax, [rbp + 0x2020]
mov rdx, qword [rbp + 0x4050]
mov r8d, ecx
mov rcx, rax
call sym.string_from_wide2
mov rax, qword [rbp + 0x2020]
mov rdx, qword [rbp + 0x2028]
mov qword [rbp + 0x2010], rax
mov qword [rbp + 0x2018], rdx
cmp byte [rbp + 0x405f], 0
je 0x140062273
lea rax, [rbp + 0x4030]
mov rcx, rax
call sym.string_free
cmp byte [rbp + 0x406f], 0
je 0x14006228f
mov rax, qword [rbp + 0x4060]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov rcx, qword [rbp + 0x40a0]
mov rax, qword [rbp + 0x2010]
mov rdx, qword [rbp + 0x2018]
mov qword [rcx], rax
mov qword [rcx + 8], rdx
mov rax, qword [rbp + 0x40a0]
add rsp, 0x40f8
pop rdi
pop r12
pop r13
pop rbp
ret