Function at 0x140001210
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, 0x490
mov rsi, rcx
mov rax, qword [0x14029a038]
xor rax, rsp
mov qword [rsp + 0x488], rax
lea rax, [0x14026d2a0]
mov qword [rcx], rax
lea rbx, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea r14, [rsp + 0x80]
mov rcx, rdi
mov rdx, r14
call fcn.1401034b0
movzx eax, byte [r14 + 0x17]
mov r15d, eax
and r15d, 0x7f
test al, al
jns 0x140001273
mov r15, qword [rsp + 0x88]
jns 0x140001282
mov rcx, qword [rsp + 0x80]
call fcn.14017b254
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov rax, qword [rbx + rax + 0x30]
lea r14, [rsp + 0x80]
mov qword [r14], rax
lock inc dword [rax + 8]
lea rdx, [0x1402a0c68]
mov rcx, r14
call fcn.140160c60
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [case.0x1401e7f70.0]
mov ebp, eax
mov rcx, qword [r14]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x1400016ce
mov rcx, rbx
mov edx, ebp
call fcn.14006c7f0
mov rcx, rbx
call fcn.14003f350
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], rax
movaps xmm0, xmmword [0x140270690]
movaps xmmword [rbx], xmm0
mov rcx, rdi
mov rdx, rbx
call fcn.1401034b0
test byte [0x14029c4c0], 0x19
jne 0x140001680
cmp dword [rsi + 8], 3
jne 0x140001332
cmp byte [0x1402a0cf4], 0
je 0x1400015ed
mov eax, dword [0x14029bf48]
test al, 2
je 0x140001357
cmp byte [rsp + 0x77], 0
jns 0x140001348
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x14029bf48]
test al, 4
jne 0x140001366
cmp dword [rsi + 8], 2
jl 0x1400013b1
cmp eax, 1
ja 0x1400013b1
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 0x1400013b1
xor r12d, r12d
mov r8d, r14d
sub r8d, r12d
lea rdx, [rbx + r12]
mov ecx, 2
call fcn.140199db8
test eax, eax
js 0x1400013ab
mov eax, eax
add r12, rax
cmp r14, r12
ja 0x140001389
mov eax, dword [0x14029bf48]
test al, 1
je 0x1400013fe
call fcn.1400c5f10
test al, al
je 0x1400013fe
lea r9, [rsp + 0x80]
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 [0x1402a0cc0]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
jne 0x140001556
mov rcx, qword [0x1402a0ca0]
test rcx, rcx
jne 0x14000164c
lea rcx, [rsp + 0x80]
mov r8d, 0x400
mov dl, 0xaa
call fcn.1401808d0
cmp byte [rsp + 0x77], 0
jns 0x14000143b
mov rax, qword [rsp + 0x60]
jmp 0x140001440
lea rax, [rsp + 0x60]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0x80], dl
test dl, dl
je 0x140001464
inc rcx
cmp rcx, 0x400
jne 0x140001442
mov byte [rsp + 0x47f], 0
lea rcx, [rsp + 0x80]
call fcn.140110840
call fcn.1401df780
mov rax, qword [0x1402a0ce0]
cmp rax, qword [0x1402a0ce8]
je 0x140001556
call fcn.1401df780
mov rax, qword [0x1402a0ce8]
test rax, rax
mov rcx, qword [0x1402a0cd8]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x1400016e0
mov rcx, qword [0x1402a0cd0]
mov rbx, qword [rcx + rax*8 - 8]
test rbx, rbx
je 0x140001556
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x1400016e3
mov qword [rsp + 0x48], rbx
cmp byte [rsp + 0x77], 0
jns 0x1400014ea
mov r14, qword [rsp + 0x60]
jmp 0x1400014ef
lea r14, [rsp + 0x60]
mov rcx, r14
add rcx, r15
mov qword [rsp + 0x38], rcx
je 0x1400016e6
call fcn.1401a3fd0
lea rcx, [rsp + 0x38]
mov qword [rcx + 8], rax
mov rax, qword [rsi + 0x118]
sub r15, rax
add r14, rax
lea r9, [rsp + 0x28]
mov qword [r9], r14
mov qword [r9 + 8], r15
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x48]
call fcn.1401df9b0
lock dec dword [rbx]
jne 0x140001556
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [case.0x1401e7f70.0]
cmp byte [rsp + 0x77], 0
jns 0x140001567
mov rcx, qword [rsp + 0x60]
call fcn.14017b254
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14017b234
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x14026cc90]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x14026cca0]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x1400015ae
mov rcx, qword [rsi + 0x58]
call fcn.14017b254
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.140109960
mov rcx, rdi
call fcn.140110840
mov rcx, rsi
call fcn.140120300
mov rcx, qword [rsp + 0x488]
xor rcx, rsp
call fcn.14017e7b0
nop
add rsp, 0x490
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov byte [0x1402a0cf4], 1
mov eax, dword [0x1402a0d00]
mov ecx, dword [0x14029dfe4]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140001699
lea r14, [rsp + 0x80]
mov rcx, rsi
mov rdx, r14
call fcn.1401dfa20
cmp byte [r14 + 0x17], 0
jns 0x140001640
mov rcx, qword [rsp + 0x80]
call fcn.14017b254
mov byte [0x1402a0cf4], 0
jmp 0x140001332
lea rax, [rsp + 0x60]
movzx edx, byte [rax + 0x17]
mov r8d, edx
and r8d, 0x7f
test dl, dl
mov r9, qword [rax]
cmovns r9, rax
lea rdx, [rsp + 0x50]
mov qword [rdx], r9
cmovs r8, qword [rax + 8]
mov qword [rdx + 8], r8
call fcn.1401de860
jmp 0x140001418
lea rcx, [rsp + 0x80]
mov qword [rcx], rsi
mov qword [rcx + 8], rbx
call fcn.1401df7f0
jmp 0x14000131f
lea rcx, [0x1402a0d00]
call fcn.14017b2bc
cmp dword [0x1402a0d00], 0xffffffff
jne 0x140001619
mov qword [0x1402a0cf8], 0
lea rcx, [0x1402a0d00]
call fcn.14017b25c
jmp 0x140001619
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x1401e7f70.0]
jmp 0x1400012d8
int3
int3
int3