Function at 0x140002580
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, 0xa8
mov rdi, rcx
call fcn.140133b34
mov esi, dword [rax]
call fcn.140133b34
mov dword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x84], eax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [rdi + 0x78]
movabs r13, 0x7ffffffffffffff8
test al, 0x10
mov dword [rsp + 0x88], esi
je 0x140002a19
mov rax, qword [rdi + 0x48]
mov rbx, qword [rdi + 0x70]
cmp rbx, rax
jae 0x1400025ed
mov qword [rdi + 0x70], rax
mov rbx, rax
mov r14, qword [rdi + 0x40]
sub rbx, r14
js 0x140002b38
cmp rbx, r13
jae 0x1400029c3
cmp rbx, 0x16
ja 0x1400027b0
lea rcx, [rsp + 0x50]
mov byte [rcx + 0x17], bl
lea rsi, [rcx + rbx]
cmp rcx, r14
ja 0x140002627
cmp rsi, r14
ja 0x140002b38
test rbx, rbx
je 0x140002637
mov rdx, r14
mov r8, rbx
call fcn.14016a030
lea r14, [rdi + 0x10]
mov byte [rsi], 0
movsx rbx, byte [rsp + 0x67]
test rbx, rbx
jns 0x14000264e
mov rbx, qword [rsp + 0x58]
jns 0x14000265a
mov rcx, qword [rsp + 0x50]
call fcn.140133b2c
mov rax, qword [r14]
movsxd rax, dword [rax + 4]
mov r15, qword [r14 + rax + 0x30]
lea rsi, [0x14023d270]
cmp r15, rsi
jne 0x1400029cd
lea rax, [0x14023df70]
mov qword [rsp + 0x68], rax
mov rax, qword [0x14023df70]
cmp rax, 0xffffffffffffffff
jne 0x140002b3a
movsxd rax, dword [0x14023df78]
lea rdx, [rax - 1]
mov rcx, qword [r15 + 0x10]
mov r8, qword [r15 + 0x18]
sub r8, rcx
sar r8, 3
cmp r8, rdx
jbe 0x1400029be
mov rcx, qword [rcx + rax*8 - 8]
test rcx, rcx
je 0x1400029be
mov rax, qword [rcx]
mov rax, qword [rax + 0x38]
mov dl, 0xa
call qword [0x14021e390]
mov ebp, eax
cmp r15, rsi
jne 0x140002a69
mov rcx, r14
mov edx, ebp
call fcn.140002d60
mov rcx, r14
call fcn.140002c40
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x40], rax
movaps xmm0, xmmword [0x1401fa990]
movaps xmmword [rsp + 0x30], xmm0
mov eax, dword [rdi + 0x78]
test al, 0x10
je 0x140002a36
mov rax, qword [rdi + 0x48]
mov r14, qword [rdi + 0x70]
cmp r14, rax
jae 0x14000272a
mov qword [rdi + 0x70], rax
mov r14, rax
mov r15, qword [rdi + 0x40]
sub r14, r15
js 0x140002b38
cmp r14, r13
jae 0x1400029d7
cmp r14, 0x16
ja 0x1400027ed
lea rcx, [rsp + 0x30]
mov byte [rcx + 0x17], r14b
lea rsi, [rcx + r14]
cmp rcx, r15
ja 0x140002765
cmp rsi, r15
ja 0x140002b38
test r14, r14
je 0x140002775
mov rdx, r15
mov r8, r14
call fcn.14016a030
mov byte [rsi], 0
mov rbp, qword [rdi + 0x118]
movsx rax, byte [rsp + 0x47]
mov rsi, rax
test rax, rax
jns 0x140002792
mov rsi, qword [rsp + 0x38]
mov r14, rsi
sub r14, rbp
jb 0x1400029e1
test al, al
js 0x140002864
lea r15, [rsp + 0x30]
jmp 0x140002869
mov rax, rbx
or rax, 7
lea rcx, [rax + 1]
cmp rax, 0x17
mov r15d, 0x19
cmovne r15, rcx
mov rcx, r15
call fcn.140133b54
mov rcx, rax
mov qword [rsp + 0x50], rax
bts r15, 0x3f
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x58], rbx
jmp 0x140002615
mov rax, r14
or rax, 7
lea rcx, [rax + 1]
cmp rax, 0x17
mov r12d, 0x19
cmovne r12, rcx
mov rcx, r12
call fcn.140133b54
mov rcx, rax
mov qword [rsp + 0x30], rax
bts r12, 0x3f
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
jmp 0x140002753
mov rax, r14
or rax, 7
lea rcx, [rax + 1]
cmp rax, 0x17
mov r12d, 0x19
cmovne r12, rcx
mov rcx, r12
call fcn.140133b54
mov rcx, rax
mov qword [rsp + 0x68], rax
bts r12, 0x3f
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x70], r14
jmp 0x140002884
mov r15, qword [rsp + 0x30]
cmp r14, r13
jae 0x1400029eb
add r15, rbp
cmp r14, 0x16
ja 0x14000282a
lea rcx, [rsp + 0x68]
mov byte [rcx + 0x17], r14b
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x140002896
cmp r12, r15
ja 0x140002b38
cmp rsi, rbp
je 0x1400028a6
mov rdx, r15
mov r8, r14
call fcn.14016a030
mov byte [r12], 0
mov eax, dword [rdi + 0x128]
mov rcx, qword [rdi + 0x120]
mov dword [rsp + 0x8c], eax
mov qword [rsp + 0x98], rcx
mov qword [rsp + 0x90], 0x57
mov al, byte [0x14023dfd7]
test al, al
jne 0x140002bb1
cmp byte [rsp + 0x7f], 0
jns 0x1400028f2
mov rcx, qword [rsp + 0x68]
call fcn.140133b2c
cmp dword [rdi + 8], 3
je 0x140002a91
mov eax, dword [0x14022e638]
test al, 2
jne 0x1400029f5
test al, 4
jne 0x14000296d
test eax, 0xfffffffa
jne 0x14000291b
cmp dword [rdi + 8], 2
jge 0x14000296d
test al, 1
jne 0x140002b67
cmp dword [rdi + 8], 3
mov esi, dword [rsp + 0x88]
je 0x140002a54
cmp byte [rsp + 0x47], 0
jns 0x140002945
mov rcx, qword [rsp + 0x30]
call fcn.140133b2c
mov ecx, dword [rsp + 0x84]
call qword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.140133b34
mov dword [rax], esi
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rsi, [rsp + 0x30]
movsx r14, byte [rsi + 0x17]
test r14, r14
cmovs r14, qword [rsi + 8]
cmovs rsi, qword [rsi]
test r14, r14
je 0x14000291b
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rsi + r15]
mov ecx, 2
call fcn.140133bc8
test eax, eax
setns cl
mov eax, eax
add r15, rax
cmp r15, r14
setb al
test cl, al
jne 0x14000298b
mov eax, dword [0x14022e638]
jmp 0x14000291b
call fcn.14016f470
lea rcx, [rsp + 0x50]
call fcn.14016eb50
lock inc dword [r15 + 8]
jmp 0x140002676
lea rcx, [rsp + 0x30]
call fcn.14016eb50
lea rcx, [rsp + 0x68]
call fcn.14016eb10
lea rcx, [rsp + 0x68]
call fcn.14016eb50
cmp byte [rsp + 0x47], 0
js 0x140002a03
lea rcx, [rsp + 0x30]
jmp 0x140002a08
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x14022e638]
jmp 0x14000290a
xor r14d, r14d
mov ebx, 0
test al, 8
je 0x14000260d
mov r14, qword [rdi + 0x28]
mov rbx, qword [rdi + 0x38]
jmp 0x1400025f1
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x14000274a
mov r15, qword [rdi + 0x28]
mov r14, qword [rdi + 0x38]
jmp 0x14000272e
lea r8, [rsp + 0x30]
mov rcx, rdi
mov rdx, rbx
call fcn.14018c0c0
jmp 0x140002934
mov eax, 0xffffffff
lock xadd dword [r15 + 8], eax
test eax, eax
jne 0x1400026de
mov rax, qword [r15]
mov rax, qword [rax + 8]
mov rcx, r15
call qword [0x14021e390]
jmp 0x1400026de
cmp byte [0x14023e2d4], 0
jne 0x1400028fc
mov byte [0x14023e2d4], 1
mov eax, dword [0x14023e2e0]
mov ecx, dword [0x14023adf0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140002bfd
lea r14, [rsp + 0x50]
mov rcx, rdi
mov rdx, r14
call fcn.14018bfe0
movsx rax, byte [r14 + 0x17]
test rax, rax
jns 0x140002aee
mov rax, qword [rsp + 0x58]
mov r14, qword [rsp + 0x50]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], rax
test rax, rax
js 0x140002b38
sete al
test r14, r14
setne cl
or cl, al
je 0x140002b38
mov rcx, qword [0x14023e2d8]
lea rdx, [rsp + 0x68]
call fcn.14000fe90
cmp byte [rsp + 0x67], 0
jns 0x140002b2c
mov rcx, qword [rsp + 0x50]
call fcn.140133b2c
mov byte [0x14023e2d4], 0
jmp 0x1400028fc
ud2
lea rax, [rsp + 0x68]
lea rcx, [rsp + 0x50]
mov qword [rcx], rax
lea rdx, [rsp + 0x30]
mov qword [rdx], rcx
lea rcx, [0x14023df70]
lea r8, [0x140093fe0]
call fcn.140031df0
jmp 0x140002693
call fcn.14018bc90
test al, al
je 0x140002923
lea r9, [rsp + 0x50]
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 [0x14023e290]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140002923
movzx ecx, al
lea rax, [rsp + 0x98]
lea r9, [rsp + 0x50]
mov qword [r9], rax
lea rax, [rsp + 0x8c]
mov qword [r9 + 8], rax
lea rax, [rsp + 0x68]
mov qword [r9 + 0x10], rax
lea rax, str.LogMessage
lea r8, [rsp + 0xa0]
mov qword [r8], rax
lea rdx, [rsp + 0x90]
call fcn.14018c720
jmp 0x1400028e1
lea rcx, [0x14023e2e0]
call fcn.140133c60
cmp dword [0x14023e2e0], 0xffffffff
jne 0x140002aca
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140002d50
mov qword [0x14023e2d8], rax
lea rcx, [0x14023e2e0]
call fcn.140133eb0
jmp 0x140002aca