Function at 0x140057120
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 [0x1400e8040]
xor rax, rsp
mov qword [rsp + 0xa0], rax
movabs rdi, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x48], rdi
lea rcx, [rsp + 0x48]
call fcn.1400684a0
lea r14, [rsi + 0x10]
lea rbx, [rsi + 0x18]
lea rdx, [rsp + 0x50]
lea r8, [rsp + 0x88]
mov rcx, rbx
call fcn.14001c770
movsx rax, byte [rsp + 0x67]
mov qword [rsp + 0x28], rax
test rax, rax
jns 0x1400571a2
mov rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x28], rax
call fcn.14008bb84
mov rax, qword [rsi + 0x10]
movsxd rcx, dword [rax + 4]
add rcx, r14
lea r12, [rsp + 0x50]
mov rdx, r12
call fcn.140027420
lea rdx, [0x1400f8528]
mov rcx, r12
call fcn.140045a20
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x1400ddbf8]
mov ebp, eax
mov rcx, r12
call fcn.1400298b0
mov rcx, r14
mov edx, ebp
call fcn.1400199a0
mov rcx, r14
call fcn.140018870
mov qword [rsp + 0x40], rdi
movaps xmm0, xmmword [0x1400c9a30]
movaps xmmword [rsp + 0x30], xmm0
lea r12, [rsp + 0x30]
lea r8, [rsp + 0x50]
mov rcx, rbx
mov rdx, r12
call fcn.14001c770
mov rdi, qword [rsi + 0x118]
movsx r15, byte [rsp + 0x47]
test r15, r15
js 0x14005723f
mov r14, rbx
cmp rdi, r15
jbe 0x140057255
jmp 0x14005764c
mov r15, qword [rsp + 0x38]
cmp r15, rdi
jb 0x14005764c
mov r14, rbx
mov r12, qword [rsp + 0x30]
movabs rbx, 0x7ffffffffffffff7
mov r13, r15
sub r13, rdi
cmp r13, rbx
ja 0x140057659
add r12, rdi
cmp r13, 0x16
ja 0x140057289
mov byte [rsp + 0x9f], r13b
lea rax, [rsp + 0x88]
jmp 0x1400572cd
lea rax, [rbx + 1]
and rax, r13
add rax, 8
mov rbp, r13
or rbp, 7
cmp rbp, 0x17
cmove rbp, rax
inc rbp
mov rcx, rbp
call fcn.14008bb48
mov qword [rsp + 0x88], rax
add rbx, 9
or rbx, rbp
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0x90], r13
lea rbx, [rax + r13]
cmp rax, r12
ja 0x1400572df
cmp rbx, r12
ja 0x14005764a
cmp r15, rdi
je 0x1400572f2
mov rcx, rax
mov rdx, r12
mov r8, r13
call fcn.1400bc060
mov byte [rbx], 0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x84], eax
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], 0x57
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x84]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x68], rax
mov rax, qword [0x1400d3350]
movzx eax, byte [rax + 0x57]
test al, al
jne 0x140057369
cmp byte [rsp + 0x9f], 0
js 0x140057380
cmp dword [rsi + 8], 3
je 0x140057397
jmp 0x1400574da
movzx edx, al
lea rcx, [rsp + 0x50]
call fcn.1400580c0
cmp byte [rsp + 0x9f], 0
jns 0x14005735e
mov rcx, qword [rsp + 0x88]
call fcn.14008bb84
cmp dword [rsi + 8], 3
jne 0x1400574da
movzx ebp, byte [0x1400f92c4]
test bpl, bpl
jne 0x1400574da
mov byte [0x1400f92c4], 1
mov eax, dword [0x1400f92d0]
mov ecx, dword [0x1400f65f8]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140057666
lea r8, [rsp + 0x88]
mov rcx, r14
lea rdi, [rsp + 0x50]
mov rdx, rdi
call fcn.14001c770
cmp byte [rsp + 0x67], 0
jns 0x1400573f7
mov rdi, qword [rsp + 0x50]
add rdi, qword [rsi + 0x118]
mov ebx, dword [rsi + 0x128]
mov r15, qword [rsi + 0x120]
test r15, r15
je 0x14005742a
mov rcx, r15
mov edx, 0x5c
call fcn.14008e890
lea r8, [rax + 1]
test rax, rax
cmove r8, r15
jmp 0x14005742d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea rdx, str._s:_d:__s
lea r14, [rsp + 0x88]
mov rcx, r14
mov r9d, ebx
call fcn.1400534e0
cmp byte [rsp + 0x67], 0
jns 0x14005745d
mov rcx, qword [rsp + 0x50]
call fcn.14008bb84
movsx rax, byte [rsp + 0x9f]
test rax, rax
js 0x140057477
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], rax
jmp 0x1400574ab
mov rax, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x90]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rcx
test rcx, rcx
js 0x14005764a
sete cl
test rax, rax
setne al
or al, cl
je 0x14005764a
mov rcx, qword [0x1400f92c8]
lea rdx, [rsp + 0x50]
call fcn.140065290
cmp byte [rsp + 0x9f], 0
jns 0x1400574d3
mov rcx, qword [rsp + 0x88]
call fcn.14008bb84
mov byte [0x1400f92c4], bpl
mov rax, qword [0x1400f9280]
test rax, rax
je 0x140057516
mov r9, qword [rsi + 0x118]
mov r8d, dword [rsi + 0x128]
mov rdx, qword [rsi + 0x120]
mov ecx, dword [rsi + 8]
lea r10, [rsp + 0x30]
mov qword [rsp + 0x20], r10
call qword [0x1400ddbf8]
test al, al
jne 0x1400575f2
mov eax, dword [0x1400ea478]
test al, 2
je 0x14005753f
cmp byte [rsp + 0x47], 0
jns 0x14005752e
mov rcx, qword [rsp + 0x30]
jmp 0x140057533
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x1400ea478]
test al, 4
jne 0x140057550
test eax, 0xfffffffa
jne 0x1400575a8
cmp dword [rsi + 8], 2
jl 0x1400575a8
movsx rdi, byte [rsp + 0x47]
test rdi, rdi
cmovs rdi, qword [rsp + 0x38]
lea rbx, [rsp + 0x30]
cmovs rbx, qword [rsp + 0x30]
test rdi, rdi
je 0x1400575a8
xor r14d, r14d
nop word cs:[rax + rax]
mov r8d, edi
sub r8d, r14d
lea rdx, [rbx + r14]
mov ecx, 2
call fcn.1400a279c
test eax, eax
js 0x1400575a2
mov eax, eax
add r14, rax
cmp r14, rdi
jb 0x140057580
mov eax, dword [0x1400ea478]
test al, 1
je 0x1400575f2
call fcn.1400565d0
test al, al
je 0x1400575f2
mov dword [rsp + 0x50], 0xaaaaaaaa
movzx r8d, byte [rsp + 0x47]
test r8b, r8b
cmovs r8d, dword [rsp + 0x38]
lea rdx, [rsp + 0x30]
cmovs rdx, qword [rsp + 0x30]
mov rcx, qword [0x1400f9268]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
jne 0x14005760a
lea r8, [rsp + 0x30]
mov rcx, rsi
mov rdx, qword [rsp + 0x28]
call fcn.140057770
cmp byte [rsp + 0x47], 0
jns 0x14005761b
mov rcx, qword [rsp + 0x30]
call fcn.14008bb84
lea rcx, [rsp + 0x48]
call fcn.1400684e0
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14008cf80
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
lea rcx, [rsp + 0x88]
call fcn.14001bf40
lea rcx, [rsp + 0x88]
call fcn.14001ba70
lea rcx, [0x1400f92d0]
call fcn.14008bbcc
cmp dword [0x1400f92d0], 0xffffffff
jne 0x1400573d3
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.140065260
mov qword [0x1400f92c8], rax
lea rcx, [0x1400f92d0]
call fcn.14008bc80
jmp 0x1400573d3