Function at 0x140001740
Capabilities:
Get common file path
Set current directory

Disassembly:
mov rax, rsp
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x518]
sub rsp, 0x5e0
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov ebx, edx
mov r13, rcx
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov qword [0x14005e048], r13
lea rdx, [rsp + 0x70]
mov rcx, rax
call qword [sym.imp.USER32.dll_GetClientRect]
movd xmm2, dword [rsp + 0x7c]
cvtdq2pd xmm2, xmm2
movd xmm3, dword [rsp + 0x78]
cvtdq2pd xmm3, xmm3
movaps xmm0, xmm2
mulsd xmm0, qword [0x14004c218]
cvttsd2si r8d, xmm0
movaps xmm0, xmm3
mulsd xmm0, qword [0x14004c218]
cvttsd2si edx, xmm0
mulsd xmm2, qword [0x14004c210]
cvttsd2si ecx, xmm2
mulsd xmm3, qword [0x14004c210]
cvttsd2si eax, xmm3
xor edi, edi
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], r8d
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], eax
mov r9d, 0xcf0000
lea r8, [0x14005db80]
lea rdx, [0x14005dbf0]
xor ecx, ecx
call qword [sym.imp.USER32.dll_CreateWindowExA]
mov r12, rax
mov qword [rbp + 0x530], rax
test rax, rax
je 0x140001a2a
mov qword [0x14005e438], rax
mov r8d, 0x104
lea rdx, [rbp + 0xa0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rbp + 0xa0]
or r14, 0xffffffffffffffff
mov rax, r14
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], dil
jne 0x140001860
movsxd rcx, eax
test eax, eax
jle 0x140001898
movzx edx, byte [rbp + rcx + 0xa0]
cmp dl, 0x5c
je 0x14000188e
cmp dl, 0x2f
je 0x14000188e
dec eax
dec rcx
test rcx, rcx
jg 0x140001870
jmp 0x140001898
cdqe
mov byte [rbp + rax + 0xa0], dil
lea rcx, [rbp + 0xa0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rdx, [rbp + 0x1b0]
mov esi, 0x103
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [rbp + 0x1b0]
call fcn.140001360
mov rcx, rax
mov qword [0x14005e548], rax
test rax, rax
jne 0x14000190a
lea edx, [rsi + 1]
lea rcx, [rbp + 0x1b0]
call fcn.140001520
test al, al
je 0x140001a0e
lea rcx, [rbp + 0x1b0]
call fcn.140001360
mov rcx, rax
mov qword [0x14005e548], rax
test rax, rax
je 0x140001d84
mov rax, qword [rcx]
lea rdx, [rbp + 0x1b0]
call qword [rax + 0x38]
mov rcx, qword [0x14005e548]
mov rax, qword [rcx]
lea rdx, [0x14005e440]
call qword [rax + 0x40]
mov byte [rbp - 0x70], dil
movzx r10d, byte [0x14005dc60]
test r10b, r10b
je 0x140001ae0
lea rbx, [0x14005dc60]
mov rdx, r14
nop word [rax + rax]
inc rdx
cmp byte [rbx + rdx], dil
jne 0x140001950
mov r8d, edi
movsxd r15, edx
test edx, edx
jle 0x1400019a3
mov rcx, rdi
nop word [rax + rax]
movzx r9d, byte [rcx + rbx]
cmp r9b, 0x3a
je 0x140001a55
lea eax, [rdx - 1]
cmp r8d, eax
jge 0x140001998
cmp r9b, 0x5c
jne 0x140001998
cmp byte [rcx + rbx + 1], r9b
je 0x140001a55
inc r8d
inc rcx
cmp rcx, r15
jl 0x140001970
mov r12d, 2
cmp r10b, 0x2e
cmovne r12d, edi
lea r13, [0x14005e050]
mov rdx, r13
mov ecx, 0x3e7
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov rdi, r14
nop dword [rax]
inc rdi
cmp byte [rdi + r13], 0
jne 0x1400019d0
movsxd rax, edi
mov byte [rax + r13], 0x5c
inc edi
mov r13d, r12d
cmp r12, r15
jge 0x140001a31
lea rdx, [r12 + rbx]
lea rbx, [0x14005e050]
lea rcx, [rbx + 1]
add rcx, rax
sub r15, r12
mov r8, r15
call fcn.140004bb0
add r13d, r15d
jmp 0x140001a38
mov r9d, 0x10
lea r8, str.Quest3D_Viewers_registry_key_not_found
lea rdx, str.It_seems_that_Quest3D_is_not_correctly_installed__or_this_viewer_is_run_from_the_wrong_directory.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x140001dc3
lea rbx, [0x14005e050]
sub edi, r12d
lea eax, [rdi + r13]
cdqe
mov byte [rax + rbx], 0
mov r12, qword [rbp + 0x530]
mov r13, qword [rbp + 0x520]
xor edi, edi
mov r8d, 0x104
mov rdx, rbx
lea rcx, [rbp - 0x70]
call fcn.14000f3d0
cmp byte [rbp - 0x70], 0x22
je 0x140001a73
cmp byte [rbp - 0x6f], 0x22
jne 0x140001ac7
lea rax, [rbp - 0x70]
nop word [rax + rax]
inc r14
cmp byte [rax + r14], 0
jne 0x140001a80
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp - 0x70]
call fcn.140005010
test r14d, r14d
je 0x140001abf
lea rax, [rbp - 0x70]
mov edx, r14d
movzx ecx, byte [rbx]
cmp cl, 0x22
je 0x140001ab6
mov byte [rax], cl
inc edi
inc rax
inc rbx
sub rdx, 1
jne 0x140001aa7
movsxd rax, edi
mov byte [rbp + rax - 0x70], 0
mov rcx, qword [0x14005e548]
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
call qword [rax + 0x20]
xor edi, edi
nop word [rax + rax]
mov rcx, qword [0x14005e548]
mov rax, qword [rcx]
mov r9, r12
lea r8, [0x14005dbf0]
mov rdx, r13
call qword [rax + 0x10]
movups xmm0, xmmword [0x14004bf18]
movaps xmmword [rsp + 0x60], xmm0
mov rax, qword [sym.imp.HighPoly.dll_class_EngineInterface____ptr64___ptr64_globalEngine]
mov rcx, qword [rax]
mov rax, qword [rcx]
lea r8, str.COMMANDLINE
lea rdx, [rsp + 0x60]
call qword [rax + 0x90]
test rax, rax
je 0x140001b3b
mov r8, qword [rax]
lea rdx, [rbp - 0x70]
mov rcx, rax
call qword [r8 + 0xa8]
cmp byte [0x14005dbe4], 0
je 0x140001b8f
movups xmm0, xmmword [0x14004bef8]
movaps xmmword [rsp + 0x60], xmm0
mov rcx, qword [0x14005e548]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov r9, qword [rax]
lea r8, str.InActiveX
lea rdx, [rsp + 0x60]
mov rcx, rax
call qword [r9 + 0x90]
test rax, rax
je 0x140001b8f
mov rdx, qword [rax]
movss xmm1, dword [0x14004c208]
mov rcx, rax
call qword [rdx + 0xb0]
mov ecx, 0x18
call fcn.140003124
mov rbx, rax
mov qword [rbp + 0x520], rax
test rax, rax
je 0x140001bbd
mov rcx, rax
call qword [sym.imp.HighPoly.dll_public:_void___cdecl_A3dFileLoader::constructor_void____ptr64]
lea rax, vtable.A3dFileLoader.0
mov qword [rbx], rax
jmp 0x140001bc0
mov rbx, rdi
mov rax, qword [sym.imp.HighPoly.dll_class_EngineInterface____ptr64___ptr64_globalEngine]
mov rcx, qword [rax]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r8, rsi
lea rdx, [rbp + 0x2c0]
lea rcx, [rbp + 0x2c0]
sub rax, rcx
lea rcx, [r8 + 0x7ffffefb]
test rcx, rcx
je 0x140001c03
movzx ecx, byte [rax + rdx]
test cl, cl
je 0x140001c03
mov byte [rdx], cl
inc rdx
sub r8, 1
jne 0x140001be4
lea rax, [rdx - 1]
test r8, r8
cmovne rax, rdx
mov byte [rax], 0
mov rcx, rsi
lea rax, [rbp + 0x2c0]
nop dword [rax + rax]
cmp byte [rax], 0
je 0x140001c2e
inc rax
sub rcx, 1
jne 0x140001c20
mov rax, rsi
sub rax, rcx
mov r8, rdi
test rcx, rcx
cmovne r8, rax
je 0x140001c93
mov rdx, rsi
sub rdx, r8
lea rcx, [rbp + 0x2c0]
lea rcx, [rcx + r8]
je 0x140001c85
lea rax, [r8 + 0x7ffffefb]
add rax, rdx
lea r9, str.monitor.txt
sub r9, rcx
test rax, rax
je 0x140001c85
movzx r8d, byte [r9 + rcx]
test r8b, r8b
je 0x140001c85
mov byte [rcx], r8b
inc rcx
dec rax
sub rdx, 1
jne 0x140001c67
lea rax, [rcx - 1]
test rdx, rdx
cmovne rax, rcx
mov byte [rax], 0
lea rdx, [rbp + 0x2c0]
mov rcx, rbx
call qword [sym.imp.HighPoly.dll_public:_bool___cdecl_A3dFileLoader::LoadFile_char_const____ptr64____ptr64]
test al, al
je 0x140001d00
lea rdx, str.LREC
mov rcx, rbx
call qword [sym.imp.HighPoly.dll_public:_bool___cdecl_A3dFileLoader::GetInfoIfTag_char__const___ptr64____ptr64]
test al, al
je 0x140001d00
lea rdx, [0x14005d008]
mov rcx, rbx
call qword [sym.imp.HighPoly.dll_public:_void___cdecl_A3dFileLoader::CopyTagDataToPointer_void____ptr64____ptr64]
mov eax, dword [0x14005d014]
mov r8d, dword [0x14005d00c]
sub eax, r8d
mov r9d, dword [0x14005d010]
mov edx, dword [0x14005d008]
sub r9d, edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], eax
mov rcx, qword [0x14005e438]
call qword [sym.imp.USER32.dll_MoveWindow]
test rbx, rbx
je 0x140001d12
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
lea rcx, [rbp + 0x3d0]
lea rdx, str..ArchitectEditionStartGroup.cgr
lea rax, [rbp + 0x3d0]
sub rdx, rax
nop word [rax + rax]
lea rax, [rsi + 0x7ffffefb]
test rax, rax
je 0x140001d4f
movzx eax, byte [rdx + rcx]
test al, al
je 0x140001d4f
mov byte [rcx], al
inc rcx
sub rsi, 1
jne 0x140001d30
lea rax, [rcx - 1]
test rsi, rsi
cmovne rax, rcx
mov byte [rax], 0
mov rcx, qword [0x14005e548]
mov rax, qword [rcx]
call qword [rax + 0x28]
mov r9, qword [rax]
xor r8d, r8d
lea rdx, [rbp + 0x3d0]
mov rcx, rax
call qword [r9 + 0x60]
mov ebx, dword [rbp + 0x528]
mov rcx, r12
cmp byte [0x14005dbe4], 0
jne 0x140001da6
or ebx, 3
mov edx, ebx
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, r12
call qword [sym.imp.USER32.dll_UpdateWindow]
jmp 0x140001dbe
mov edx, 0xffffffeb
mov r8d, 0x1e97
call qword [sym.imp.USER32.dll_SetWindowLongPtrA]
mov byte [0x14005dbe5], 1
mov eax, 1
mov rbx, qword [rsp + 0x638]
add rsp, 0x5e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret