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

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4a0
mov rsi, rcx
mov rax, qword [0x140346038]
xor rax, rsp
mov qword [rsp + 0x498], rax
lea rax, [0x1402fff50]
mov qword [rcx], rax
lea rbx, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea r14, [rsp + 0x90]
mov rcx, rdi
mov rdx, r14
call fcn.1400ee290
movzx r15d, byte [r14 + 0x17]
test r15b, r15b
jns 0x14009cb4d
mov r15, qword [rsp + 0x98]
jns 0x14009cb5c
mov rcx, qword [rsp + 0x90]
call fcn.140153bcc
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov rax, qword [rbx + rax + 0x30]
lea r14, [rsp + 0x90]
mov qword [r14], rax
lock inc dword [rax + 8]
lea rdx, [0x140361538]
mov rcx, r14
call fcn.1400c467a
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x14037e008]
mov ebp, eax
mov rcx, qword [r14]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x14009cd38
mov rcx, rbx
mov edx, ebp
call fcn.1400cbfc4
mov rcx, rbx
call fcn.1400cc15a
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], rax
movaps xmm0, xmmword [0x1402fccc0]
movaps xmmword [rbx], xmm0
mov rcx, rdi
mov rdx, rbx
call fcn.1400ee290
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], r14
lea r14, [rsp + 0x48]
mov rcx, r14
mov rdx, rbx
mov r9, 0xffffffffffffffff
call fcn.1400c920c
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x8c], eax
mov qword [rsp + 0x80], rcx
test byte [0x140355300], 0x19
jne 0x14009cd4a
cmp byte [rsp + 0x5f], 0
jns 0x14009cc49
mov rcx, qword [rsp + 0x48]
call fcn.140153bcc
cmp dword [rsi + 8], 3
je 0x14009ce1d
mov eax, dword [0x140356398]
test al, 2
je 0x14009cc78
cmp byte [rsp + 0x77], 0
jns 0x14009cc69
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x140356398]
test al, 4
jne 0x14009cd77
cmp eax, 1
ja 0x14009cc8f
cmp dword [rsi + 8], 2
jge 0x14009cd77
test al, 1
jne 0x14009cdcb
cmp dword [rsi + 8], 3
je 0x14009ce80
cmp byte [rsp + 0x77], 0
jns 0x14009ccb2
mov rcx, qword [rsp + 0x60]
call fcn.140153bcc
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.140153d5c
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x1402ff9c0]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x1402ff9d0]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x14009ccf9
mov rcx, qword [rsi + 0x58]
call fcn.140153bcc
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.1400ea6c8
mov rcx, rdi
call fcn.1400bf590
mov rcx, rsi
call fcn.1400cba88
mov rcx, qword [rsp + 0x498]
xor rcx, rsp
call fcn.140156fe0
nop
add rsp, 0x4a0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14037e008]
jmp 0x14009cbb2
lea rax, [rsp + 0x80]
lea rcx, [rsp + 0x90]
mov qword [rcx], rax
lea rax, [rsp + 0x8c]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], r14
call fcn.140244890
jmp 0x14009cc38
lea rbx, [rsp + 0x60]
movzx ecx, byte [rbx + 0x17]
mov r14d, ecx
and r14d, 0x7f
test cl, cl
cmovs r14, qword [rbx + 8]
cmovs rbx, qword [rbx]
test r14, r14
je 0x14009cc8f
xor r12d, r12d
mov r8d, r14d
sub r8d, r12d
lea rdx, [rbx + r12]
mov ecx, 2
call fcn.140174628
test eax, eax
js 0x14009cdc0
mov eax, eax
add r12, rax
cmp r12, r14
jb 0x14009cd9e
mov eax, dword [0x140356398]
jmp 0x14009cc8f
call fcn.1402443b0
test al, al
je 0x14009cc97
lea r9, [rsp + 0x90]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x60]
movzx eax, byte [rdx + 0x17]
mov r8d, eax
and r8d, 0x7f
test al, al
cmovs r8d, dword [rdx + 8]
cmovs rdx, qword [rdx]
mov rcx, qword [0x1403629c8]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14009cc97
cmp byte [0x1403629fc], 0
jne 0x14009cc53
mov byte [0x1403629fc], 1
mov eax, dword [0x140362a08]
mov ecx, dword [0x1403576e0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14009d01f
lea r14, [rsp + 0x90]
mov rcx, rsi
mov rdx, r14
call fcn.140244760
movzx eax, byte [r14 + 0x17]
test al, al
js 0x14009cfe7
mov edx, eax
and edx, 0x7f
jmp 0x14009cfef
lea rcx, [rsp + 0x90]
mov r8d, 0x400
mov dl, 0xaa
call fcn.140159120
cmp byte [rsp + 0x77], 0
js 0x14009cea3
lea rax, [rsp + 0x60]
jmp 0x14009cea8
mov rax, qword [rsp + 0x60]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0x90], dl
test dl, dl
je 0x14009cecc
inc rcx
cmp rcx, 0x400
jne 0x14009ceaa
mov byte [rsp + 0x48f], 0
lea rcx, [rsp + 0x90]
call fcn.1400bf590
call fcn.140244670
mov rax, qword [0x1403629e8]
cmp rax, qword [0x1403629f0]
je 0x14009d054
call fcn.140244670
mov rax, qword [0x1403629f0]
test rax, rax
mov rcx, qword [0x1403629e0]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x14009d057
mov rcx, qword [0x1403629d8]
mov rbx, qword [rcx + rax*8 - 8]
mov qword [rsp + 0x48], rbx
test rbx, rbx
je 0x14009cca1
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x14009d05a
cmp eax, 0x7fffffff
je 0x14009d05d
cmp byte [rsp + 0x77], 0
js 0x14009cf5d
lea r14, [rsp + 0x60]
jmp 0x14009cf62
mov r14, qword [rsp + 0x60]
mov rcx, r14
add rcx, r15
mov qword [rsp + 0x38], rcx
je 0x14009d063
call fcn.14017ed70
mov qword [rsp + 0x40], rax
mov rax, qword [rsi + 0x118]
add r14, rax
mov qword [rsp + 0x28], r14
sub r15, rax
mov qword [rsp + 0x30], r15
js 0x14009d066
je 0x14009cfa5
test r14, r14
je 0x14009d06c
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x48]
lea r9, [rsp + 0x28]
call fcn.1402446e0
lock dec dword [rbx]
jne 0x14009cca1
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [0x14037e008]
jmp 0x14009cca1
mov rdx, qword [rsp + 0x98]
test rdx, rdx
js 0x14009d060
mov rcx, qword [rsp + 0x90]
test al, al
jns 0x14009d00a
test rcx, rcx
jne 0x14009d00a
test rdx, rdx
jne 0x14009d069
test al, al
jns 0x14009d013
call fcn.140153bcc
mov byte [0x1403629fc], 0
jmp 0x14009cc53
lea rcx, [0x140362a08]
call fcn.1401547b8
cmp dword [0x140362a08], 0xffffffff
jne 0x14009ce56
mov qword [0x140362a00], 0
lea rcx, [0x140362a08]
call fcn.140153cf4
jmp 0x14009ce56
int3
int3
int3
int3
int3
int3
int3
int3
int3