Function at 0x140001e98
Capabilities:
Get common file path
Link many functions at runtime
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x640
mov rax, qword [0x14006bbc0]
xor rax, rsp
mov qword [rsp + 0x630], rax
xor r13d, r13d
mov r12, rcx
lea rdx, [0x140096e10]
lea r8d, [r13 + 0x2b]
xor r9d, r9d
xor ecx, ecx
mov rsi, r13
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp eax, r13d
je 0x140002137
lea edi, [r13 + 1]
mov ebx, 0x100
lea r8, [0x140096e10]
lea rcx, [rsp + 0x30]
mov rdx, rbx
mov dword [0x140097020], edi
call fcn.140025d44
lea r8, str.SiemensAutomationTraceEngine_binTraceWriter_
lea rcx, [rsp + 0x30]
mov rdx, rbx
call fcn.140025ca8
lea rcx, [rsp + 0x30]
mov r8, r12
mov rdx, rbx
call fcn.140025ca8
movzx ebx, r13w
lea rax, [0x140092462]
movsx rdx, bx
mov rcx, r12
imul rdx, rdx, 0x130
add rdx, rax
call fcn.1400257cc
cmp eax, r13d
je 0x140002122
add bx, di
cmp bx, 8
jl 0x140001f36
movzx ecx, r13w
lea r14, [0x140092460]
movsx rax, cx
imul rax, rax, 0x130
cmp qword [rax + r14 + 0x102], r13
je 0x140001f8e
add cx, di
cmp cx, 8
jl 0x140001f70
cmp cx, 8
je 0x140002137
movsx rbp, cx
imul rbp, rbp, 0x130
lea rsi, [r14 + rbp + 0x102]
cmp qword [rsi], r13
jne 0x14000211d
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsi], rax
cmp rax, r13
je 0x14000211d
lea rdx, str.TWOpenW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi]
lea rdx, str.TWWrite
mov qword [rsi + 8], rax
neg rax
sbb ebx, ebx
and ebx, edi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi]
mov qword [rsi + 0x10], rax
neg rax
lea rdx, str.TWWriteSyncPoint
sbb edi, edi
and edi, ebx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi]
mov qword [rsi + 0x18], rax
neg rax
lea rdx, str.TWCommand
sbb ebx, ebx
and ebx, edi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi]
mov qword [rsi + 0x20], rax
neg rax
lea rdx, str.TWClose
sbb edi, edi
and edi, ebx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x28], rax
neg rax
sbb eax, eax
and eax, edi
cmp eax, r13d
jne 0x14000207a
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rsi], r13
mov qword [rsi + 8], r13
mov qword [rsi + 0x10], r13
mov qword [rsi + 0x18], r13
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x28], r13
mov rsi, r13
lea rcx, [r14 + rbp + 2]
mov r8, r12
mov edx, 0x80
call fcn.140025d44
mov r11, qword [0x14006e308]
cmp word [r11 + 0x1aa415], r13w
je 0x140002137
lea rcx, [rsp + 0x430]
mov rdx, r12
call fcn.140001a50
lea r9, [rsp + 0x430]
lea r8, str._r_n_____Update_TraceWriterDLL_geladen:__s_______r_n
lea rcx, [rsp + 0x230]
mov edx, 0x200
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x230]
call fcn.140025290
mov rcx, qword [0x140097028]
lea r9, [0x14006e304]
lea rdx, [rsp + 0x230]
mov r8, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140002137
mov rsi, r13
jmp 0x140002137
movsx rsi, bx
lea rax, [0x140092562]
imul rsi, rsi, 0x130
add rsi, rax
mov rax, rsi
mov rcx, qword [rsp + 0x630]
xor rcx, rsp
call fcn.140025570
lea r11, [rsp + 0x640]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret