Function at 0x140058100
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0x4490]
mov eax, 0x4590
call fcn.14017ef00
sub rsp, rax
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x45c0], rbx
mov qword [rsp + 0x45c8], rsi
mov rax, qword [0x14035b190]
xor rax, rsp
mov qword [rbp + 0x4480], rax
mov rbx, rcx
mov qword [rbp - 0x50], 7
xor r14d, r14d
mov qword [rbp - 0x58], r14
mov word [rbp - 0x68], r14w
cmp word [rdx], r14w
jne 0x140058166
mov r8d, r14d
jmp 0x14005817a
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], r14w
jne 0x140058170
lea rcx, [rbp - 0x68]
call fcn.1400367c0
nop
lea rcx, [rbp - 0x30]
call fcn.140173100
lea rdx, [rbp - 0x30]
mov rcx, rbx
call fcn.140170200
mov rdi, rax
test rax, rax
je 0x1400584d0
lea rdx, [rbp - 0x48]
mov rcx, rax
call fcn.1401700a0
test eax, eax
jne 0x1400584d0
cmp qword [rbp - 0x58], 0
sete cl
test cl, cl
jne 0x1400584d0
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r14
mov word [rsp + 0x58], r14w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x58]
call fcn.140036910
nop
lea rcx, [rsp + 0x58]
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x70]
cmp r8, 8
cmovae rcx, rdx
mov rax, qword [rsp + 0x68]
lea r9, [rax + rax]
cmp word [r9 + rcx - 2], 0x2f
je 0x140058245
lea rax, [rsp + 0x58]
cmp r8, 8
cmovae rax, rdx
cmp word [r9 + rax - 2], 0x5c
je 0x140058245
mov edx, 1
lea r8d, [rdx + 0x5b]
lea rcx, [rsp + 0x58]
call fcn.140041cf0
lea rcx, [rsp + 0x58]
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
jne 0x140058269
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.AdskRcFileSystemUtility.dll_bool___cdecl_Autodesk::RealityComputing::Utility::Filesystem::createDirectory_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64__bool_]
test al, al
je 0x140058487
mov rsi, r14
cmp qword [rbp - 0x48], r14
jbe 0x140058493
nop word [rax + rax]
xor edx, edx
mov r8d, 0x411
lea rcx, [rbp + 0x60]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
mov r9d, 0x411
lea r8, [rbp + 0x60]
lea rdx, [rbp + 0x10]
mov rcx, rdi
call fcn.14016ffa0
test eax, eax
jne 0x140058487
lea rdx, [rbp + 0x60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.AdskRcCommon.dll_public:_void___cdecl_Autodesk::RealityComputing::Common::RCString::constructor_char_const____ptr64____ptr64]
nop
mov rcx, rax
call qword [sym.imp.AdskRcCommon.dll_public:_wchar_t_const____ptr64___cdecl_Autodesk::RealityComputing::Common::RCString::w_str_void_const___ptr64]
mov r8, rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x78]
call fcn.1400370c0
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.AdskRcCommon.dll_public:_void___cdecl_Autodesk::RealityComputing::Common::RCString::destructor_void____ptr64]
lea rcx, [rsp + 0x78]
mov rdx, qword [rsp + 0x78]
mov r8, qword [rbp - 0x70]
cmp r8, 8
cmovae rcx, rdx
mov rax, qword [rbp - 0x78]
lea r9, [rax + rax]
cmp word [r9 + rcx - 2], 0x2f
je 0x1400583cf
lea rax, [rsp + 0x78]
cmp r8, 8
cmovae rax, rdx
cmp word [r9 + rax - 2], 0x5c
je 0x1400583cf
mov rcx, rdi
call fcn.140170260
test eax, eax
jne 0x14005845e
lea rdx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rdx, qword [rsp + 0x78]
lea r8, [0x14028ee68]
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
test eax, eax
jne 0x140058456
nop dword [rax]
mov r8d, 0x4000
lea rdx, [rbp + 0x480]
mov rcx, rdi
call fcn.140170920
movsxd rbx, eax
test eax, eax
je 0x1400583c2
mov r9, qword [rsp + 0x50]
mov r8, rbx
mov edx, 1
lea rcx, [rbp + 0x480]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, rbx
sete al
test al, al
je 0x140058439
jmp 0x140058380
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x1400583ef
lea rcx, [rsp + 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
jne 0x1400583ef
xor edx, edx
lea rcx, [rsp + 0x78]
call qword [sym.imp.AdskRcFileSystemUtility.dll_bool___cdecl_Autodesk::RealityComputing::Utility::Filesystem::createDirectory_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const____ptr64__bool_]
test al, al
je 0x14005845e
mov rcx, rdi
call fcn.14016fee0
mov rax, qword [rbp - 0x48]
dec rax
cmp rsi, rax
jae 0x14005840f
mov rcx, rdi
call fcn.140170140
test eax, eax
jne 0x14005845e
mov r8, qword [rbp - 0x70]
cmp r8, 8
jb 0x14005842b
inc r8
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x78]
call fcn.140037050
inc rsi
cmp rsi, qword [rbp - 0x48]
jae 0x140058493
jmp 0x140058280
mov rcx, rdi
call fcn.14016fee0
mov rcx, rdi
call fcn.14016fe90
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140058467
mov rcx, rdi
call fcn.14016fee0
mov rcx, rdi
call fcn.14016fe90
nop
mov r8, qword [rbp - 0x70]
cmp r8, 8
jb 0x140058483
inc r8
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x78]
call fcn.140037050
xor bl, bl
jmp 0x14005849d
mov rcx, rdi
call fcn.14016fe90
xor bl, bl
jmp 0x14005849d
mov rcx, rdi
call fcn.14016fe90
mov bl, 1
mov r8, qword [rsp + 0x70]
cmp r8, 8
jb 0x1400584ba
inc r8
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x58]
call fcn.140037050
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r14
mov word [rsp + 0x58], r14w
jmp 0x1400584d2
xor bl, bl
mov r8, qword [rbp - 0x50]
cmp r8, 8
jb 0x1400584ec
inc r8
mov rdx, qword [rbp - 0x68]
lea rcx, [rbp - 0x68]
call fcn.140037050
movzx eax, bl
mov rcx, qword [rbp + 0x4480]
xor rcx, rsp
call fcn.14017e520
lea r11, [rsp + 0x4590]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret