Function at 0x140030350
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x58]
sub rsp, 0x130
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14007d008]
xor rax, rsp
mov qword [rbp + 0x28], rax
movzx r14d, r8b
mov rsi, rcx
mov rax, qword [rcx]
mov rdx, qword [rax + 0x60]
lea r12, vtable.AdRmDoc.0
cmp rax, r12
jne 0x1400303a5
movzx eax, byte [rcx + 8]
jmp 0x1400303a7
call rdx
test al, al
jne 0x1400303b2
xor eax, eax
jmp 0x1400307f8
mov eax, dword [rsi + 0x850]
test eax, eax
je 0x1400303c8
lea ecx, [rax - 0x34]
cmp ecx, 1
ja 0x1400307f8
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x70]
mov rbx, rax
test rax, rax
jne 0x1400303e1
lea eax, [rbx + 8]
jmp 0x1400307f8
lea rcx, [rbp]
call qword [sym.imp.acdb21.dll_public:_void___cdecl_AdXREFString::constructor_void____ptr64]
nop
mov byte [rsp + 0x60], 0
lea rdx, [rsp + 0x38]
lea rcx, [rsi + 0x20]
call fcn.140001330
nop
mov rcx, qword [rbx]
mov r10, qword [rcx + 0x100]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], 5
mov r9, rsi
mov r8, rax
lea rdx, [rbp]
mov rcx, rbx
call r10
mov ebx, eax
lea rcx, [rsp + 0x38]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
test ebx, ebx
jne 0x1400307c4
cmp byte [rsp + 0x60], bl
jne 0x1400307c4
lea rcx, [rsi + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140030471
test al, 1
je 0x140030471
mov dword [rsi + 0x850], 0x34
lea r8d, [rbx + 0x34]
jmp 0x1400307d4
lea rdx, [rsp + 0x38]
lea rcx, [rsi + 0x20]
call fcn.140001330
nop
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.14002f7e0
nop
lea rcx, [rsp + 0x38]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
lea rcx, [rsp + 0x70]
call qword [sym.imp.acdb21.dll_public:_void___cdecl_AdXREFString::constructor_void____ptr64]
nop
test r14b, r14b
je 0x1400304ba
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x70]
call qword [sym.imp.acdb21.dll_public:_class_AdXREFString_const____ptr64___cdecl_AdXREFString::operator_class_AdXREFString_const____ptr64____ptr64]
jmp 0x1400304e3
lea rdx, [rsp + 0x38]
lea rcx, [rsi + 0x20]
call fcn.140001330
nop
mov rdx, rax
lea rcx, [rsp + 0x70]
call qword [sym.imp.acdb21.dll_public:_class_AdXREFString_const____ptr64___cdecl_AdXREFString::operator_class_AdXREFString_const____ptr64____ptr64]
nop
lea rcx, [rsp + 0x38]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
xor eax, eax
mov qword [rsp + 0x40], rax
lea rax, vtable.AdRmDatabasePointer.0
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x40], 0x1a
xor r14d, r14d
mov qword [rsp + 0x48], r14
mov r8b, 1
lea rdx, [rsi + 0x20]
lea rcx, [rsp + 0x38]
call fcn.1400439e0
mov r8d, dword [rsp + 0x40]
test r8d, r8d
je 0x14003052a
mov dword [rsi + 0x850], r8d
jmp 0x140030588
mov rbx, qword [0x14007f3d8]
mov rax, qword [rsi]
mov r8, qword [rax + 0xe0]
cmp rax, r12
jne 0x14003055b
mov rcx, rbx
call qword [sym.imp.acdb21.dll_public:_enum_AcDb::AcDbDwgVersion___cdecl_AcDbDatabase::lastSavedAsVersion_void____ptr64]
mov r15d, eax
test eax, eax
jne 0x140030567
mov rcx, rbx
call qword [sym.imp.acdb21.dll_public:_enum_AcDb::AcDbDwgVersion___cdecl_AcDbDatabase::originalFileVersion_void____ptr64]
jmp 0x140030564
mov rdx, rbx
mov rcx, rsi
call r8
mov r15d, eax
mov rcx, qword [0x14007f3d8]
call qword [sym.imp.acdb21.dll_enum_Acad::ErrorStatus___cdecl_AcDbIndexFilterManager::updateIndexes_class_AcDbDatabase____ptr64_]
test eax, eax
je 0x1400305a7
mov dword [rsi + 0x850], 0x17
mov r8d, 0x17
mov r9b, 1
mov rdx, rsi
mov rcx, rsi
call fcn.140030920
mov r14d, dword [rsi + 0x850]
mov rdi, qword [rsp + 0x48]
jmp 0x140030753
mov edx, 1
mov rcx, qword [0x14007f3d8]
call qword [sym.imp.acdb21.dll_public:_enum_Acad::ErrorStatus___cdecl_AcDbDatabase::setSaveproxygraphics_short_int____ptr64]
mov dl, 1
mov rcx, qword [0x14007f3d8]
call qword [sym.imp.acdb21.dll_public:_void___cdecl_AcDbDatabase::setRetainOriginalThumbnailBitmap_bool____ptr64]
mov rax, qword [rsi]
xor r9d, r9d
mov r8b, 1
xor edx, edx
mov rcx, rsi
call qword [rax + 0x40]
mov rbx, rax
mov qword [rsp + 0x68], rax
mov rax, qword [rax]
mov rcx, rbx
call qword [rax + VariantCopy]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x18]
test al, al
jne 0x140030636
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x20]
test rax, rax
je 0x140030636
mov rcx, qword [rax]
mov r8, qword [rcx + 0xb8]
mov rdx, qword [0x14007f3d8]
mov rcx, rax
call r8
test eax, eax
jne 0x14003062b
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
jmp 0x1400305ea
mov dword [rsi + 0x850], eax
mov r8d, eax
jmp 0x140030676
mov rdi, qword [0x14007f3d8]
lea rcx, [rsp + 0x70]
call qword [sym.imp.acdb21.dll_public:_wchar_t_const____ptr64___cdecl_AdXREFString::operator_wchar_t_const____ptr64_void_const___ptr64]
mov qword [rsp + 0x20], r14
mov r9d, 0x1f
mov r8b, 1
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.acdb21.dll_public:_enum_Acad::ErrorStatus___cdecl_AcDbDatabase::saveAs_wchar_t_const____ptr64__bool__enum_AcDb::AcDbDwgVersion__struct_SecurityParams_const____ptr64____ptr64]
test eax, eax
je 0x140030695
mov dword [rsi + 0x850], 0x16
mov r8d, 0x16
mov r9b, 1
mov rdx, rsi
mov rcx, rsi
call fcn.140030920
mov r14d, dword [rsi + 0x850]
mov rdi, qword [rsp + 0x48]
jmp 0x140030745
mov rdi, qword [0x14007f3d8]
mov rax, qword [rsi]
mov r8, qword [rax + 0xe0]
cmp rax, r12
jne 0x1400306c3
mov rcx, rdi
call qword [sym.imp.acdb21.dll_public:_enum_AcDb::AcDbDwgVersion___cdecl_AcDbDatabase::lastSavedAsVersion_void____ptr64]
test eax, eax
jne 0x1400306cc
mov rcx, rdi
call qword [sym.imp.acdb21.dll_public:_enum_AcDb::AcDbDwgVersion___cdecl_AcDbDatabase::originalFileVersion_void____ptr64]
jmp 0x1400306cc
mov rdx, rdi
mov rcx, rsi
call r8
mov dword [rsi + 0x848], eax
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x140030708
mov eax, dword [0x14007f3d4]
dec eax
mov dword [0x14007f3d4], eax
test eax, eax
jg 0x1400306f3
call fcn.140043c70
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
mov rdi, r14
mov qword [rsp + 0x48], r14
cmp r15d, dword [rsi + 0x848]
setne al
mov byte [rsi + 0x84c], al
lea rcx, [rbp - 0x60]
call fcn.14002f960
mov dword [rsi + 0x850], r14d
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rsi
call fcn.140030920
mov rax, qword [rsi]
xor edx, edx
mov rcx, rsi
call qword [rax + 0x68]
nop
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
nop
test rdi, rdi
je 0x14003077d
mov eax, dword [0x14007f3d4]
dec eax
mov dword [0x14007f3d4], eax
test eax, eax
jg 0x14003076f
call fcn.140043c70
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
nop
lea rcx, [rsp + 0x70]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
nop
lea rax, vtable.AdRmFileBackup.0
mov qword [rbp - 0x60], rax
cmp byte [rbp - 8], 0
jne 0x1400307ad
lea rcx, [rbp - 0x30]
call qword [sym.imp.acdb21.dll_public:_wchar_t_const____ptr64___cdecl_AdXREFString::operator_wchar_t_const____ptr64_void_const___ptr64]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wremove]
lea rcx, [rbp - 0x30]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
lea rcx, [rbp - 0x58]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
nop
jmp 0x1400307eb
mov dword [rsi + 0x850], 0x13
mov r8d, 0x13
mov r9b, 1
mov rdx, rsi
mov rcx, rsi
call fcn.140030920
mov eax, dword [rsi + 0x850]
mov r14d, eax
lea rcx, [rbp]
call qword [sym.imp.acdb21.dll_public_virtual:_void___cdecl_AdXREFString::destructor_void____ptr64]
mov eax, r14d
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.1400489c0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret