Function at 0x140057cd0
Capabilities:
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x180
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x1d8], rbx
mov rax, qword [0x14035b190]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov r15, rdx
mov rbx, rcx
xor r12d, r12d
mov edi, r12d
mov dword [rbp - 0x80], r12d
mov r14d, r12d
mov eax, 2
cmp r8b, 1
cmove r14d, eax
or r13, 0xffffffffffffffff
test r8b, r8b
jne 0x140057d83
mov qword [rbp - 0x60], 7
mov qword [rbp - 0x68], r12
mov word [rbp - 0x78], r12w
cmp word [rcx], r12w
jne 0x140057d4b
mov r8d, r12d
jmp 0x140057d5a
mov r8, r13
nop
inc r8
cmp word [rcx + r8*2], r12w
jne 0x140057d50
mov rdx, rcx
lea rcx, [rbp - 0x78]
call fcn.1400367c0
nop
mov edi, 1
mov dword [rbp - 0x80], edi
lea rcx, [rbp - 0x78]
call qword [sym.imp.AdskRcFileSystemUtility.dll_bool___cdecl_Autodesk::RealityComputing::Utility::Filesystem::exists_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64_]
test al, al
je 0x140057d83
movzx esi, dil
jmp 0x140057d86
xor sil, sil
test dil, 1
je 0x140057da6
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x140057da6
inc r8
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
call fcn.140037050
test sil, sil
je 0x140057e0d
mov qword [rbp - 0x60], 7
mov qword [rbp - 0x68], r12
mov word [rbp - 0x78], r12w
cmp word [rbx], 0
jne 0x140057dc7
mov r8, r12
jmp 0x140057ddb
mov r8, r13
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x140057dd0
mov rdx, rbx
lea rcx, [rbp - 0x78]
call fcn.1400367c0
nop
lea rcx, [rbp - 0x78]
call qword [sym.imp.AdskRcFileSystemUtility.dll_bool___cdecl_Autodesk::RealityComputing::Utility::Filesystem::remove_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64_]
nop
mov r8, qword [rbp - 0x60]
cmp r8, 8
jb 0x140057e0d
inc r8
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x78]
call fcn.140037050
mov ecx, 0x4000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x1400580cb
lea rcx, [rbp + 0x20]
call fcn.140173100
mov edx, r12d
cmp r14d, 2
mov eax, 2
cmove edx, eax
lea r9, [rbp + 0x20]
xor r8d, r8d
mov rcx, rbx
call fcn.140172640
mov r14, rax
mov rdx, r15
lea rcx, [rbp - 0x80]
call qword [sym.imp.AdskRcCommon.dll_public:_void___cdecl_Autodesk::RealityComputing::Common::RCString::constructor_wchar_t_const____ptr64____ptr64]
nop
mov rcx, rax
call qword [sym.imp.AdskRcCommon.dll_public:_char_const____ptr64___cdecl_Autodesk::RealityComputing::Common::RCString::c_str_void_const___ptr64]
mov qword [rbp - 0x10], 0xf
mov qword [rbp - 0x18], r12
mov byte [rbp - 0x28], 0
cmp byte [rax], 0
jne 0x140057e7f
mov r8, r12
jmp 0x140057e8c
mov r8, r13
inc r8
cmp byte [rax + r8], 0
jne 0x140057e82
mov rdx, rax
lea rcx, [rbp - 0x28]
call fcn.140047c20
nop
lea rcx, [rbp - 0x80]
call qword [sym.imp.AdskRcCommon.dll_public:_void___cdecl_Autodesk::RealityComputing::Common::RCString::destructor_void____ptr64]
lea rbx, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rbx, qword [rbp - 0x28]
mov qword [rbp + 8], r12
mov qword [rbp], r12
mov qword [rbp - 8], r12
mov qword [rbp + 0x10], r12
mov dword [rbp + 0x18], r12d
mov rdx, rbx
movzx eax, byte [rdx]
cmp al, 0x5c
je 0x140057ed3
cmp al, 0x2f
jne 0x140057ed8
inc rdx
jmp 0x140057ec8
mov r8, r12
mov rcx, rdx
movzx eax, byte [rdx]
test al, al
je 0x140057f03
cmp al, 0x5c
je 0x140057eed
cmp al, 0x2f
jne 0x140057ef0
mov r8, rcx
inc rcx
movzx eax, byte [rcx]
test al, al
jne 0x140057ee5
test r8, r8
je 0x140057f03
lea rdx, [r8 + 1]
mov qword [rbp - 0x30], 0xf
mov qword [rbp - 0x38], r12
mov byte [rbp - 0x48], 0
cmp byte [rdx], 0
jne 0x140057f1d
mov r8, r12
jmp 0x140057f2a
mov r8, r13
inc r8
cmp byte [rdx + r8], 0
jne 0x140057f20
lea rcx, [rbp - 0x48]
call fcn.140047c20
nop
lea rdx, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rdx, qword [rbp - 0x48]
mov dword [rsp + 0x80], r12d
mov dword [rsp + 0x78], r12d
mov qword [rsp + 0x70], r12
mov dword [rsp + 0x68], r12d
mov dword [rsp + 0x60], 8
mov dword [rsp + 0x58], 0xfffffff1
mov dword [rsp + 0x50], r12d
mov dword [rsp + 0x48], r13d
mov dword [rsp + 0x40], 8
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], r12d
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8, [rbp - 8]
mov rcx, r14
call fcn.1401728d0
test eax, eax
jne 0x14005806c
lea r8, [0x14028ee60]
mov rdx, rbx
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
je 0x140057fd0
xor edx, edx
mov rcx, r14
call fcn.140172050
jmp 0x14005806c
mov ebx, r12d
mov r9, qword [rbp - 0x50]
mov edx, 1
mov r8d, 0x4000
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdi, rax
cmp eax, 0x4000
jge 0x140058005
mov rcx, qword [rbp - 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
cmove ebx, r13d
test edi, edi
jle 0x14005801d
mov r8d, edi
mov rdx, rsi
mov rcx, r14
call fcn.140172f20
mov ebx, eax
test eax, eax
js 0x140058027
test ebx, ebx
jne 0x140058033
test edi, edi
jle 0x140058033
jmp 0x140057fd0
xor edx, edx
mov rcx, r14
call fcn.140172050
jmp 0x140058075
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x140058042
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
test ebx, ebx
js 0x14005805e
mov rcx, r14
call fcn.1401721c0
test eax, eax
je 0x14005805e
xor edx, edx
mov rcx, r14
call fcn.140172050
jmp 0x14005806c
xor edx, edx
mov rcx, r14
call fcn.140172050
test eax, eax
je 0x140058079
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor bl, bl
jmp 0x140058084
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov bl, 1
mov r8, qword [rbp - 0x30]
cmp r8, 0x10
jb 0x14005809e
inc r8
mov rdx, qword [rbp - 0x48]
lea rcx, [rbp - 0x48]
call fcn.140042b90
mov qword [rbp - 0x30], 0xf
mov qword [rbp - 0x38], r12
mov byte [rbp - 0x48], 0
mov r8, qword [rbp - 0x10]
cmp r8, 0x10
jb 0x1400580c8
inc r8
mov rdx, qword [rbp - 0x28]
lea rcx, [rbp - 0x28]
call fcn.140042b90
movzx eax, bl
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.14017e520
mov rbx, qword [rsp + 0x1d8]
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret