Function at 0x140006a5c
Capabilities:
Check os version
Get common file path
Set current directory

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r12
sub rsp, 0x630
test r8, r8
mov rdi, r9
mov rbx, r8
mov rsi, rdx
mov r12d, 1
je 0x140006abd
lea rdx, str.none
mov rcx, rbx
call fcn.14000b950
test eax, eax
jne 0x140006aaa
mov dword [0x140029510], 3
jmp 0x140006b3a
lea rdx, str.info
mov rcx, rbx
call fcn.14000b950
test eax, eax
jne 0x140006ac6
and dword [0x140029510], 0
jmp 0x140006b3a
lea rdx, str.warning
mov rcx, rbx
call fcn.14000b950
test eax, eax
je 0x140006aec
lea rdx, str.warn
mov rcx, rbx
call fcn.14000b950
test eax, eax
jne 0x140006af5
mov dword [0x140029510], r12d
jmp 0x140006b3a
lea rdx, str.error
mov rcx, rbx
call fcn.14000b950
test eax, eax
je 0x140006b1b
lea rdx, [0x140021850]
mov rcx, rbx
call fcn.14000b950
test eax, eax
jne 0x140006b27
mov dword [0x140029510], 2
jmp 0x140006b3a
and dword [0x140029510], 0
lea rcx, str.log.level_unrecognized
call fcn.1400069bc
test rdi, rdi
je 0x140006b5c
lea rdx, str.:log.output.debug.monitor
xor r8d, r8d
mov rcx, rdi
call fcn.140004ae4
mov byte [0x140029514], 0
test eax, eax
je 0x140006b63
mov byte [0x140029514], r12b
test rsi, rsi
je 0x140006ddd
lea rdx, [rsp + 0x520]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rdx, str.:working.directory
mov rcx, rdi
call fcn.140004cb4
test rax, rax
mov rbx, rax
je 0x140006bb7
lea rdx, str.WinRun4J:ini.dir
mov rcx, rdi
call fcn.140004cb4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, rsi
call fcn.140007c6c
lea rdx, str.:log.overwrite
xor r8d, r8d
mov rcx, rdi
mov qword [0x14002b3b0], rax
call fcn.140004ae4
mov r8d, r12d
mov edx, 0xc0000000
test eax, eax
setne al
mov byte [0x14002b3a2], al
neg al
sbb ecx, ecx
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
and ecx, 0xfffffffe
xor r9d, r9d
add ecx, 4
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
mov qword [0x14002b390], rax
je 0x140006daa
mov cl, byte [0x14002b3a2]
neg cl
mov rcx, rax
sbb r9d, r9d
xor r8d, r8d
xor edx, edx
not r9d
and r9d, 2
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rdx, qword [0x14002b390]
mov ecx, 0xfffffff5
mov qword [0x14002b398], rax
call qword [sym.imp.KERNEL32.dll_SetStdHandle]
mov rdx, qword [0x14002b390]
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_SetStdHandle]
lea rdx, str.:log.file.and.console
mov rcx, rdi
mov byte [0x14002b3a0], r12b
call fcn.140004cb4
test rax, rax
je 0x140006cb0
lea rdx, str.:log.file.and.console
xor r8d, r8d
mov rcx, rdi
call fcn.140004ae4
test eax, eax
setne byte [0x14002b3a1]
xorpd xmm2, xmm2
lea rdx, [0x1400217e0]
mov rcx, rdi
call fcn.140004ab0
mulsd xmm0, qword [0x1400217d8]
comisd xmm0, xmmword [0x140021748]
movsd qword [0x14002b3a8], xmm0
jbe 0x140006dc8
lea r8, [rsp + 0xe0]
xor r9d, r9d
mov edx, 0x104
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0xe0]
call fcn.140007ae4
lea rdx, str.:log.roll.prefix
mov rcx, rdi
call fcn.140004cb4
test rax, rax
je 0x140006d28
mov rdx, rax
jmp 0x140006d45
lea rdx, [rsp + 0x300]
lea rcx, [rsp + 0xe0]
call fcn.140007bac
lea rdx, [rsp + 0x300]
lea rcx, [rsp + 0x1f0]
call fcn.14000b7e0
lea rcx, [rsp + 0x1f0]
call fcn.140007c6c
lea rdx, str.:log.roll.suffix
mov rcx, rdi
mov qword [0x14002b3b8], rax
call fcn.140004cb4
test rax, rax
je 0x140006d7f
mov rcx, rax
jmp 0x140006d9c
lea rdx, [rsp + 0x410]
lea rcx, [rsp + 0xe0]
call fcn.140007b58
lea rcx, [rsp + 0x410]
call fcn.140007c6c
mov qword [0x14002b3c0], rax
jmp 0x140006dc8
lea rcx, str.Could_not_open_log_file
call fcn.1400069fc
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [0x14002b390], rax
test rbx, rbx
je 0x140006def
lea rcx, [rsp + 0x520]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x140006def
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [0x14002b390], rax
lea rcx, [rsp + 0x40]
mov dword [rsp + 0x40], 0x94
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x140006e0d
cmp dword [rsp + 0x44], 5
ja 0x140006e1b
cmp dword [rsp + 0x44], 5
jne 0x140006e26
cmp dword [rsp + 0x48], 0
jbe 0x140006e26
mov eax, r12d
mov dword [0x14002b388], eax
jmp 0x140006e2c
mov eax, dword [0x14002b388]
cmp dword [0x14002b384], 0
jne 0x140006e8d
test rsi, rsi
jne 0x140006e8d
test eax, eax
je 0x140006e86
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test rax, rax
je 0x140006e86
lea rdx, str.AttachConsole
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140006e86
or ecx, 0xffffffff
call rax
test eax, eax
mov dword [0x14002b38c], eax
je 0x140006e86
call qword [sym.imp.KERNEL32.dll_AllocConsole]
lea rcx, [0x14002176c]
call fcn.14000d700
mov dword [0x14002b384], r12d
lea r11, [rsp + 0x630]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop r12
ret