Function at 0x140004660
Capabilities:
Enumerate files on windows
Get common file path
Write file on windows

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xce0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov rax, qword [0x14006bbc0]
xor rax, rsp
mov qword [rsp + 0xcd0], rax
mov r15, rdx
mov qword [rsp + 0x50], rcx
or rsi, 0xffffffffffffffff
xor r13d, r13d
mov word [r11 - 0xa48], r13w
mov ebx, 0x1fe
mov r8, rbx
xor edx, edx
lea rcx, [r11 - 0xa46]
call fcn.140025190
mov word [rsp + 0x6d0], r13w
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x6d2]
call fcn.140025190
mov word [rsp + 0x4d0], r13w
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x4d2]
call fcn.140025190
xor r9d, r9d
lea r8d, [rsi + 0x24]
lea rdx, [rsp + 0xad0]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, 0x100
cmp eax, r13d
je 0x14000478d
lea r8, [rsp + 0xad0]
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025d44
lea r8, [rsp + 0xad0]
mov rdx, rdi
lea rcx, [rsp + 0x6d0]
call fcn.140025d44
lea r8, str.SiemensAutomationTraceEngineMetaTraceWriter_
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025ca8
lea r8, str.SiemensAutomationTraceEngineMetaTraceWriter_
mov rdx, rdi
lea rcx, [rsp + 0x6d0]
call fcn.140025ca8
lea r8, str..xml
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025ca8
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
cmp r14, rsi
je 0x140004a9a
lea r8, [rsp + 0x6d0]
mov rdx, rdi
lea rcx, [rsp + 0x4d0]
call fcn.140025d44
lea r8, [rsp + 0xac]
mov rdx, rdi
lea rcx, [rsp + 0x4d0]
call fcn.140025ca8
mov ecx, 0xd8
call fcn.140026454
mov qword [rsp + 0x30], rax
cmp rax, r13
je 0x140004800
mov rcx, rax
call fcn.14001be30
mov rbx, rax
jmp 0x140004803
mov rbx, r13
lea rdx, [rsp + 0x4d0]
mov rcx, rbx
call fcn.140020894
cmp eax, r13d
jne 0x140004a72
mov ecx, 0x38
call fcn.140026454
mov rdi, rax
mov qword [rsp + 0x30], rax
cmp rax, r13
je 0x14000485f
mov ecx, 8
call fcn.140026454
cmp rax, r13
je 0x140004847
mov qword [rax], rdi
jmp 0x14000484a
mov rax, r13
mov qword [rdi], rax
mov rcx, rdi
call fcn.140003700
mov qword [rdi + 0x28], rax
mov qword [rdi + 0x30], r13
jmp 0x140004862
mov rdi, r13
mov r8, rdi
lea rdx, str.TraceWriter
mov rcx, rbx
call fcn.14001ce90
mov rax, qword [rdi + 0x28]
mov rcx, qword [rax]
mov qword [rsp + 0x68], rcx
mov rax, qword [rdi]
mov qword [rsp + 0x60], rax
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm0
mov rbp, qword [rsp + 0x40]
mov r12, qword [rsp + 0x48]
mov r13, qword [rdi + 0x28]
xor eax, eax
cmp rbp, rax
je 0x1400048ad
cmp rbp, qword [rdi]
je 0x1400048b2
call fcn.1400263ec
cmp r12, r13
je 0x1400049d9
xor r13d, r13d
cmp rbp, r13
jne 0x1400048cd
call fcn.1400263ec
mov r11, r13
jmp 0x1400048d1
mov r11, qword [rbp]
cmp r12, qword [r11 + 0x28]
jne 0x1400048dc
call fcn.1400263ec
mov rcx, qword [r12 + 0x10]
cmp rcx, r13
je 0x1400049dc
lea rdx, [0x1400575c8]
call fcn.140019a88
cmp rax, r13
je 0x140004938
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call fcn.1400257cc
cmp eax, r13d
je 0x140004a1e
cmp rbp, r13
jne 0x140004920
call fcn.1400263ec
mov r11, r13
jmp 0x140004924
mov r11, qword [rbp]
cmp r12, qword [r11 + 0x28]
jne 0x14000492f
call fcn.1400263ec
mov r12, qword [r12]
jmp 0x14000489d
lea r8, str._r_n__________inkompatibles_XML_File:_TraceWriter_Attribut_ID_nicht_vorhanden__________r_n
mov edx, 0x200
lea rcx, [rsp + 0x8d0]
call fcn.1400253f4
mov r11, qword [0x14006e308]
cmp word [r11 + 0x1aa415], r13w
je 0x1400049ab
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x140097028]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x8d0]
call fcn.140025290
mov r8, rax
mov qword [rsp + 0x20], r13
lea r9, [0x14006e304]
lea rdx, [rsp + 0x8d0]
mov rcx, qword [0x140097028]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 1
lea r8d, [rcx + 1]
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x8d0]
mov qword [rsp + 0x20], rax
lea r9, str.SearchTraceWriterXMLFile
mov edx, 0xc0001027
call fcn.140002ac0
jmp 0x1400049dc
xor r13d, r13d
cmp rbx, r13
je 0x1400049f1
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
mov edx, 1
mov rcx, rdi
call fcn.140003994
lea rdx, [rsp + 0x80]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, r13d
je 0x140004a5d
mov edi, 0x100
jmp 0x1400047a6
lea r8, [rsp + 0x4d0]
mov edx, 0x100
mov rcx, r15
call fcn.140025d44
mov esi, r13d
cmp rbx, r13
je 0x140004a4b
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
mov edx, 1
mov rcx, rdi
call fcn.140003994
jmp 0x140004e6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x140004a95
mov esi, 0xffffffcc
jmp 0x140004e6b
mov esi, 0xffffffca
cmp rbx, r13
je 0x140004e6b
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
jmp 0x140004e6b
mov edi, 0x100
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, 0x200
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x2d0]
call fcn.140025190
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x6d0]
call fcn.140025190
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x4d0]
call fcn.140025190
xor r9d, r9d
lea r8d, [r9 + 0x2b]
lea rbx, [0x140096e10]
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp eax, r13d
je 0x140004b71
mov dword [0x140097020], 1
mov r8, rbx
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025d44
mov r8, rbx
mov rdx, rdi
lea rcx, [rsp + 0x6d0]
call fcn.140025d44
lea r8, str.SiemensAutomationTraceEngineMetaTraceWriter_
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025ca8
lea r8, str.SiemensAutomationTraceEngineMetaTraceWriter_
mov rdx, rdi
lea rcx, [rsp + 0x6d0]
call fcn.140025ca8
lea r8, str..xml
mov rdx, rdi
lea rcx, [rsp + 0x2d0]
call fcn.140025ca8
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x2d0]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
cmp r14, rsi
je 0x140004e6b
lea r8, [rsp + 0x6d0]
mov rdx, rdi
lea rcx, [rsp + 0x4d0]
call fcn.140025d44
lea r8, [rsp + 0xac]
mov rdx, rdi
lea rcx, [rsp + 0x4d0]
call fcn.140025ca8
mov ecx, 0xd8
call fcn.140026454
mov qword [rsp + 0x30], rax
cmp rax, r13
je 0x140004be4
mov rcx, rax
call fcn.14001be30
mov rbx, rax
jmp 0x140004be7
mov rbx, r13
lea rdx, [rsp + 0x4d0]
mov rcx, rbx
call fcn.140020894
cmp eax, r13d
jne 0x140004e51
mov ecx, 0x38
call fcn.140026454
mov rdi, rax
mov qword [rsp + 0x30], rax
cmp rax, r13
je 0x140004c43
mov ecx, 8
call fcn.140026454
cmp rax, r13
je 0x140004c2b
mov qword [rax], rdi
jmp 0x140004c2e
mov rax, r13
mov qword [rdi], rax
mov rcx, rdi
call fcn.140003700
mov qword [rdi + 0x28], rax
mov qword [rdi + 0x30], r13
jmp 0x140004c46
mov rdi, r13
mov r8, rdi
lea rdx, str.TraceWriter
mov rcx, rbx
call fcn.14001ce90
mov rax, qword [rdi + 0x28]
mov rcx, qword [rax]
mov qword [rsp + 0x68], rcx
mov rax, qword [rdi]
mov qword [rsp + 0x60], rax
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm0
mov rbp, qword [rsp + 0x40]
mov r12, qword [rsp + 0x48]
mov r13, qword [rdi + 0x28]
xor eax, eax
cmp rbp, rax
je 0x140004c91
cmp rbp, qword [rdi]
je 0x140004c96
call fcn.1400263ec
cmp r12, r13
je 0x140004dbd
xor r13d, r13d
cmp rbp, r13
jne 0x140004cb1
call fcn.1400263ec
mov r11, r13
jmp 0x140004cb5
mov r11, qword [rbp]
cmp r12, qword [r11 + 0x28]
jne 0x140004cc0
call fcn.1400263ec
mov rcx, qword [r12 + 0x10]
cmp rcx, r13
je 0x140004dc0
lea rdx, [0x1400575c8]
call fcn.140019a88
cmp rax, r13
je 0x140004d1c
mov rdx, rax
mov rcx, qword [rsp + 0x50]
call fcn.1400257cc
cmp eax, r13d
je 0x140004e02
cmp rbp, r13
jne 0x140004d04
call fcn.1400263ec
mov r11, r13
jmp 0x140004d08
mov r11, qword [rbp]
cmp r12, qword [r11 + 0x28]
jne 0x140004d13
call fcn.1400263ec
mov r12, qword [r12]
jmp 0x140004c81
lea r8, str._r_n__________inkompatibles_XML_File:_TraceWriter_Attribut_ID_nicht_vorhanden__________r_n
mov edx, 0x200
lea rcx, [rsp + 0x8d0]
call fcn.1400253f4
mov r11, qword [0x14006e308]
cmp word [r11 + 0x1aa415], r13w
je 0x140004d8f
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, qword [0x140097028]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x8d0]
call fcn.140025290
mov r8, rax
mov qword [rsp + 0x20], r13
lea r9, [0x14006e304]
lea rdx, [rsp + 0x8d0]
mov rcx, qword [0x140097028]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, 1
lea r8d, [rcx + 1]
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x8d0]
mov qword [rsp + 0x20], rax
lea r9, str.SearchTraceWriterXMLFile
mov edx, 0xc0001027
call fcn.140002ac0
jmp 0x140004dc0
xor r13d, r13d
cmp rbx, r13
je 0x140004dd5
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
mov edx, 1
mov rcx, rdi
call fcn.140003994
lea rdx, [rsp + 0x80]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
cmp eax, r13d
je 0x140004e3e
mov edi, 0x100
jmp 0x140004b8a
lea r8, [rsp + 0x4d0]
mov edx, 0x100
mov rcx, r15
call fcn.140025d44
mov esi, r13d
mov edx, 1
mov rcx, rdi
call fcn.140003994
cmp rbx, r13
je 0x140004e6b
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
jmp 0x140004e6b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xffffffcc
cmp eax, 0x12
cmovne esi, ecx
jmp 0x140004e6b
mov esi, 0xffffffca
cmp rbx, r13
je 0x140004e6b
mov rcx, rbx
call fcn.140017e2c
mov rcx, rbx
call fcn.140024990
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
mov rcx, qword [rsp + 0xcd0]
xor rcx, rsp
call fcn.140025570
mov rbx, qword [rsp + 0xd30]
add rsp, 0xce0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret