Function at 0x140006d10
Capabilities:
Print debug messages
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x7b8]
sub rsp, 0x8b8
mov rax, qword [0x14003f198]
xor rax, rsp
mov qword [rbp + 0x7a0], rax
mov rsi, r8
mov ebx, edx
mov rdi, rcx
test r8, r8
jne 0x140006d4f
test r9, r9
je 0x140006fd8
cmp dword [rcx], 0
je 0x140006fd8
mov qword [rsp + 0x8b0], r14
mov byte [rbp - 0x60], 0
mov byte [rsp + 0x78], 0
mov byte [rsp + 0x58], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, 0x1e
lea rcx, [rsp + 0x78]
mov r14d, eax
call fcn.1400171e4
sub ebx, 1
je 0x140006db5
sub ebx, 1
je 0x140006dac
sub ebx, 2
je 0x140006da3
cmp ebx, 4
jne 0x140006dcb
lea r8, str.TRACE
jmp 0x140006dbc
lea r8, str.INFO
jmp 0x140006dbc
lea r8, str.ERROR
jmp 0x140006dbc
lea r8, str.ASSERT
mov edx, 0x1e
lea rcx, [rsp + 0x58]
call fcn.140016de0
mov rax, qword [rbp + 0x7f8]
test rax, rax
je 0x140006de3
cmp byte [rax], 0
je 0x140006de3
mov ecx, 1
jmp 0x140006de5
xor ecx, ecx
lea rdx, [rdi + 0xc]
mov rbx, 0xffffffffffffffff
test rsi, rsi
jne 0x140006e2d
lea rax, [rsp + 0x58]
mov r8, rbx
mov qword [rsp + 0x38], rax
lea r9, str.__s:_0x_X__s__s_
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea rcx, [rbp - 0x60]
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rdx
mov edx, 0x800
call fcn.1400072e0
jmp 0x140006e81
test ecx, ecx
lea r8, [0x1400302ec]
lea rax, [0x14002e7c8]
cmovne rax, r8
lea r9, str.__s:_0x_X__s__s___s_s
mov qword [rsp + 0x48], rax
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov r8, rbx
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], rdx
mov edx, 0x800
call fcn.1400072e0
lea rax, [rbp - 0x60]
mov rcx, rbx
nop dword [rax + rax]
inc rcx
cmp byte [rax + rcx], 0
jne 0x140006e90
mov r9, qword [rbp + 0x7f8]
lea r8, [rbp + 0x800]
mov eax, 0x7fe
mov qword [rsp + 0x20], r8
sub eax, ecx
mov r8, rbx
movsxd rdx, eax
movsxd rax, ecx
lea rcx, [rbp - 0x60]
add rcx, rax
call fcn.140007350
lea r8, [0x140030308]
mov edx, 0x800
lea rcx, [rbp - 0x60]
call fcn.140016e40
lea rcx, [rdi + 0x398]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test byte [rdi + 4], 2
je 0x140006f9d
lea rcx, [rdi + 0x398]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov qword [rsp + 0x30], 0
lea rcx, [rdi + 0x10e]
mov dword [rsp + 0x28], 0
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 4
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140006f90
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rax, [rbp - 0x60]
inc rbx
cmp byte [rax + rbx], 0
jne 0x140006f57
mov r8, rbx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov rcx, rsi
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rdi + 0x398]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test byte [rdi + 4], 4
je 0x140006fad
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test byte [rdi + 4], 8
je 0x140006fc3
lea rcx, [rdi + 0x320]
lea rdx, [rbp - 0x60]
call fcn.1400085f0
lea rcx, [rdi + 0x398]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r14, qword [rsp + 0x8b0]
mov rcx, qword [rbp + 0x7a0]
xor rcx, rsp
call fcn.14000a0a0
add rsp, 0x8b8
pop rdi
pop rsi
pop rbx
pop rbp
ret