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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x498
mov rsi, rcx
mov rax, qword [0x140327038]
xor rax, rsp
mov qword [rsp + 0x490], rax
lea rax, [0x1402e3570]
mov qword [rcx], rax
lea rbx, [rcx + 0x10]
lea rdi, [rcx + 0x18]
lea r14, [rsp + 0x90]
mov rcx, rdi
mov rdx, r14
call fcn.1400d8e1c
movzx r13d, byte [r14 + 0x17]
test r13b, r13b
jns 0x1400a04cf
mov r13, qword [rsp + 0x98]
jns 0x1400a04de
mov rcx, qword [rsp + 0x90]
call fcn.14013a6ac
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, [0x140339d20]
mov rcx, r14
call fcn.1400b39aa
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [case.0x14017aab5.0]
mov ebp, eax
mov rcx, qword [r14]
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
je 0x1400a0a2b
mov rcx, rbx
mov edx, ebp
call fcn.1400be40a
mov rcx, rbx
call fcn.1400be59a
movabs rax, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], rax
movaps xmm0, xmmword [0x1402e6d80]
movaps xmmword [rbx], xmm0
mov rcx, rdi
mov rdx, rbx
call fcn.1400d8e1c
movzx eax, byte [rbx + 0x17]
test al, al
js 0x1400a05ac
mov r14d, eax
and r14d, 0x7f
jmp 0x1400a05b1
mov r12, r14
or r12, 0xf
inc r12
mov rcx, r12
call fcn.14013a6b4
mov r15, rax
mov qword [rsp + 0x48], rax
add rbp, 0x11
or rbp, r12
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], r14
jmp 0x1400a0603
mov r14, qword [rsp + 0x68]
mov rcx, qword [rsi + 0x118]
cmp r14, rcx
jb 0x1400a0a19
test al, al
jns 0x1400a05ca
mov rbx, qword [rsp + 0x60]
add rbx, rcx
sub r14, rcx
js 0x1400a0a16
je 0x1400a05e1
test rbx, rbx
je 0x1400a0a3d
movabs rbp, 0x7fffffffffffffef
cmp r14, rbp
ja 0x1400a0a28
cmp r14, 0x16
ja 0x1400a057f
lea r15, [rsp + 0x48]
mov byte [r15 + 0x17], r14b
cmp r15, rbx
ja 0x1400a0615
lea rax, [r15 + r14]
cmp rax, rbx
ja 0x1400a0a40
mov rcx, r15
mov rdx, rbx
mov r8, r14
call fcn.14013efb0
mov byte [r15 + r14], 0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x8c], eax
mov qword [rsp + 0x80], rcx
test byte [0x140329880], 0x19
jne 0x1400a09af
cmp byte [rsp + 0x5f], 0
jns 0x1400a0662
mov rcx, qword [rsp + 0x48]
call fcn.14013a6ac
cmp dword [rsi + 8], 3
jne 0x1400a0675
cmp byte [0x14033b1e4], 0
je 0x1400a07f5
mov eax, dword [0x14032a9b8]
test al, 2
je 0x1400a069e
cmp byte [rsp + 0x77], 0
js 0x1400a068d
lea rcx, [rsp + 0x60]
jmp 0x1400a0692
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x14032a9b8]
test al, 4
jne 0x1400a06ad
cmp dword [rsi + 8], 2
jl 0x1400a06f8
cmp eax, 1
ja 0x1400a06f8
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 0x1400a06f8
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rbx + r15]
mov ecx, 2
call fcn.14015abb8
test eax, eax
js 0x1400a06f2
mov eax, eax
add r15, rax
cmp r14, r15
ja 0x1400a06d0
mov eax, dword [0x14032a9b8]
test al, 1
jne 0x1400a07a3
cmp dword [rsi + 8], 3
je 0x1400a0853
cmp byte [rsp + 0x77], 0
jns 0x1400a071b
mov rcx, qword [rsp + 0x60]
call fcn.14013a6ac
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14013ab7c
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x1402e2f70]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x1402e2f80]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x1400a0762
mov rcx, qword [rsi + 0x58]
call fcn.14013a6ac
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.1400aac7c
mov rcx, rdi
call fcn.1400b5b70
mov rcx, rsi
call fcn.1400b60fa
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.14013d520
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.1401fe3f0
test al, al
je 0x1400a0700
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 [0x14033b1b0]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1400a0700
mov byte [0x14033b1e4], 1
mov eax, dword [0x14033b1f0]
mov ecx, dword [0x140337e40]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400a09e1
lea rbx, [rsp + 0x90]
mov rcx, rsi
mov rdx, rbx
call fcn.1401fe7a0
cmp byte [rbx + 0x17], 0
jns 0x1400a0847
mov rcx, qword [rsp + 0x90]
call fcn.14013a6ac
mov byte [0x14033b1e4], 0
jmp 0x1400a0675
lea rcx, [rsp + 0x90]
mov r8d, 0x400
mov dl, 0xaa
call fcn.14013f660
cmp byte [rsp + 0x77], 0
js 0x1400a0876
lea rax, [rsp + 0x60]
jmp 0x1400a087b
mov rax, qword [rsp + 0x60]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0x90], dl
test dl, dl
je 0x1400a089f
inc rcx
cmp rcx, 0x400
jne 0x1400a087d
mov byte [rsp + 0x48f], 0
lea rcx, [rsp + 0x90]
call fcn.1400b5b70
call fcn.1401fe6b0
mov rax, qword [0x14033b1d0]
cmp rax, qword [0x14033b1d8]
je 0x1400a0a43
call fcn.1401fe6b0
mov rax, qword [0x14033b1d8]
test rax, rax
mov rcx, qword [0x14033b1c8]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x1400a0a1c
mov rcx, qword [0x14033b1c0]
mov rbx, qword [rcx + rax*8 - 8]
mov qword [rsp + 0x48], rbx
test rbx, rbx
je 0x1400a070a
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x1400a0a22
cmp eax, 0x7fffffff
je 0x1400a0a25
cmp byte [rsp + 0x77], 0
js 0x1400a0930
lea r14, [rsp + 0x60]
jmp 0x1400a0935
mov r14, qword [rsp + 0x60]
mov rcx, r14
add rcx, r13
mov qword [rsp + 0x38], rcx
je 0x1400a0949
call fcn.140164e30
jmp 0x1400a094b
xor eax, eax
mov qword [rsp + 0x40], rax
mov rax, qword [rsi + 0x118]
add r14, rax
mov qword [rsp + 0x28], r14
sub r13, rax
mov qword [rsp + 0x30], r13
js 0x1400a0a1f
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.1401fe720
lock dec dword [rbx]
jne 0x1400a070a
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [case.0x14017aab5.0]
jmp 0x1400a070a
lea rax, [rsp + 0x80]
lea rcx, [rsp + 0x90]
mov qword [rcx], rax
lea rax, [rsp + 0x8c]
mov qword [rcx + 8], rax
lea rax, [rsp + 0x48]
mov qword [rcx + 0x10], rax
call fcn.14007aac0
jmp 0x1400a0651
lea rcx, [0x14033b1f0]
call fcn.14013b388
cmp dword [0x14033b1f0], 0xffffffff
jne 0x1400a0821
mov qword [0x14033b1e8], 0
lea rcx, [0x14033b1f0]
call fcn.14013a7d4
jmp 0x1400a0821
int3
int3
int3
int3
int3
int3
int3
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14017aab5.0]
jmp 0x1400a0534
int3
int3
int3