Function at 0x140018bd0
Capabilities:
Write file on windows

Disassembly:
test r8d, r8d
je 0x140018ed2
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0xa0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x80], rax
cmp dword [0x14008421c], 0
mov r14, r9
mov rsi, qword [rsp + 0xf0]
mov rdi, rdx
mov ebp, r8d
mov r15, rcx
mov qword [rsp + 0x98], rbx
jne 0x140018e6c
xor r14d, r14d
cmp dword [0x140082cd8], r14d
je 0x140018c9d
lea rdx, str.e_2J
mov dword [0x140082cd8], r14d
mov rcx, rdi
call fcn.140032368
test rax, rax
je 0x140018c9d
call fcn.140014780
mov rcx, rax
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140018c9d
movsx eax, word [rsp + 0x44]
movsx ecx, word [rsp + 0x3e]
sub ecx, eax
call fcn.140014ea0
cmp dword [0x140084224], r14d
je 0x140018c9d
call fcn.140014780
mov rcx, rax
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140018c9d
mov rax, qword [rsp + 0x5a]
mov qword [0x140084228], rax
cmp dword [0x14008423c], r14d
jne 0x140018d48
cmp ebp, 5
jb 0x140018d48
lfence
lea rdx, str.e__1h
mov rcx, rdi
mov rbx, r14
call fcn.140032368
test rax, rax
je 0x140018cf7
nop dword [rax]
lea rcx, [rax + 1]
mov rbx, rax
lea rdx, str.e__1h
call fcn.140032368
test rax, rax
jne 0x140018cd0
test rbx, rbx
je 0x140018cf7
mov dword [0x140084250], 1
lfence
lea rdx, str.e__1l
mov rcx, rdi
call fcn.140032368
test rax, rax
je 0x140018d48
nop
lea rcx, [rax + 1]
mov rsi, rax
lea rdx, str.e__1l
call fcn.140032368
test rax, rax
jne 0x140018d10
test rsi, rsi
je 0x140018d48
test rbx, rbx
je 0x140018d41
mov dword [0x140084250], 1
cmp rbx, rsi
ja 0x140018d48
mov dword [0x140084250], r14d
cmp dword [0x140084224], r14d
je 0x140018e27
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x2c
mov rcx, rax
mov rbx, rax
call qword [sym.imp.USER32.dll_GetWindowPlacement]
call fcn.140014780
mov rcx, rax
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140018e27
movzx ecx, word [0x14008422a]
cmp word [rsp + 0x44], cx
jne 0x140018dab
movzx eax, word [0x14008422e]
cmp word [rsp + 0x48], ax
je 0x140018e27
mov rax, qword [0x140084228]
movsx r8d, word [0x14008422c]
movsx ecx, ax
mov edx, r8d
sub edx, ecx
movsx ecx, word [rsp + 0x38]
cmp edx, ecx
jg 0x140018dd9
cmp dword [rsp + 0x58], 3
je 0x140018dd9
mov edx, 9
jmp 0x140018e04
sub r8w, ax
movzx eax, word [rsp + 0x3a]
mov word [rsp + 0x32], ax
mov word [rsp + 0x30], r8w
call fcn.140014780
mov edx, dword [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleScreenBufferSize]
mov edx, 3
mov rcx, rbx
call qword [sym.imp.USER32.dll_ShowWindow]
call fcn.140014780
mov rcx, rax
lea r8, [0x140084228]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
xor r9d, r9d
mov qword [rsp + 0x20], r14
mov r8d, ebp
mov rdx, rdi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x140084224], r14d
je 0x140018eac
call fcn.140014780
mov rcx, rax
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140018eac
mov rax, qword [rsp + 0x5a]
mov qword [0x140084228], rax
jmp 0x140018eac
cmp ebp, 1
jne 0x140018e79
cmp byte [rdx], 0xd
jne 0x140018e79
mov byte [rdx], 0xa
add rbp, rdi
nop dword [rax]
mov r9, rsi
mov r8, r14
mov rdx, rbp
mov rcx, rdi
mov rbx, rdi
call fcn.1400190f0
mov rdi, rax
cmp rax, rbx
je 0x140018eac
cmp rax, rbp
jae 0x140018eac
test rsi, rsi
je 0x140018e80
cmp qword [rsi], 0
je 0x140018e80
mov rbx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.1400313f0
add rsp, 0xa0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret