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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x490
mov r12, rcx
mov rax, qword [0x1401c8018]
xor rax, rsp
mov qword [rsp + 0x488], rax
lea rax, [0x1401a2c00]
mov qword [rcx], rax
lea r15, [rcx + 0x10]
mov rax, qword [rcx + 0x10]
movsxd rcx, dword [rax + 4]
test byte [r12 + rcx + 0x30], 5
jne 0x1400515b2
mov rcx, qword [r15 + rcx + 0x28]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
mov dword [rsp + 0x20], 0x10
lea rbx, [rsp + 0x80]
mov rdx, rbx
xor r8d, r8d
mov r9d, 1
call qword [0x1401e9010]
mov r13, qword [rbx + 8]
mov rax, qword [r15]
movsxd rcx, dword [rax + 4]
add rcx, r15
lea rsi, [rsp + 0x80]
mov rdx, rsi
call fcn.1400aa570
lea rdx, [0x1401d59b8]
mov rcx, rsi
call fcn.1400aad80
mov rcx, qword [rax]
mov rdi, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, rdi
call qword [0x1401e9010]
mov ebx, eax
mov rcx, rsi
call fcn.1400aa680
mov rcx, r15
mov edx, ebx
call fcn.14003a610
mov rcx, r15
call fcn.140039780
lea r14, [r12 + 0x18]
movabs rsi, 0xaaaaaaaaaaaaaaaa
lea rbx, [rsp + 0x60]
mov qword [rbx + 0x10], rsi
movaps xmm0, xmmword [0x1401a01c0]
movaps xmmword [rbx], xmm0
mov rcx, r14
mov rdx, rbx
call fcn.14003a860
test byte [0x1401ca500], 0x19
jne 0x1400515be
mov rax, qword [0x1401d6770]
test rax, rax
je 0x1400514a7
mov r9, qword [r12 + 0x118]
mov r8d, dword [r12 + 0x128]
mov rdx, qword [r12 + 0x120]
mov ecx, dword [r12 + 8]
mov qword [rsp + 0x20], rbx
call qword [0x1401e9010]
test al, al
jne 0x14005151e
mov eax, dword [0x1401c9fa8]
test al, 2
jne 0x1400515de
test al, 4
jne 0x1400514c6
cmp dword [r12 + 8], 2
jl 0x14005150a
cmp eax, 1
ja 0x14005150a
mov ecx, 2
call fcn.1400d93c8
lea rcx, [rsp + 0x60]
movzx edx, byte [rcx + 0x17]
test dl, dl
cmovs rdx, qword [rcx + 8]
cmovs rcx, qword [rcx]
mov r8d, 1
mov r9, rax
call fcn.1400ef354
mov ecx, 2
call fcn.1400d93c8
mov rcx, rax
call fcn.1400ee0a8
mov eax, dword [0x1401c9fa8]
test al, 1
jne 0x1400515fe
cmp dword [r12 + 8], 3
je 0x14005164b
cmp byte [rsp + 0x77], 0
jns 0x14005152f
mov rcx, qword [rsp + 0x60]
call fcn.1400d4ef4
lea rcx, [r12 + 0x12c]
call fcn.1400be710
lea rbx, [r12 + 0x80]
mov rax, qword [r12 + 0x10]
movsxd rax, dword [rax + 4]
lea rcx, [0x1401a1b88]
mov qword [r12 + rax + 0x10], rcx
lea rax, [0x1401a1b90]
mov qword [r12 + 0x18], rax
cmp byte [r12 + 0x6f], 0
jns 0x140051576
mov rcx, qword [r15 + 0x48]
call fcn.1400d4ef4
mov rcx, r14
call fcn.1400a4210
mov rcx, r14
call fcn.1400a4320
mov rcx, rbx
call fcn.1400a4200
mov rcx, qword [rsp + 0x488]
xor rcx, rsp
call fcn.1400d5720
nop
add rsp, 0x490
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r13, 0xffffffffffffffff
jmp 0x1400513de
lea rdx, [rsp + 0x80]
mov qword [rdx], r12
mov qword [rdx + 8], rbx
lea rcx, str.LogMessage
call fcn.140126b20
jmp 0x14005146f
cmp byte [rsp + 0x77], 0
jns 0x1400515ea
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1401c9fa8]
jmp 0x1400514b5
call fcn.1401267b0
test al, al
je 0x140051512
lea r9, [rsp + 0x80]
mov dword [r9], 0xaaaaaaaa
lea rdx, [rsp + 0x60]
movzx r8d, byte [rdx + 0x17]
test r8b, r8b
cmovs r8d, dword [rdx + 8]
cmovs rdx, qword [rdx]
mov rcx, qword [0x1401d6788]
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140051512
mov rcx, qword [0x1401d85b0]
test rcx, rcx
je 0x14005167f
lea rax, [rsp + 0x60]
movzx ebx, byte [rax + 0x17]
test bl, bl
mov rdi, qword [rax]
cmovns rdi, rax
lea rdx, [rsp + 0x50]
mov qword [rdx], rdi
cmovs rbx, qword [rax + 8]
mov qword [rdx + 8], rbx
call fcn.140131c00
lea rbx, [rsp + 0x80]
mov r8d, 0x400
mov rcx, rbx
mov dl, 0xaa
call fcn.1400d8590
cmp byte [rsp + 0x77], 0
jns 0x1400516a5
mov rdx, qword [rsp + 0x60]
jmp 0x1400516aa
lea rdx, [rsp + 0x60]
mov r8d, 0x400
mov rcx, rbx
call fcn.1400b5a50
mov rcx, rbx
call fcn.1400a4320
call fcn.140126ab0
mov rcx, qword [rax + 0x10]
cmp rcx, qword [rax + 0x18]
je 0x14005178d
mov qword [rsp + 0x48], rsi
call fcn.140126ab0
mov rcx, qword [rax + 8]
mov rdx, qword [rax + 0x18]
test rdx, rdx
cmove rdx, rcx
dec rdx
cmp rcx, rdx
jb 0x140051790
shl rdx, 3
add rdx, qword [rax]
lea rsi, [rsp + 0x48]
mov rcx, rsi
call fcn.1400acca0
mov rbx, qword [rsi]
test rbx, rbx
je 0x14005177e
cmp byte [rsp + 0x77], 0
jns 0x140051722
mov rsi, qword [rsp + 0x60]
jmp 0x140051727
lea rsi, [rsp + 0x60]
mov rcx, rsi
add rcx, r13
mov qword [rsp + 0x38], rcx
je 0x140051793
call fcn.1400f5100
lea rcx, [rsp + 0x38]
mov qword [rcx + 8], rax
mov rax, qword [r12 + 0x118]
sub r13, rax
add rsi, rax
lea r9, [rsp + 0x28]
mov qword [r9], rsi
mov qword [r9 + 8], r13
mov r8d, dword [r12 + 0x128]
mov rdx, qword [r12 + 0x120]
mov rax, qword [rbx + 8]
mov qword [rsp + 0x20], rcx
mov rcx, rbx
call qword [0x1401e9010]
lea rcx, [rsp + 0x48]
call fcn.1400acc80
jmp 0x14005151e
int3
int3
int3