Function at 0x140055870
Capabilities:
Write file on windows

Disassembly:
push rbp
push rdi
push r15
sub rsp, 0x70
mov rax, qword [0x1400f5608]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp byte [rcx + 0x108], 0
mov rdi, rdx
mov r15, rcx
je 0x14005589d
call qword [sym.imp.KERNEL32.dll_AllocConsole]
movzx eax, byte [r15 + 0x109]
neg al
sbb ecx, ecx
add ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x1400558d7
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::append__Unable_to_get_STD_OUTPUT_HANDLE.
xor r8d, r8d
call fcn.14003b5e0
jmp 0x140055a7d
mov rcx, rbp
mov qword [rsp + 0xa0], rbx
call qword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, eax
test eax, eax
jne 0x140055914
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x140055914
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::append__Error_retrieving_handle_type.
xor r8d, r8d
call fcn.14003b5e0
jmp 0x140055a75
mov rdx, rdi
mov qword [rsp + 0x60], r14
mov rcx, r15
call fcn.1400452f0
mov r14, rax
cmp qword [rax + 0x18], 0x10
mov rdi, qword [rax + 0x10]
jb 0x140055935
mov r14, qword [rax]
mov qword [rsp + 0xa8], rsi
cmp ebx, 2
jne 0x140055a93
lea rdx, [rsp + 0x34]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140055a93
xor esi, esi
mov qword [rsp + 0x68], r12
mov ebx, esi
mov r12d, esi
cmp dword [r15 + 0x10c], ebx
je 0x1400559e0
lea rdx, [rsp + 0x38]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x1400559a0
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::write_console:_GetConsoleScreenBufferInfo_failed
xor r8d, r8d
call fcn.14003b5e0
lea r12d, [rsi + 7]
jmp 0x1400559e0
movzx edx, word [r15 + 0x10c]
mov rcx, rbp
movzx r12d, word [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x1400559e0
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
xor r8d, r8d
call fcn.14003b5e0
nop dword [rax]
nop word [rax + rax]
mov r8d, 0xffff
mov edx, ebx
mov eax, edi
mov dword [rsp + 0x30], esi
sub eax, ebx
mov qword [rsp + 0x20], rsi
cmp eax, r8d
lea r9, [rsp + 0x30]
mov rcx, rbp
cmovb r8d, eax
add rdx, r14
call qword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
je 0x140055a1b
add ebx, dword [rsp + 0x30]
cmp ebx, edi
jne 0x1400559e0
jmp 0x140055a32
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::write_console__WriteConsole_has_failed.
xor r8d, r8d
call fcn.14003b5e0
cmp dword [r15 + 0x10c], esi
je 0x140055a63
movzx edx, r12w
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x140055a63
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::write_console:_SetConsoleTextAttribute_failed
xor r8d, r8d
call fcn.14003b5e0
mov r12, qword [rsp + 0x68]
mov rsi, qword [rsp + 0xa8]
mov r14, qword [rsp + 0x60]
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14008bad0
add rsp, 0x70
pop r15
pop rdi
pop rbp
ret
xor esi, esi
mov ebx, esi
nop word [rax + rax]
mov r8d, edi
mov edx, ebx
sub r8d, ebx
mov dword [rsp + 0x30], esi
add rdx, r14
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x30]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140055ad0
add ebx, dword [rsp + 0x30]
cmp ebx, edi
jne 0x140055aa0
jmp 0x140055a68
call fcn.14003a3c0
mov rcx, rax
lea rdx, str.Win32ConsoleAppender::write_handle__WriteFile_has_failed.
xor r8d, r8d
call fcn.14003b5e0
jmp 0x140055a68