Function at 0x140007150
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 eax, dword [rcx + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
je 0x1400077b0
mov rax, qword [rsi + 0x48]
mov rbx, qword [rsi + 0x70]
cmp rbx, rax
jae 0x14000718f
mov qword [rsi + 0x70], rax
mov rbx, rax
mov rdi, qword [rsi + 0x40]
sub rbx, rdi
js 0x14000778f
cmp rbx, r13
jae 0x140007792
cmp rbx, 0x17
jae 0x1400071c0
lea r14, [rsp + 0x90]
mov byte [r14 + 0x17], bl
test rbx, rbx
jne 0x140007204
xor ebx, ebx
jmp 0x140007212
mov rax, rbx
and rax, r13
add rax, 8
mov r15, rbx
or r15, 7
cmp r15, 0x17
cmove r15, rax
inc r15
mov rcx, r15
call fcn.14008ed5c
mov r14, rax
mov qword [rsp + 0x90], rax
bts r15, 0x3f
mov qword [rsp + 0xa0], r15
mov qword [rsp + 0x98], rbx
mov rcx, r14
mov rdx, rdi
mov r8, rbx
call fcn.1400beac0
lea rdi, [rsi + 0x10]
mov byte [r14 + rbx], 0
movzx r12d, byte [rsp + 0xa7]
test r12b, r12b
jns 0x140007231
mov r12, qword [rsp + 0x98]
jns 0x140007240
mov rcx, qword [rsp + 0x90]
call fcn.14008ed54
mov rax, qword [rdi]
movsxd rax, dword [rax + 4]
mov rbx, qword [rdi + rax + 0x30]
lea r15, [0x14011c8b0]
cmp rbx, r15
jne 0x140007795
mov rax, qword [0x14011d5b0]
cmp rax, 0xffffffffffffffff
jne 0x140007828
movsxd rax, dword [0x14011d5b8]
lea rdx, [rax - 1]
mov rcx, qword [rbx + 0x10]
mov r8, qword [rbx + 0x18]
sub r8, rcx
sar r8, 3
cmp r8, rdx
jbe 0x14000778c
mov rcx, qword [rcx + rax*8 - 8]
test rcx, rcx
je 0x14000778c
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
mov dl, 0xa
call qword [0x140102bb8]
mov ebp, eax
cmp rbx, r15
jne 0x140007801
mov rcx, rdi
mov edx, ebp
call fcn.1400237f0
mov rcx, rdi
call fcn.140019510
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x1400efde0]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x1400077da
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x140007304
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x14000779e
cmp rdi, r13
jae 0x1400077a1
cmp rdi, 0x17
jae 0x140007332
lea r14, [rsp + 0x30]
mov byte [r14 + 0x17], dil
test rdi, rdi
jne 0x14000736d
xor edi, edi
jmp 0x14000737b
mov rax, rdi
and rax, r13
add rax, 8
mov r15, rdi
or r15, 7
cmp r15, 0x17
cmove r15, rax
inc r15
mov rcx, r15
call fcn.14008ed5c
mov r14, rax
mov qword [rsp + 0x30], rax
bts r15, 0x3f
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], rdi
mov rcx, r14
mov rdx, rbx
mov r8, rdi
call fcn.1400beac0
mov byte [r14 + rdi], 0
mov rbp, qword [rsi + 0x118]
movzx ecx, byte [rsp + 0x47]
mov rax, rcx
test cl, cl
jns 0x140007398
mov rax, qword [rsp + 0x38]
mov rdi, rax
sub rdi, rbp
jb 0x1400077a4
test cl, cl
js 0x1400073af
lea rbx, [rsp + 0x30]
jmp 0x1400073b4
mov rbx, qword [rsp + 0x30]
cmp rdi, r13
jae 0x1400077a7
cmp rdi, 0x17
jae 0x1400073d3
lea r14, [rsp + 0x60]
mov byte [r14 + 0x17], dil
cmp rax, rbp
jne 0x14000740b
jmp 0x14000741c
and r13, rdi
add r13, 8
mov r15, rdi
or r15, 7
cmp r15, 0x17
cmove r15, r13
inc r15
mov rcx, r15
call fcn.14008ed5c
mov r14, rax
mov qword [rsp + 0x60], rax
bts r15, 0x3f
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x68], rdi
add rbx, rbp
mov rcx, r14
mov rdx, rbx
mov r8, rdi
call fcn.1400beac0
mov byte [r14 + rdi], 0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x5c], eax
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x78], 0x56
mov al, byte [0x14011d6c6]
test al, al
jne 0x140007711
cmp byte [rsp + 0x77], 0
jns 0x14000745f
mov rcx, qword [rsp + 0x60]
call fcn.14008ed54
cmp dword [rsi + 8], 3
jne 0x140007472
cmp byte [0x14011d634], 0
je 0x1400076b7
mov eax, dword [0x14010e120]
test al, 2
je 0x14000749b
cmp byte [rsp + 0x47], 0
js 0x14000748a
lea rcx, [rsp + 0x30]
jmp 0x14000748f
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x14010e120]
test al, 4
jne 0x1400074ac
test eax, 0xfffffffa
jne 0x1400074f0
cmp dword [rsi + 8], 2
jl 0x1400074f0
lea rdi, [rsp + 0x30]
movzx ebx, byte [rdi + 0x17]
test bl, bl
cmovs rbx, qword [rdi + 8]
cmovs rdi, qword [rdi]
test rbx, rbx
je 0x1400074f0
xor r14d, r14d
mov r8d, ebx
sub r8d, r14d
lea rdx, [rdi + r14]
mov ecx, 2
call fcn.1400a45d4
test eax, eax
js 0x1400074ea
mov eax, eax
add r14, rax
cmp r14, rbx
jb 0x1400074c8
mov eax, dword [0x14010e120]
test al, 1
jne 0x14000766a
cmp dword [rsi + 8], 3
jne 0x140007644
lea rcx, [rsp + 0x90]
mov r8d, 0x400
mov dl, 0xaa
call fcn.1400bf160
cmp byte [rsp + 0x47], 0
jns 0x140007525
mov rax, qword [rsp + 0x30]
jmp 0x14000752a
lea rax, [rsp + 0x30]
xor ecx, ecx
mov dl, byte [rax + rcx]
mov byte [rsp + rcx + 0x90], dl
test dl, dl
je 0x14000754e
inc rcx
cmp rcx, 0x400
jne 0x14000752c
mov byte [rsp + 0x48f], 0
lea rcx, [rsp + 0x90]
call fcn.140053a10
call fcn.1400d9210
mov rax, qword [0x14011d620]
cmp rax, qword [0x14011d628]
je 0x1400077aa
call fcn.1400d9210
mov rax, qword [0x14011d628]
test rax, rax
mov rcx, qword [0x14011d618]
cmove rax, rcx
lea rdx, [rax - 1]
cmp rcx, rdx
jb 0x1400077ad
mov rcx, qword [0x14011d610]
mov rdi, qword [rcx + rax*8 - 8]
mov qword [rsp + 0x50], rdi
test rdi, rdi
je 0x140007644
mov eax, 1
lock xadd dword [rdi], eax
test eax, eax
jle 0x1400078b0
cmp eax, 0x7fffffff
je 0x1400078b3
cmp byte [rsp + 0x47], 0
js 0x1400075df
lea rbx, [rsp + 0x30]
jmp 0x1400075e4
mov rbx, qword [rsp + 0x30]
lea rcx, [rbx + r12]
lea r14, [rsp + 0x60]
mov qword [r14], rcx
call fcn.1400a7b00
mov qword [r14 + 8], rax
mov rax, qword [rsi + 0x118]
sub r12, rax
add rbx, rax
lea r9, [rsp + 0x80]
mov qword [r9], rbx
mov qword [r9 + 8], r12
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
mov qword [rsp + 0x20], r14
lea rcx, [rsp + 0x50]
call fcn.1400d9350
lock dec dword [rdi]
jne 0x140007644
mov rax, qword [rdi + 0x10]
mov rcx, rdi
call qword [0x140102bb8]
cmp byte [rsp + 0x47], 0
jns 0x140007655
mov rcx, qword [rsp + 0x30]
call fcn.14008ed54
nop
add rsp, 0x498
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.1400d8f60
test al, al
je 0x1400074f8
lea r9, [rsp + 0x90]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x30]
movzx r8d, byte [rdx + 0x17]
test r8b, r8b
cmovs r8d, dword [rdx + 8]
cmovs rdx, qword [rdx]
mov rcx, qword [0x14011d600]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1400074f8
mov byte [0x14011d634], 1
mov eax, dword [0x14011d640]
mov ecx, dword [0x14011a6f8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140007757
lea rdi, [rsp + 0x90]
mov rcx, rsi
mov rdx, rdi
call fcn.1400d9280
cmp byte [rdi + 0x17], 0
jns 0x140007705
mov rcx, qword [rsp + 0x90]
call fcn.14008ed54
mov byte [0x14011d634], 0
jmp 0x140007472
movzx ecx, al
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x90]
mov qword [r9], rax
lea rax, [rsp + 0x5c]
mov qword [r9 + 8], rax
lea rax, [rsp + 0x60]
mov qword [r9 + 0x10], rax
lea rax, str.LogMessage
lea r8, [rsp + 0x80]
mov qword [r8], rax
lea rdx, [rsp + 0x78]
call fcn.1400d9550
jmp 0x14000744e
lea rcx, [0x14011d640]
call fcn.14008ee04
cmp dword [0x14011d640], 0xffffffff
jne 0x1400076df
mov qword [0x14011d638], 0
lea rcx, [0x14011d640]
call fcn.14008ed98
jmp 0x1400076df
int3
int3
int3
lock inc dword [rbx + 8]
jmp 0x14000725c
int3
int3
int3
int3
int3
int3
test al, 8
jne 0x1400077c6
lea r14, [rsp + 0x90]
mov byte [r14 + 0x17], 0
jmp 0x1400071bc
mov rdi, qword [rsi + 0x28]
mov rbx, qword [rsi + 0x38]
sub rbx, rdi
jns 0x14000719c
int3
test al, 8
jne 0x1400077ed
lea r14, [rsp + 0x30]
mov byte [r14 + 0x17], 0
jmp 0x14000732e
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
sub rdi, rbx
jns 0x140007311
int3
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
test eax, eax
jne 0x1400072b8
mov rax, qword [rbx]
mov rax, qword [rax + 8]
mov rcx, rbx
call qword [0x140102bb8]
jmp 0x1400072b8
lea rcx, [0x14011bfa0]
call qword [sym.imp.progwrp.dll_AcquireSRWLockExclusive]
mov rax, qword [0x14011d5b0]
cmp rax, 1
je 0x1400078c8
mov rax, qword [0x14011d5b0]
test rax, rax
jne 0x1400078b6
mov qword [0x14011d5b0], 1
lea r14, [0x14011bfa0]
mov rbp, qword [sym.imp.progwrp.dll_ReleaseSRWLockExclusive]
mov rcx, r14
call rbp
mov eax, 1
lock xadd dword [0x14011ca04], eax
inc eax
mov dword [0x14011d5b8], eax
mov rcx, r14
call qword [sym.imp.progwrp.dll_AcquireSRWLockExclusive]
mov qword [0x14011d5b0], 0xffffffffffffffff
mov rcx, r14
call rbp
lea rcx, [0x14011bfa8]
call qword [sym.imp.progwrp.dll_WakeAllConditionVariable]
jmp 0x14000726d
int3
int3
lea rcx, [0x14011bfa0]
call qword [sym.imp.progwrp.dll_ReleaseSRWLockExclusive]
jmp 0x14000726d
lea rbp, [0x14011bfa0]
mov r14, qword [sym.imp.progwrp.dll_SleepConditionVariableSRW]
lea rcx, [0x14011bfa8]
mov rdx, rbp
mov r8d, 0xffffffff
xor r9d, r9d
call r14
mov rax, qword [0x14011d5b0]
cmp rax, 1
jne 0x140007846
jmp 0x1400078d6