Function at 0x140021de8
Capabilities:
Check os version

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r15
sub rsp, 0x490
mov rax, qword [0x14006bbc0]
xor rax, rsp
mov qword [rsp + 0x480], rax
xor esi, esi
mov rbx, rcx
cmp qword [0x1400991e8], rsi
jne 0x140021e28
call fcn.140020cfc
lea rcx, [0x140098da0]
mov dword [0x14006b800], esi
mov dword [0x1400975a4], 2
mov dword [0x1400975a0], esi
mov dword [0x1400975a8], 4
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov rcx, qword [0x140098da0]
cmp eax, esi
mov ebp, 1
cmove rcx, rbp
mov dword [rsp + 0xb0], 0x94
mov qword [0x140098da0], rcx
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp eax, esi
je 0x140021eac
cmp dword [rsp + 0xc0], 2
jne 0x140021eac
mov eax, dword [0x1400991dc]
cmp dword [rsp + 0xb4], 5
cmovae eax, ebp
mov dword [0x1400991dc], eax
lea rax, [0x1400978d0]
lea r12, [0x140097bf0]
mov qword [rax - 0x320], rsi
mov qword [rax], rsi
mov qword [rax + 0x320], rsi
mov qword [rax + 0x640], rsi
add rax, 8
cmp rax, r12
jl 0x140021eba
mov edi, 0x104
lea rcx, [rsp + 0x260]
xor edx, edx
mov r8, rdi
call fcn.140025190
lea rcx, [rsp + 0x370]
mov r8, rdi
xor edx, edx
call fcn.140025190
lea rcx, str.TrcParams
call fcn.140021034
mov r15d, 6
cmp eax, esi
je 0x140022367
lea rdx, [rsp + 0x150]
lea rcx, str.Consult
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140021f4c
lea rcx, [rsp + 0x150]
call fcn.14002c5f4
mov dword [0x1400975a0], eax
lea rdx, [rsp + 0x150]
lea rcx, str.FctName
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140021f7e
lea r8, [0x1400986c0]
lea rcx, [rsp + 0x150]
mov rdx, r12
call fcn.140021b4c
lea rdx, [rsp + 0x150]
lea rcx, str.Format
mov r8d, edi
call fcn.1400210d4
mov r12d, 3
cmp eax, esi
je 0x140022004
lea rdx, str.SHORT
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x140021fbf
mov dword [0x1400975a4], ebp
jmp 0x140022004
lea rdx, str.TIME
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x140021fe0
mov dword [0x1400975a4], r12d
jmp 0x140022004
lea rdx, str.TEXT
lea rcx, [rsp + 0x150]
call fcn.14002ca80
neg eax
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 4
mov dword [0x1400975a4], ecx
lea rdx, [rsp + 0x150]
lea rcx, str.Level
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140022075
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x150]
xor r8d, r8d
call fcn.14002c904
mov rcx, qword [0x1400991c0]
mov dword [0x14006b800], eax
cmp rcx, rsi
je 0x140022075
lea rdx, [rsp + 0x150]
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140022075
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x150]
xor r8d, r8d
call fcn.14002c904
mov dword [0x1400991b8], eax
lea rdx, [rsp + 0x150]
lea rcx, str.Module
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x1400220ab
lea r8, [0x1400985c0]
lea rdx, [0x1400978d0]
lea rcx, [rsp + 0x150]
call fcn.140021b4c
lea rdx, [rsp + 0x150]
lea rcx, str.String
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x1400220e1
lea r8, [0x1400987c0]
lea rdx, [0x140097f10]
lea rcx, [rsp + 0x150]
call fcn.140021b4c
lea rdx, [rsp + 0x150]
lea rcx, str.TraceId
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140022117
lea r8, [0x1400984c0]
lea rdx, [0x1400975b0]
lea rcx, [rsp + 0x150]
call fcn.140021b4c
lea rdx, [rsp + 0x150]
lea rcx, str.Output
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140022362
lea rdx, [0x14005a4d4]
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x140022159
mov dword [0x1400975a8], esi
jmp 0x140022362
lea rdx, str.COM1
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x14002217c
mov dword [0x1400975a8], ebp
jmp 0x140022362
lea rdx, str.COM2
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x1400221a3
mov dword [0x1400975a8], 2
jmp 0x140022362
lea rdx, str.PIPE
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x1400221c7
mov dword [0x1400975a8], r12d
jmp 0x140022362
lea rdx, [0x14005a4b8]
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x140022235
lea rdx, [rsp + 0x150]
lea rcx, str.sm_size
mov r8d, edi
mov dword [0x1400975a8], 5
call fcn.1400210d4
cmp eax, esi
je 0x140022362
lea rcx, [rsp + 0x150]
call fcn.14002c5d8
cmp eax, esi
jle 0x140022362
lea rcx, [rsp + 0x150]
call fcn.14002c5d8
mov dword [0x14006ba18], eax
jmp 0x140022362
lea rdx, str.FILE
lea rcx, [rsp + 0x150]
call fcn.14002ca80
cmp eax, esi
jne 0x14002233c
lea rdx, [rsp + 0x150]
lea rcx, str.Byte_File
mov r8d, edi
mov dword [0x1400975a8], 4
call fcn.1400210d4
cmp eax, esi
je 0x14002229a
lea rcx, [rsp + 0x150]
call fcn.14002c5d8
cmp eax, esi
jle 0x14002229a
lea rcx, [rsp + 0x150]
call fcn.14002c5d8
mov dword [0x14006b804], eax
lea rdx, [rsp + 0x150]
lea rcx, str.Path
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x1400222cd
lea r8, [rsp + 0x150]
lea rcx, [rsp + 0x370]
mov rdx, rdi
call fcn.140025c34
lea rdx, [rsp + 0x150]
lea rcx, str.FileName
mov r8d, edi
call fcn.1400210d4
cmp eax, esi
je 0x140022300
lea r8, [rsp + 0x150]
lea rcx, [rsp + 0x260]
mov rdx, rdi
call fcn.140025c34
cmp byte [rsp + 0x260], sil
mov ecx, esi
mov eax, esi
setne cl
cmp byte [rsp + 0x370], sil
setne al
or ecx, eax
je 0x140022362
lea r8, str.C:TMPS7FILE
lea rdx, [rsp + 0x260]
lea rcx, [rsp + 0x370]
call fcn.140021b8c
jmp 0x140022362
lea rdx, [0x14005a478]
lea rcx, [rsp + 0x150]
call fcn.14002ca80
mov ecx, dword [0x1400975a8]
cmp eax, esi
cmove ecx, r15d
mov dword [0x1400975a8], ecx
call fcn.140021124
mov eax, dword [0x1400975a8]
cmp eax, esi
je 0x1400224d8
jle 0x140022393
cmp eax, 2
jle 0x14002252c
cmp eax, 4
je 0x1400223bc
cmp eax, 5
je 0x14002239f
cmp eax, r15d
je 0x14002252c
lea rcx, str.Fehler_im_STEP7_Tracesystem__bitte_wenden_Sie_sich_an_den_Hersteller__
jmp 0x140022527
call fcn.140020fe0
mov ecx, dword [0x14006ba18]
mov rdx, rbx
call fcn.140020d7c
call fcn.140021018
jmp 0x14002252c
call fcn.140020fe0
or rbx, 0xffffffffffffffff
mov r12d, 0x100
lea r9, str.C:TMPS7FILE
lea r8, str._s_d.TRC
lea rcx, [0x140098250]
mov rdx, r12
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x40], ebx
mov edi, ebx
mov dword [rsp + 0x20], ebp
call fcn.1400253f4
lea r9d, [rbx + 0x21]
lea rdx, [0x140098250]
lea rcx, [rsp + 0x44]
xor r8d, r8d
mov dword [rsp + 0x20], r12d
call fcn.14002c5a4
mov ecx, dword [rsp + 0x44]
cmp ecx, esi
jl 0x140022430
lea rdx, [rsp + 0x50]
call fcn.14002b6f8
mov ecx, dword [rsp + 0x44]
mov ebx, eax
call fcn.14002b5e0
lea r9, str.C:TMPS7FILE
lea r8, str._s_d.TRC
lea rcx, [0x140098ca0]
mov rdx, r12
mov dword [rsp + 0x20], 2
call fcn.1400253f4
lea rdx, [0x140098ca0]
lea rcx, [rsp + 0x40]
mov r9d, 0x20
xor r8d, r8d
mov dword [rsp + 0x20], r12d
call fcn.14002c5a4
mov ecx, dword [rsp + 0x40]
cmp ecx, esi
jl 0x140022494
lea rdx, [rsp + 0x80]
call fcn.14002b6f8
mov ecx, dword [rsp + 0x40]
mov edi, eax
call fcn.14002b5e0
cmp ebx, esi
jne 0x1400224bb
cmp edi, esi
jne 0x1400224cd
mov rax, qword [rsp + 0xa0]
mov ecx, esi
cmp qword [rsp + 0x70], rax
setl cl
add ecx, ebp
mov dword [0x14006b808], ecx
jmp 0x1400223b2
mov dword [0x14006b808], 2
cmp edi, esi
je 0x1400223b2
mov dword [0x14006b808], ebp
jmp 0x1400223b2
mov qword [rsp + 0x30], rsi
lea rcx, str..S7ONLINX.VXD
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x28], 0x4000000
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_CreateFileA]
or rbx, 0xffffffffffffffff
mov qword [0x1400991c8], rax
cmp rax, rbx
jne 0x14002252c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Unable_to_open_VxD__device_does_not_support_DeviceIOCTL
cmp eax, 0x32
je 0x140022527
lea rcx, str.Unable_to_open_VxD__got_error_code__
call fcn.140021c48
mov dword [0x1400991bc], ebp
cmp dword [0x1400975a0], esi
je 0x140022546
lea rcx, [0x140098240]
call fcn.1400290ec
mov rcx, qword [rsp + 0x480]
xor rcx, rsp
call fcn.140025570
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r12
pop rdi
ret