Function at 0x1400d1d10
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 rsi, rcx
mov rax, qword [0x140181040]
xor rax, rsp
mov qword [rsp + 0xa0], rax
movabs r13, 0x7ffffffffffffff7
movabs r15, 0xaaaaaaaaaaaaaaaa
lea rcx, [rsp + 0x60]
mov qword [rcx], r15
call fcn.14004ee80
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x1400d227b
mov rax, qword [rsi + 0x48]
mov rdi, qword [rsi + 0x70]
cmp rdi, rax
jae 0x1400d1d78
mov qword [rsi + 0x70], rax
mov rdi, rax
mov rbx, qword [rsi + 0x40]
sub rdi, rbx
js 0x1400d2220
cmp rdi, r13
ja 0x1400d2264
cmp rdi, 0x16
jbe 0x1400d20ca
lea rax, [r13 + 1]
and rax, rdi
add rax, 8
mov r14, rdi
or r14, 7
cmp r14, 0x17
cmove r14, rax
inc r14
mov rcx, r14
call fcn.1400919f0
mov rcx, rax
mov qword [rsp + 0x88], rax
lea rax, [r13 + 9]
or rax, r14
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x90], rdi
lea r12, [rcx + rdi]
cmp rcx, rbx
ja 0x1400d1df1
cmp r12, rbx
ja 0x1400d2220
test rdi, rdi
je 0x1400d1e01
mov rdx, rbx
mov r8, rdi
call fcn.1400c4d00
lea r14, [rsi + 0x10]
mov byte [r12], 0
movsx rdi, byte [rsp + 0x9f]
test rdi, rdi
jns 0x1400d1e20
mov rdi, qword [rsp + 0x90]
jns 0x1400d1e2f
mov rcx, qword [rsp + 0x88]
call fcn.140091a2c
mov rax, qword [rsi + 0x10]
movsxd rcx, dword [rax + 4]
add rcx, r14
lea rbx, [rsp + 0x88]
mov rdx, rbx
call fcn.14003aab6
lea rdx, [0x140192048]
mov rcx, rbx
call fcn.14003e0dc
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x140174e48]
mov ebp, eax
mov rcx, rbx
call fcn.14003b7fa
mov rcx, r14
mov edx, ebp
call fcn.14002e23e
mov rcx, r14
call fcn.14002da68
mov qword [rsp + 0x50], r15
movaps xmm0, xmmword [0x140152e90]
movaps xmmword [rsp + 0x40], xmm0
mov eax, dword [rsi + 0x78]
test al, 0x10
je 0x1400d2297
mov rax, qword [rsi + 0x48]
mov r14, qword [rsi + 0x70]
cmp r14, rax
jae 0x1400d1eba
mov qword [rsi + 0x70], rax
mov r14, rax
mov r15, qword [rsi + 0x40]
sub r14, r15
js 0x1400d2220
cmp r14, r13
ja 0x1400d2271
cmp r14, 0x16
jbe 0x1400d20bc
lea rax, [r13 + 1]
and rax, r14
add rax, 8
mov r12, r14
or r12, 7
cmp r12, 0x17
cmove r12, rax
inc r12
mov rcx, r12
call fcn.1400919f0
mov rcx, rax
mov qword [rsp + 0x40], rax
add r13, 9
or r13, r12
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r14
lea r12, [rcx + r14]
cmp rcx, r15
ja 0x1400d1f2a
cmp r12, r15
ja 0x1400d2220
test r14, r14
je 0x1400d1f3a
mov rdx, r15
mov r8, r14
call fcn.1400c4d00
mov byte [r12], 0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], rbx
lea r15, [rsp + 0x28]
lea r14, [rsp + 0x40]
mov rcx, r15
mov rdx, r14
mov r9, 0xffffffffffffffff
call fcn.14003e762
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x7c], eax
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x68], 0x73
mov rax, qword [0x140161200]
mov al, byte [rax + 0x73]
test al, al
jne 0x1400d21df
cmp byte [rsp + 0x3f], 0
jns 0x1400d1fa9
mov rcx, qword [rsp + 0x28]
call fcn.140091a2c
cmp dword [rsi + 8], 3
jne 0x1400d1fbf
mov bpl, byte [0x140192f7c]
test bpl, bpl
je 0x1400d2136
mov rax, qword [0x140192f38]
test rax, rax
je 0x1400d1ff6
mov r9, qword [rsi + 0x118]
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
mov ecx, dword [rsi + 8]
mov qword [rsp + 0x20], r14
call qword [0x140174e48]
test al, al
jne 0x1400d2076
mov eax, dword [0x1401834bc]
test al, 2
je 0x1400d201b
cmp byte [rsp + 0x57], 0
jns 0x1400d200c
mov r14, qword [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1401834bc]
test al, 4
jne 0x1400d202c
test eax, 0xfffffffa
jne 0x1400d2072
cmp dword [rsi + 8], 2
jl 0x1400d2072
lea rbx, [rsp + 0x40]
movsx r14, byte [rbx + 0x17]
test r14, r14
cmovs r14, qword [rbx + 8]
cmovs rbx, qword [rbx]
test r14, r14
je 0x1400d2072
xor r15d, r15d
mov r8d, r14d
sub r8d, r15d
lea rdx, [rbx + r15]
mov ecx, 2
call fcn.1400aabac
test eax, eax
js 0x1400d206c
mov eax, eax
add r15, rax
cmp r15, r14
jb 0x1400d204a
mov eax, dword [0x1401834bc]
test al, 1
jne 0x1400d20ed
cmp dword [rsi + 8], 3
je 0x1400d20db
cmp byte [rsp + 0x57], 0
jns 0x1400d208d
mov rcx, qword [rsp + 0x40]
call fcn.140091a2c
lea rcx, [rsp + 0x60]
call fcn.14004eec0
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.140092f10
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [rsp + 0x40]
mov byte [rcx + 0x17], r14b
jmp 0x1400d1f18
lea rcx, [rsp + 0x88]
mov byte [rcx + 0x17], dil
jmp 0x1400d1ddf
lea r8, [rsp + 0x40]
mov rcx, rsi
mov rdx, rdi
call fcn.140108820
jmp 0x1400d207c
call fcn.1400d1a50
test al, al
je 0x1400d2076
lea r9, [rsp + 0x88]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x40]
movzx r8d, byte [rdx + 0x17]
test r8b, r8b
cmovs r8d, dword [rdx + 8]
cmovs rdx, qword [rdx]
mov rcx, qword [0x140192f20]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1400d2076
mov byte [0x140192f7c], 1
mov eax, dword [0x140192f88]
mov ecx, dword [0x14018fa98]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400d2222
mov rcx, rsi
mov rdx, rbx
call fcn.140108750
movsx rax, byte [rsp + 0x9f]
test rax, rax
jns 0x1400d218b
mov rax, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x88]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rax
test rax, rax
js 0x1400d2220
sete al
test rbx, rbx
setne cl
or cl, al
je 0x1400d2220
mov rcx, qword [0x140192f80]
lea rdx, [rsp + 0x28]
call fcn.1400644b0
cmp byte [rsp + 0x9f], 0
jns 0x1400d21d3
mov rcx, qword [rsp + 0x88]
call fcn.140091a2c
mov byte [0x140192f7c], bpl
jmp 0x1400d1fbf
movzx ecx, al
lea rax, [rsp + 0x70]
lea r9, [rsp + 0x88]
mov qword [r9], rax
lea rax, [rsp + 0x7c]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r15
lea rax, str.LogMessage
lea r8, [rsp + 0x80]
mov qword [r8], rax
lea rdx, [rsp + 0x68]
call fcn.140066f50
jmp 0x1400d1f98
ud2
lea rcx, [0x140192f88]
call fcn.140091a7c
cmp dword [0x140192f88], 0xffffffff
jne 0x1400d2162
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140064480
mov qword [0x140192f80], rax
lea rcx, [0x140192f88]
call fcn.140091b30
jmp 0x1400d2162
lea rcx, [rsp + 0x88]
call fcn.1400e6920
lea rcx, [rsp + 0x40]
call fcn.1400e6920
xor ebx, ebx
mov edi, 0
test al, 8
je 0x1400d20ca
mov rbx, qword [rsi + 0x28]
mov rdi, qword [rsi + 0x38]
jmp 0x1400d1d7c
xor r14d, r14d
mov r15d, 0
test al, 8
je 0x1400d20bc
mov r15, qword [rsi + 0x28]
mov r14, qword [rsi + 0x38]
jmp 0x1400d1ebe