Function at 0x140089d40
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, 0x4a8
mov rsi, rcx
lea rax, [0x14029e0d0]
mov qword [rcx], rax
mov eax, dword [rcx + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
je 0x14008a413
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x140089d89
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x14008a3d4
cmp rdi, r13
jae 0x14008a3d7
cmp rdi, 0x16
ja 0x14008a0cb
lea rcx, [rsp + 0xa0]
mov byte [rcx + 0x17], dil
lea r15, [rcx + rdi]
cmp rcx, rbx
ja 0x140089dc7
cmp r15, rbx
ja 0x14008a3e9
test rdi, rdi
je 0x140089dd7
mov rdx, rbx
mov r8, rdi
call fcn.140111620
lea r14, [rsi + 0x10]
lea rdi, [rsi + 0x18]
mov byte [r15], 0
movzx eax, byte [rsp + 0xb7]
test al, al
jns 0x140089df7
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x58], rax
jns 0x140089e0b
mov rcx, qword [rsp + 0xa0]
call fcn.14010cc0c
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov rax, qword [r14 + rax + 0x30]
mov qword [rsp + 0xa0], rax
lea r15, [0x1402f2cd0]
cmp rax, r15
jne 0x14008a3da
lea rdx, [0x1402f39c0]
lea rbx, [rsp + 0xa0]
mov rcx, rbx
call fcn.1401058e6
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x140318008]
mov ebp, eax
mov rcx, qword [rbx]
cmp rcx, r15
jne 0x14008a3ef
mov rcx, r14
mov edx, ebp
call fcn.140094e4a
mov rcx, r14
call fcn.140094cc4
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x14029bb90]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x14008a436
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x140089eb5
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x14008a3e3
cmp r14, r13
jae 0x14008a3e6
cmp r14, 0x16
ja 0x14008a08e
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x140089ef0
cmp r12, r15
ja 0x14008a3ec
test r14, r14
je 0x140089f00
mov rdx, r15
mov r8, r14
call fcn.140111620
mov byte [r12], 0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], rbx
lea r14, [rsp + 0x68]
lea rbx, [rsp + 0x30]
mov rcx, r14
mov rdx, rbx
mov r9, 0xffffffffffffffff
call fcn.140095fa8
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x54], eax
mov qword [rsp + 0x60], rcx
test byte [0x1402e27f0], 0x19
jne 0x14008a378
cmp byte [rsp + 0x7f], 0
jns 0x140089f61
mov rcx, qword [rsp + 0x68]
call fcn.14010cc0c
cmp dword [rsi + 8], 3
jne 0x140089f74
cmp byte [0x1402f408c], 0
je 0x14008a21e
mov eax, dword [0x1402e3900]
test al, 2
je 0x140089f99
cmp byte [rsp + 0x47], 0
jns 0x140089f8a
mov rbx, qword [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1402e3900]
test al, 4
jne 0x140089fa8
cmp eax, 1
ja 0x140089ff3
cmp dword [rsi + 8], 2
jl 0x140089ff3
lea rbx, [rsp + 0x30]
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 0x140089ff3
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rbx + r15]
mov ecx, 2
call fcn.14012b3bc
test eax, eax
js 0x140089fed
mov eax, eax
add r15, rax
cmp r15, r14
jb 0x140089fcb
mov eax, dword [0x1402e3900]
test al, 1
jne 0x14008a114
cmp dword [rsi + 8], 3
je 0x14008a166
cmp byte [rsp + 0x47], 0
jns 0x14008a016
mov rcx, qword [rsp + 0x30]
call fcn.14010cc0c
mov ecx, dword [rsi + 0x130]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [rsi + 0x12c]
call fcn.14010ccdc
mov dword [rax], ebx
mov rax, qword [rsi + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x14029dbb0]
mov qword [rsi + rax + 0x10], rcx
lea rax, [0x14029dbc0]
mov qword [rsi + 0x18], rax
cmp byte [rsi + 0x6f], 0
jns 0x14008a05d
mov rcx, qword [rsi + 0x58]
call fcn.14010cc0c
sub rsi, 0xffffffffffffff80
mov rcx, rdi
call fcn.140091e80
mov rcx, rdi
call fcn.14008fa20
mov rcx, rsi
call fcn.14009805c
nop
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
and r13, r14
add r13, 8
mov r12, r14
or r12, 7
cmp r12, 0x17
cmove r12, r13
inc r12
mov rcx, r12
call fcn.14010cc14
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x140089ede
mov rax, rdi
and rax, r13
add rax, 8
mov r14, rdi
or r14, 7
cmp r14, 0x17
cmove r14, rax
inc r14
mov rcx, r14
call fcn.14010cc14
mov rcx, rax
mov qword [rsp + 0xa0], rax
bts r14, 0x3f
mov qword [rsp + 0xb0], r14
mov qword [rsp + 0xa8], rdi
jmp 0x140089db5
call fcn.1401cd5c0
test al, al
je 0x140089ffb
lea r9, [rsp + 0xa0]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x30]
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 [0x1402f4058]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140089ffb
lea rcx, [rsp + 0xa0]
mov r8d, 0x400
mov dl, 0xaa
call fcn.140111cd0
cmp byte [rsp + 0x47], 0
js 0x14008a189
lea rax, [rsp + 0x30]
jmp 0x14008a18e
mov rax, qword [rsp + 0x30]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0xa0], dl
test dl, dl
je 0x14008a1b2
inc rcx
cmp rcx, 0x400
jne 0x14008a190
mov byte [rsp + 0x49f], 0
lea rcx, [rsp + 0xa0]
call fcn.14008fa20
call fcn.1401cd880
mov rax, qword [0x1402f4078]
cmp rax, qword [0x1402f4080]
je 0x14008a45b
call fcn.1401cd880
mov rax, qword [0x1402f4080]
test rax, rax
mov rcx, qword [0x1402f4070]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x14008a45e
mov rcx, qword [0x1402f4068]
mov rbx, qword [rcx + rax*8 - 8]
mov qword [rsp + 0x68], rbx
test rbx, rbx
je 0x14008a005
jmp 0x14008a2ad
mov byte [0x1402f408c], 1
mov eax, dword [0x1402f4098]
mov ecx, dword [0x1402f0db0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14008a39f
lea r14, [rsp + 0xa0]
mov rcx, rsi
mov rdx, r14
call fcn.1401cd960
movzx eax, byte [r14 + 0x17]
test al, al
js 0x14008a26d
mov edx, eax
and edx, 0x7f
jmp 0x14008a275
mov rdx, qword [rsp + 0xa8]
test rdx, rdx
js 0x14008a461
mov rcx, qword [rsp + 0xa0]
test al, al
jns 0x14008a298
test rcx, rcx
jne 0x14008a298
test rdx, rdx
jne 0x14008a464
test al, al
jns 0x14008a2a1
call fcn.14010cc0c
mov byte [0x1402f408c], 0
jmp 0x140089f74
mov eax, 1
lock xadd dword [rbx], eax
test eax, eax
jle 0x14008a467
cmp eax, 0x7fffffff
je 0x14008a46a
cmp byte [rsp + 0x47], 0
mov r15, qword [rsp + 0x58]
js 0x14008a2dc
lea r14, [rsp + 0x30]
jmp 0x14008a2e1
mov r14, qword [rsp + 0x30]
mov rcx, r14
add rcx, r15
mov qword [rsp + 0x90], rcx
je 0x14008a46d
call fcn.14012f6e0
mov qword [rsp + 0x98], rax
mov rax, qword [rsi + 0x118]
add r14, rax
mov qword [rsp + 0x80], r14
sub r15, rax
mov qword [rsp + 0x88], r15
js 0x14008a470
je 0x14008a330
test r14, r14
je 0x14008a473
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x68]
lea r9, [rsp + 0x80]
call fcn.1401cd8f0
lock dec dword [rbx]
jne 0x14008a005
mov rax, qword [rbx + 0x10]
mov rcx, rbx
call qword [0x140318008]
jmp 0x14008a005
lea rax, [rsp + 0x60]
lea rcx, [rsp + 0xa0]
mov qword [rcx], rax
lea rax, [rsp + 0x54]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], r14
call fcn.1401cdde0
jmp 0x140089f50
lea rcx, [0x1402f4098]
call fcn.14010d4bc
cmp dword [0x1402f4098], 0xffffffff
jne 0x14008a24a
mov qword [0x1402f4090], 0
lea rcx, [0x1402f4098]
call fcn.14010d064
jmp 0x14008a24a
int3
int3
lock inc dword [rax + 8]
jmp 0x140089e2f
int3
int3
int3
int3
mov eax, 0xffffffff
lock xadd dword [rcx + 8], eax
test eax, eax
jne 0x140089e69
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140318008]
jmp 0x140089e69
xor ebx, ebx
mov edi, 0
test al, 8
je 0x140089da9
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x140089d96
int3
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x140089ed5
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
sub r14, r15
jns 0x140089ec2
int3
int3
int3
int3
int3
int3
int3
int3
int3
int3