Function at 0x1400b17d0
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
push rsi
push rdi
sub rsp, 0x528
mov rax, qword [0x1401f22c8]
xor rax, rsp
mov qword [rsp + 0x4f0], rax
mov eax, dword [0x1401f371c]
mov rsi, r8
mov rdi, rdx
test eax, eax
mov dword [rsp + 0x58], ecx
je 0x1400b1c42
mov qword [r11 + 8], rbx
lea rcx, [0x1401f36f0]
mov qword [r11 - 0x20], r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r12d, r12d
cmp qword [0x1401e58a0], 0xffffffffffffffff
je 0x1400b1962
lea rcx, [rsp + 0x90]
call fcn.1401617b0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rsp + 0x6a]
movzx edx, word [rsp + 0x68]
movzx r11d, word [rsp + 0x6e]
movzx eax, word [rsp + 0x6c]
movzx r10d, word [rsp + 0x66]
movzx r9d, word [rsp + 0x62]
movzx r8d, word [rsp + 0x60]
mov dword [rsp + 0x40], r11d
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x28], edx
lea rdx, str._04d__02d__02d__02d:_02d:_02d._03d:
lea rcx, [rsp + 0x90]
mov dword [rsp + 0x20], r10d
call fcn.140162e20
mov r8d, dword [rsp + 0x90]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [0x1401e58a0]
lea r9, [rsp + 0x54]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rsp + 0x90]
mov r8, rsi
mov rdx, rdi
call fcn.140162d80
movsxd r8, dword [rsp + 0x90]
mov rdx, qword [rsp + 0x98]
cmp r8d, 2
mov ebx, r12d
jl 0x1400b1909
cmp byte [r8 + rdx - 2], 0xd
je 0x1400b1909
cmp byte [r8 + rdx - 1], 0xa
jne 0x1400b1909
sub r8d, 1
lea ebx, [r12 + 1]
mov dword [rsp + 0x90], r8d
mov rcx, qword [0x1401e58a0]
lea r9, [rsp + 0x54]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test ebx, ebx
je 0x1400b1948
mov rcx, qword [0x1401e58a0]
lea r9, [rsp + 0x54]
lea rdx, [0x14019aef8]
mov r8d, 2
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [0x1401e58a0]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea rcx, [rsp + 0x90]
call fcn.140001150
cmp dword [0x1401f3718], r12d
je 0x1400b1c25
lea rcx, [rsp + 0x1b0]
mov qword [rsp + 0x510], r13
call fcn.1401617b0
lea rcx, [rsp + 0x1b0]
mov r8, rsi
mov rdx, rdi
call fcn.140162d80
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetFileType]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x1400b1b75
lea rcx, [rsp + 0x2d0]
call fcn.1401617b0
mov rdx, qword [rsp + 0x1b8]
lea rcx, [rsp + 0x2d0]
call fcn.140167a80
mov rbx, qword [rsp + 0x2d8]
cmp word [rbx], r12w
je 0x1400b1b63
mov ecx, dword [rsp + 0x58]
mov qword [rsp + 0x520], rbp
mov qword [rsp + 0x508], r14
mov r14d, ecx
mov qword [rsp + 0x500], r15
movzx r15d, word [rsp + 0x50]
and r14d, 0xff000000
mov edx, recv
movzx eax, word [rbx]
mov rbp, rbx
test ax, ax
je 0x1400b1a69
cmp ax, 0xd
jne 0x1400b1a52
cmp word [rbx + 2], 0xa
jne 0x1400b1a5c
mov rsi, rbx
mov r12d, 1
sub rsi, rbp
sar rsi, 1
add rbx, 4
jmp 0x1400b1a74
cmp ax, 0xa
je 0x1400b1b09
mov ax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x1400b1a30
mov rax, rbx
sub rax, rbp
sar rax, 1
mov esi, eax
test r14d, r14d
je 0x1400b1ac3
test ecx, 0xff0000
mov di, 8
cmovne di, dx
test ecx, 0xff00
je 0x1400b1a93
or di, 2
test cl, cl
je 0x1400b1a9b
or di, 1
lea rdx, [rsp + 0x70]
mov rcx, r13
mov r15w, 7
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movzx edx, di
mov rcx, r13
test eax, eax
cmovne r15w, word [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea r9, [rsp + 0x50]
mov r8d, esi
mov rdx, rbp
mov rcx, r13
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test r12d, r12d
je 0x1400b1b23
xor r12d, r12d
lea r9, [rsp + 0x50]
lea rdx, [0x1401a2940]
lea r8d, [r12 + 2]
mov rcx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x1400b1b26
mov rax, rbx
mov r12d, 1
sub rax, rbp
sar rax, 1
add rbx, 2
mov esi, eax
jmp 0x1400b1a74
xor r12d, r12d
test r14d, r14d
je 0x1400b1b38
movzx edx, r15w
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp word [rbx], 0
mov ecx, dword [rsp + 0x58]
mov edx, recv
jne 0x1400b1a25
mov r15, qword [rsp + 0x500]
mov r14, qword [rsp + 0x508]
mov rbp, qword [rsp + 0x520]
lea rcx, [rsp + 0x2d0]
call fcn.140001150
jmp 0x1400b1c10
mov rbx, qword [rsp + 0x1b8]
cmp byte [rbx], r12b
je 0x1400b1c10
nop
nop
nop
movzx eax, byte [rbx]
mov rdx, rbx
mov edi, r12d
test al, al
je 0x1400b1bce
nop
cmp al, 0xd
jne 0x1400b1bbb
cmp byte [rbx + 1], 0xa
jne 0x1400b1bc3
mov r8d, ebx
mov edi, 1
sub r8d, edx
add rbx, 2
jmp 0x1400b1bd4
cmp al, 0xa
je 0x1400b1c5c
mov al, byte [rbx + 1]
add rbx, 1
test al, al
jne 0x1400b1ba0
mov r8d, ebx
sub r8d, edx
lea r9, [rsp + 0x50]
mov rcx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test edi, edi
je 0x1400b1c0b
lea r9, [rsp + 0x50]
lea rdx, [0x14019aef8]
mov r8d, 2
mov rcx, r13
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp byte [rbx], r12b
jne 0x1400b1b90
lea rcx, [rsp + 0x1b0]
call fcn.140001150
mov r13, qword [rsp + 0x510]
lea rcx, [0x1401f36f0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r12, qword [rsp + 0x518]
mov rbx, qword [rsp + 0x540]
mov rcx, qword [rsp + 0x4f0]
xor rcx, rsp
call fcn.1401931f0
add rsp, 0x528
pop rdi
pop rsi
ret
mov r8d, ebx
mov edi, 1
sub r8d, edx
add rbx, rdi
jmp 0x1400b1bd4