Function at 0x140004070
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x460
mov rax, qword [0x14006bbc0]
xor rax, rsp
mov qword [rsp + 0x450], rax
xor esi, esi
movsxd rbx, edx
mov rdi, rcx
lea rdx, [rbx + rcx + 0x16]
lea r12d, [rsi + 2]
lea rcx, [rsp + 0x40]
mov r8, r12
mov dword [rsp + 0x40], esi
call fcn.140025900
movsxd r8, dword [rsp + 0x40]
lea eax, [rbx + 2]
movsxd rcx, eax
lea rdx, [rcx + rdi + 0x16]
lea rcx, [rsp + 0x250]
call fcn.140025900
mov eax, dword [rsp + 0x40]
mov r13d, 0x200
cdq
lea r14, [0x14006e304]
sub eax, edx
sar eax, 1
movsxd rcx, eax
mov rax, qword [0x14006e308]
mov word [rsp + rcx*2 + 0x250], si
cmp word [rax + 0x1aa415], si
je 0x140004156
lea r8, str._r_n__UPDATE_GLOBAL_SETTING____r_n
lea rcx, [rsp + 0x50]
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.140003a10
mov eax, dword [0x14006b008]
mov r11, qword [0x14006e308]
mov dword [r11 + 0x1aa408], eax
mov rcx, qword [0x14006e308]
mov al, byte [0x14006b00c]
mov byte [rcx + 0x1aa40c], al
mov rcx, qword [0x14006e308]
movzx eax, word [0x14006b013]
mov word [rcx + 0x1aa413], ax
mov rcx, qword [0x14006e308]
movzx eax, word [0x14006b015]
mov word [rcx + 0x1aa415], ax
cmp word [0x14006b015], si
je 0x1400045cd
cmp qword [0x140097028], rsi
jne 0x1400045cd
xor r9d, r9d
lea rdi, [0x14006e0c0]
xor ecx, ecx
lea r8d, [r9 + 0x23]
mov rdx, rdi
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ebx, 0x100
lea r8, str.SiemensAutomationTraceEngine_
mov rdx, rbx
mov rcx, rdi
call fcn.140025ca8
lea r8, str.DispLog.log
mov rdx, rbx
mov rcx, rdi
call fcn.140025ca8
mov r9, qword [0x140097018]
mov qword [rsp + 0x30], rsi
mov edx, 0xc0000000
mov r8d, 3
mov rcx, rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x140097028], rax
cmp rax, 0xffffffffffffffff
jne 0x140004251
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x14006e300], eax
mov rax, qword [0x14006e308]
cmp word [rax + 0x1aa415], si
je 0x1400045cd
lea r8, str._r_n___Dispatcher_initialisiert_bzw._generiert_mit_folgendem_Leistungsprofil:____r_n
lea rcx, [rsp + 0x50]
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r11, qword [0x14006e308]
lea r8, str.______Ringpufferanzahl__entspricht_der_Anzahl_zul
movsx r9d, word [r11 + 0x1aa411]
lea rcx, [rsp + 0x50]
mov rdx, r13
dec r9d
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [0x14006e308]
lea r8, str.______Ringpufferl
mov r9d, dword [rax + 0x1aa40d]
lea rcx, [rsp + 0x50]
mov rdx, r13
mov dword [rsp + 0x20], 0x800
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, 0x10
lea r8, str.______Anzahl_m
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8, [0x1400572c0]
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8, [0x140057270]
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8, [0x140057220]
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r9d, [rbx - 8]
lea r8, [0x1400571d0]
lea rcx, [rsp + 0x50]
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, 0x400
lea r8, [0x140057198]
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov r8, rax
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8, str.______..._dabei_Anzahl_m
lea rcx, [rsp + 0x50]
mov r9d, ebx
mov rdx, r13
call fcn.1400253f4
mov rcx, qword [0x140097028]
mov r9d, r12d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x50]
call fcn.140025290
mov rcx, qword [0x140097028]
lea rdx, [rsp + 0x50]
mov r8, rax
mov r9, r14
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rbx, [0x1400715ac]
cmp word [rbx - 0x8a], si
je 0x14000460b
mov r9, qword [rbx]
mov rax, qword [rbx - 0x88]
mov ecx, dword [rax + 0x14]
cmp r9, rsi
je 0x14000460b
cmp ecx, esi
je 0x14000460b
mov rax, qword [0x14006e308]
mov edx, 3
movsx r8d, word [rax + 0x1aa415]
call qword [r9 + 0x20]
lea rax, [0x140091f2c]
add rbx, 0x2098
cmp rbx, rax
jl 0x1400045d4
mov edx, dword [0x140092414]
xor r9d, r9d
mov ecx, 0xffff
lea r8d, [r9 + 3]
call qword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.140025570
mov rbx, qword [rsp + 0x4a0]
add rsp, 0x460
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret