Function at 0x140020c80
Capabilities:
Write file on windows

Disassembly:
push r13
push r14
push r15
sub rsp, 0x80
mov r13d, edx
mov r8, qword [0x1400a3fc0]
mov r14, rcx
xor r8, rsp
mov qword [rsp + 0x78], r8
cmp r13d, 0xffffffff
jne 0x140020cd7
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
xor eax, eax
add rsp, 0x80
pop r15
pop r14
pop r13
ret
call fcn.140081cb0
mov rdx, qword [r14 + 0x40]
mov rdx, qword [rdx]
test rdx, rdx
je 0x140020cf9
mov r9, qword [r14 + 0x58]
mov r8d, dword [r9]
movsxd rcx, r8d
add rcx, rdx
cmp rdx, rcx
jb 0x140020f1a
cmp qword [r14 + 0x80], 0
jne 0x140020d30
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
mov eax, 0xffffffff
add rsp, 0x80
pop r15
pop r14
pop r13
ret
mov rcx, qword [r14 + 0x18]
lea rdx, [r14 + 0x70]
cmp rdx, qword [rcx]
je 0x140020ef3
mov rcx, qword [r14 + 0x68]
test rcx, rcx
je 0x140020eb8
mov r8, rsp
lea r11, [rsp + 0x40]
mov byte [r11 + 0x10], r13b
lea r15, [rsp + 0x51]
mov r10, qword [rcx]
lea rdx, [r14 + 0x74]
lea r9, [rsp + 0x51]
mov qword [r8 + 0x20], r11
lea r11, [rsp + 0x71]
mov qword [r8 + 0x30], r11
lea r11, [rsp + 0x48]
mov qword [r8 + 0x28], r15
mov qword [r8 + 0x38], r11
lea r8, [rsp + 0x50]
call qword [r10 + 0x38]
cmp eax, 1
ja 0x140020e3a
mov r15, qword [rsp + 0x48]
lea rdx, [rsp + 0x51]
sub r15, rdx
je 0x140020dc5
mov r9, qword [r14 + 0x80]
lea rcx, [rsp + 0x51]
mov edx, 1
mov r8, r15
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp r15, rax
jne 0x140020e09
mov byte [r14 + 0x71], 1
lea rdx, [rsp + 0x50]
mov ecx, 0xffffffff
cmp rdx, qword [rdx - 0x10]
cmove r13d, ecx
mov rcx, qword [rdx + 0x28]
mov qword [rdx + 0x28], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
mov eax, r13d
add rsp, 0x80
pop r15
pop r14
pop r13
ret
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
mov eax, 0xffffffff
add rsp, 0x80
pop r15
pop r14
pop r13
ret
cmp eax, 3
jne 0x140020e87
mov rdx, qword [r14 + 0x80]
movsx ecx, byte [rsp + 0x50]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, 0xffffffff
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
cmove r13d, eax
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
mov eax, r13d
add rsp, 0x80
pop r15
pop r14
pop r13
ret
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
mov eax, 0xffffffff
add rsp, 0x80
pop r15
pop r14
pop r13
ret
movsx rcx, r13b
mov rdx, qword [r14 + 0x80]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, 0xffffffff
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
cmove r13d, eax
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
jmp 0x140020df8
mov rdx, qword [r14 + 0x88]
mov r8, qword [r14 + 0x90]
mov qword [rcx], rdx
sub r8, rdx
mov rcx, qword [r14 + 0x38]
mov qword [rcx], rdx
mov r9, qword [r14 + 0x50]
mov dword [r9], r8d
jmp 0x140020d41
dec r8d
mov dword [r9], r8d
mov rcx, qword [r14 + 0x40]
mov r8, qword [rcx]
lea rdx, [r8 + 1]
mov qword [rcx], rdx
mov byte [r8], r13b
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x78], 0
xor rcx, rsp
cmp rcx, qword [0x1400a3fc0]
jne 0x140020cd2
jmp 0x140020df8