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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x640
mov rax, qword [0x14006bbc0]
xor rax, rsp
mov qword [rsp + 0x630], rax
xor r15d, r15d
movzx ebx, dx
lea rdx, [0x140096e10]
lea r8d, [r15 + 0x2b]
xor r9d, r9d
xor ecx, ecx
mov rsi, r15
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp eax, r15d
je 0x140001e62
lea ebp, [r15 + 1]
mov edi, 0x100
lea r8, [0x140096e10]
lea rcx, [rsp + 0x230]
mov rdx, rdi
mov dword [0x140097020], ebp
call fcn.140025d44
lea r8, str.SiemensAutomationTraceEngine_binTraceWriter_
lea rcx, [rsp + 0x230]
mov rdx, rdi
call fcn.140025ca8
movsx r12, bx
lea r13, [0x140000000]
imul r12, r12, 0x98
lea r14, [r12 + r13 + 0x6e4f8]
lea rcx, [rsp + 0x230]
mov r8, r14
mov rdx, rdi
call fcn.140025ca8
mov rax, qword [0x14006e308]
cmp word [rax + 0x1aa415], r15w
je 0x140001c20
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x430]
call fcn.140001a50
lea r9, [rsp + 0x430]
lea r8, str._r_n____TraceWriterDLL_soll_geladen_werden:__s_______r_n
lea rcx, [rsp + 0x30]
mov edx, 0x200
call fcn.1400253f4
mov rcx, qword [0x140097028]
lea r9d, [r15 + 2]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x30]
call fcn.140025290
mov rcx, qword [0x140097028]
lea r9, [0x14006e304]
lea rdx, [rsp + 0x30]
mov r8, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
movzx ebx, r15w
lea rax, [0x140092462]
movsx rdx, bx
mov rcx, r14
imul rdx, rdx, 0x130
add rdx, rax
call fcn.1400257cc
cmp eax, r15d
je 0x140001e42
add bx, bp
cmp bx, 8
jl 0x140001c24
movzx ebp, r15w
mov edi, 1
movsx rax, bp
imul rax, rax, 0x130
cmp qword [rax + r13 + 0x92562], r15
je 0x140001c7a
add bp, di
cmp bp, 8
jl 0x140001c5c
cmp bp, 8
je 0x140001e62
movsx r13, bp
lea rax, [0x140000000]
imul r13, r13, 0x130
lea rsi, [r13 + rax + 0x92562]
cmp qword [rsi], r15
jne 0x140001e3d
lea rcx, [rsp + 0x230]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rsi], rax
cmp rax, r15
je 0x140001e3d
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, r15d
jne 0x140001d81
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [0x140000000]
mov qword [rsi], r15
mov qword [rsi + 8], r15
mov qword [rsi + 0x10], r15
mov qword [rsi + 0x18], r15
mov qword [rsi + 0x20], r15
mov qword [rsi + 0x28], r15
mov dword [r12 + rcx + 0x6e4b4], r15d
mov rsi, r15
jmp 0x140001d88
lea rcx, [0x140000000]
movsx eax, bp
mov qword [r12 + rcx + 0x6e538], rsi
mov r8, r14
mov dword [r12 + rcx + 0x6e4b4], eax
lea rcx, [r13 + rcx + 0x92462]
mov edx, 0x80
call fcn.140025d44
mov r11, qword [0x14006e308]
cmp word [r11 + 0x1aa415], r15w
je 0x140001e62
lea rdx, [rsp + 0x230]
lea rcx, [rsp + 0x430]
call fcn.140001a50
lea r9, [rsp + 0x430]
lea r8, str._r_n_____TraceWriterDLL_geladen:__s_______r_n
lea rcx, [rsp + 0x30]
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 + 0x30]
call fcn.140025290
mov rcx, qword [0x140097028]
lea r9, [0x14006e304]
lea rdx, [rsp + 0x30]
mov r8, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140001e62
mov rsi, r15
jmp 0x140001e62
movsx eax, bx
movsx rsi, bx
mov dword [r12 + r13 + 0x6e4b4], eax
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 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret