Function at 0x1400af3e0
Capabilities:
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
movabs r12, 0xaaaaaaaaaaaaaaaa
lea rcx, [rsp + 0x98]
mov qword [rcx], r12
call fcn.14003de90
lea rbx, [rsi + 0x10]
lea r15, [rsi + 0x18]
lea rdi, [rsp + 0x50]
mov rcx, r15
mov rdx, rdi
call fcn.14003c340
lea r14, [rsp + 0x30]
lea r8, [rsp + 0x70]
mov rcx, r14
mov rdx, rdi
call fcn.1400597b0
movsx rdi, byte [r14 + 0x17]
test rdi, rdi
jns 0x1400af44c
mov rdi, qword [rsp + 0x38]
jns 0x1400af458
mov rcx, qword [rsp + 0x30]
call fcn.14005c694
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
mov r14, qword [rbx + rax + 0x30]
mov qword [rsp + 0x30], r14
lea r13, [0x14011a690]
cmp r14, r13
jne 0x1400af77d
lea rdx, [0x14011b390]
lea rcx, [rsp + 0x30]
call fcn.140052cb0
mov rcx, qword [rax]
mov r8, qword [rcx + 0x38]
mov rcx, rax
mov dl, 0xa
mov rax, r8
call qword [0x1400ff3b8]
mov ebp, eax
cmp r14, r13
jne 0x1400af787
mov rcx, rbx
mov edx, ebp
call fcn.140091e60
mov rcx, rbx
call fcn.140091d50
lea rbx, [rsp + 0x50]
mov qword [rbx + 0x10], r12
movaps xmm0, xmmword [0x1400edb10]
movaps xmmword [rbx], xmm0
lea r14, [rsp + 0x30]
mov rcx, r15
mov rdx, r14
call fcn.14003c340
lea r8, [rsp + 0x70]
mov rcx, rbx
mov rdx, r14
call fcn.1400597b0
mov r8, qword [rsi + 0x118]
mov qword [rsp + 0x20], r14
lea r15, [rsp + 0x70]
mov rcx, r15
mov rdx, rbx
mov r9, 0xffffffffffffffff
call fcn.14005a5a0
mov eax, dword [rsi + 0x128]
mov rcx, qword [rsi + 0x120]
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0x88], 0x57
mov al, byte [0x14011b417]
test al, al
jne 0x1400af6f7
cmp byte [rsp + 0x87], 0
jns 0x1400af559
mov rcx, qword [rsp + 0x70]
call fcn.14005c694
mov eax, dword [rsi + 8]
cmp eax, 3
jne 0x1400af613
mov eax, 3
cmp byte [0x14011b654], 0
jne 0x1400af613
mov byte [0x14011b654], 1
mov eax, dword [0x14011b660]
mov ecx, dword [0x1401188d0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x1400af73b
mov rcx, rsi
mov rdx, r14
call fcn.1400af7b0
movsx rax, byte [rsp + 0x47]
test rax, rax
jns 0x1400af5c3
mov rax, qword [rsp + 0x38]
mov r14, qword [rsp + 0x30]
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], rax
test rax, rax
js 0x1400af6f5
sete al
test r14, r14
setne cl
or cl, al
je 0x1400af6f5
mov rcx, qword [0x14011b658]
lea rdx, [rsp + 0x70]
call fcn.1400061c0
cmp byte [rsp + 0x47], 0
jns 0x1400af609
mov rcx, qword [rsp + 0x30]
call fcn.14005c694
mov byte [0x14011b654], 0
mov eax, dword [rsi + 8]
cmp eax, 2
jl 0x1400af639
movsx r14, byte [rsp + 0x67]
test r14, r14
cmovs r14, qword [rsp + 0x58]
mov r15, qword [rsp + 0x50]
cmovns r15, rbx
test r14, r14
jne 0x1400af6c7
call fcn.1400aed30
test al, al
je 0x1400af67c
lea r9, [rsp + 0x30]
mov dword [r9], 0xaaaaaaaa
movzx r8d, byte [rsp + 0x67]
test r8b, r8b
cmovs r8d, dword [rsp + 0x58]
cmovs rbx, qword [rsp + 0x50]
mov rcx, qword [0x14011b620]
mov qword [rsp + 0x20], 0
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsi + 8], 3
je 0x1400af6b5
cmp byte [rsp + 0x67], 0
jns 0x1400af693
mov rcx, qword [rsp + 0x50]
call fcn.14005c694
lea rcx, [rsp + 0x98]
call fcn.14005afd0
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, [rsp + 0x50]
mov rcx, rsi
mov rdx, rdi
call fcn.1400af880
jmp 0x1400af682
xor r12d, r12d
mov r8d, r14d
sub r8d, r12d
lea rdx, [r15 + r12]
mov ecx, 2
call fcn.1400751b0
test eax, eax
js 0x1400af639
mov eax, eax
add r12, rax
cmp r12, r14
jb 0x1400af6ca
jmp 0x1400af639
ud2
movzx ecx, al
lea rax, [rsp + 0x90]
lea r9, [rsp + 0x30]
mov qword [r9], rax
lea rax, [rsp + 0x4c]
mov qword [r9 + 8], rax
mov qword [r9 + 0x10], r15
lea rax, str.LogMessage
lea r8, [rsp + 0xa0]
mov qword [r8], rax
lea rdx, [rsp + 0x88]
call fcn.1400afe70
jmp 0x1400af545
lea rcx, [0x14011b660]
call fcn.14005c764
cmp dword [0x14011b660], 0xffffffff
jne 0x1400af5a3
lea rcx, str.LOG_FATAL
mov edx, 0x400
call fcn.14003c6c0
mov qword [0x14011b658], rax
lea rcx, [0x14011b660]
call fcn.14005c6f8
jmp 0x1400af5a3
lock inc dword [r14 + 8]
jmp 0x1400af479
mov eax, 0xffffffff
lock xadd dword [r14 + 8], eax
test eax, eax
jne 0x1400af4aa
mov rax, qword [r14]
mov rax, qword [rax + 8]
mov rcx, r14
call qword [0x1400ff3b8]
jmp 0x1400af4aa