Function at 0x11011fbd4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a50]
mov eax, 0x1b50
call fcn.110172f20
sub rsp, rax
mov rax, qword [0x110190928]
xor rax, rsp
mov qword [rbp + 0x1a40], rax
xor r13d, r13d
mov r14d, r8d
xor edi, edi
movsxd rbx, ecx
mov dword [rsp + 0x44], r13d
mov r15, rdx
test r8d, r8d
je 0x1101202f3
test rdx, rdx
jne 0x11011fc59
call sym.msvcrt.dll___doserrno
and dword [rax], edi
call sym.msvcrt.dll__errno
and qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov dword [rax], 0x16
call sym.msvcrt.dll__invalid_parameter
or eax, 0xffffffff
jmp 0x1101202f5
mov rax, rbx
mov qword [rsp + 0x78], rbx
and eax, 0x1f
lea rdx, [sym.msvcrt.dll___pioinfo]
imul r12, rax, 0x38
mov rcx, rbx
sar rcx, 5
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], r12
mov rcx, qword [rdx + rcx*8]
mov esi, dword [r12 + rcx + 0xc]
and esi, 3
lea eax, [rsi - 1]
cmp eax, 1
ja 0x11011fc9d
mov eax, r14d
not eax
test al, 1
je 0x11011fc2b
test byte [r12 + rcx + 8], 0x20
je 0x11011fcb2
xor edx, edx
mov ecx, ebx
lea r8d, [rdx + 2]
call fcn.11011d3e8
mov ecx, ebx
call sym.msvcrt.dll__isatty
lea rcx, [sym.msvcrt.dll___pioinfo]
test eax, eax
je 0x11011ff6a
mov rax, qword [rsp + 0x58]
mov rax, qword [rcx + rax*8]
cmp byte [r12 + rax + 8], dil
jge 0x11011ff6a
call fcn.11013a9e0
lea rdx, [rsp + 0x54]
mov rcx, qword [rax + 0xc0]
mov rax, qword [rsp + 0x58]
mov ebx, dword [rcx + 0x14]
lea rcx, [sym.msvcrt.dll___pioinfo]
mov rcx, qword [rcx + rax*8]
mov rcx, qword [r12 + rcx]
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
test eax, eax
je 0x11011ff63
test ebx, ebx
jne 0x11011fd1e
test esi, esi
je 0x11011ff63
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleCP]
and dword [rsp + 0x4c], edi
mov rbx, r15
mov dword [rsp + 0x54], eax
test r14d, r14d
je 0x11011ff5a
mov r13d, dword [rsp + 0x54]
mov r12d, 0xd
test esi, esi
jne 0x11011fedf
movsx eax, byte [rbx]
xor r13d, r13d
cmp al, 0xa
mov byte [rsp + 0x50], al
mov ecx, eax
sete r13b
call sym.msvcrt.dll_isleadbyte
test eax, eax
jne 0x11011fdb5
lea r8d, [rsi + 1]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call sym.msvcrt.dll_mbtowc
cmp eax, 0xffffffff
jne 0x11011fddf
mov ebx, dword [rsp + 0x4c]
mov r13d, dword [rsp + 0x44]
test edi, edi
jne 0x1101202ec
test ebx, ebx
je 0x1101202b2
cmp ebx, 5
jne 0x1101202a6
call sym.msvcrt.dll__errno
mov dword [rax], 9
call sym.msvcrt.dll___doserrno
mov dword [rax], ebx
jmp 0x11011fc51
mov rax, r14
sub rax, rbx
add rax, r15
cmp rax, 1
jle 0x11011fd7c
mov r8d, 2
lea rcx, [rsp + 0x40]
mov rdx, rbx
call sym.msvcrt.dll_mbtowc
cmp eax, 0xffffffff
je 0x11011fd7c
inc rbx
and qword [rsp + 0x38], 0
lea rax, [rbp - 0x80]
and qword [rsp + 0x30], 0
lea r8, [rsp + 0x40]
mov ecx, dword [rsp + 0x54]
mov r9d, 1
mov dword [rsp + 0x28], 5
xor edx, edx
mov qword [rsp + 0x20], rax
inc rbx
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov r12d, eax
test eax, eax
je 0x11011fd7c
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x4c]
and qword [rsp + 0x20], 0
lea rdx, [rbp - 0x80]
mov rax, rcx
mov r8d, r12d
and ecx, 0x1f
sar rax, 5
imul r10, rcx, 0x38
lea rcx, [sym.msvcrt.dll___pioinfo]
mov qword [rsp + 0x68], rax
mov rcx, qword [rcx + rax*8]
mov qword [rsp + 0x70], r10
mov rcx, qword [rcx + r10]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x11011ff4d
add edi, dword [rsp + 0x4c]
cmp dword [rsp + 0x4c], r12d
jl 0x11011fd7c
cmp byte [rsp + 0x50], 0xa
mov r12d, 0xd
jne 0x11011ff3a
mov rcx, qword [rsp + 0x68]
lea rax, [sym.msvcrt.dll___pioinfo]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov byte [rbp - 0x80], r12b
lea r8d, [r12 - 0xc]
lea rdx, [rbp - 0x80]
mov rcx, qword [rax + rcx*8]
mov rax, qword [rsp + 0x70]
mov rcx, qword [rcx + rax]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x11011ff4d
cmp dword [rsp + 0x4c], 1
jl 0x11011fd7c
inc dword [rsp + 0x44]
inc edi
jmp 0x11011ff3a
lea eax, [rsi - 1]
cmp eax, 1
ja 0x11011fefe
movzx eax, word [rbx]
xor r13d, r13d
cmp ax, 0xa
mov word [rsp + 0x40], ax
sete r13b
add rbx, 2
lea eax, [rsi - 1]
cmp eax, 1
ja 0x11011ff3a
movzx ecx, word [rsp + 0x40]
call fcn.11011b088
cmp ax, word [rsp + 0x40]
jne 0x11011ff4d
add edi, 2
test r13d, r13d
je 0x11011ff3a
mov ecx, r12d
mov word [rsp + 0x40], r12w
call fcn.11011b088
cmp ax, word [rsp + 0x40]
jne 0x11011ff4d
inc edi
inc dword [rsp + 0x44]
mov eax, ebx
sub eax, r15d
cmp eax, r14d
jae 0x11011fd7c
jmp 0x11011fd43
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x11011fd80
mov ebx, dword [rsp + 0x4c]
jmp 0x11011fd8d
lea rcx, [sym.msvcrt.dll___pioinfo]
mov rax, qword [rsp + 0x58]
mov rcx, qword [rcx + rax*8]
cmp byte [r12 + rcx + 8], dil
jge 0x110120279
xor ebx, ebx
test esi, esi
jne 0x110120041
mov r12, r15
test r14d, r14d
je 0x1101202b7
lea ecx, [rbx + 0xd]
lea rsi, [rbp - 0x70]
mov eax, r12d
sub eax, r15d
cmp eax, r14d
jae 0x11011ffd0
mov al, byte [r12]
inc r12
cmp al, 0xa
jne 0x11011ffb9
inc r13d
mov byte [rsi], cl
inc rsi
mov byte [rsi], al
lea rdx, [rbp - 0x70]
inc rsi
mov rax, rsi
sub rax, rdx
cmp rax, 0x13ff
jb 0x11011ff9b
and qword [rsp + 0x20], rbx
lea rax, [rbp - 0x70]
mov r8d, esi
lea rcx, [sym.msvcrt.dll___pioinfo]
sub r8d, eax
lea r9, [rsp + 0x48]
mov rax, qword [rsp + 0x58]
lea rdx, [rbp - 0x70]
mov rcx, qword [rcx + rax*8]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + rcx]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x110120126
add edi, dword [rsp + 0x48]
lea rax, [rbp - 0x70]
sub rsi, rax
movsxd rax, dword [rsp + 0x48]
cmp rax, rsi
jl 0x11011fd85
mov eax, r12d
mov ecx, 0xd
sub eax, r15d
cmp eax, r14d
jb 0x11011ff97
jmp 0x11011fd85
cmp esi, 2
jne 0x110120133
mov r12, r15
test r14d, r14d
je 0x1101202b7
lea edx, [rsi + 0xb]
lea rsi, [rbp - 0x70]
mov eax, r12d
sub eax, r15d
cmp eax, r14d
jae 0x1101200b3
movzx ecx, word [r12]
add r12, 2
cmp cx, 0xa
jne 0x110120094
lea r8, [rbp - 0x70]
mov rax, rsi
sub rax, r8
cmp rax, 0x13fc
ja 0x1101200af
add r13d, 2
mov word [rsi], dx
add rsi, 2
mov word [rsi], cx
add rsi, 2
mov rax, rsi
lea rcx, [rbp - 0x70]
sub rax, rcx
cmp rax, 0x13fe
jae 0x1101200b3
jmp 0x11012005d
add r12, 0xfffffffffffffffe
and qword [rsp + 0x20], rbx
lea rax, [rbp - 0x70]
mov r8d, esi
lea rcx, [sym.msvcrt.dll___pioinfo]
sub r8d, eax
lea r9, [rsp + 0x48]
mov rax, qword [rsp + 0x58]
lea rdx, [rbp - 0x70]
mov rcx, qword [rcx + rax*8]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + rcx]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x110120126
movsxd rcx, dword [rsp + 0x48]
lea rax, [rbp - 0x70]
add edi, ecx
sub rsi, rax
cmp rcx, rsi
jl 0x11011fd85
test ecx, ecx
je 0x11011fd85
mov eax, r12d
mov edx, 0xd
sub eax, r15d
cmp eax, r14d
jb 0x110120059
jmp 0x11011fd85
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x11011fd85
mov rsi, r15
test r14d, r14d
je 0x1101202b7
mov r8d, 0xd
lea rcx, [rbp + 0x1390]
xor edx, edx
mov eax, esi
sub eax, r15d
cmp eax, r14d
jae 0x110120194
movzx eax, word [rsi]
add rsi, 2
cmp ax, 0xa
jne 0x11012017a
cmp rdx, 0x6a6
ja 0x110120190
mov word [rcx], r8w
add rcx, 2
add rdx, 2
mov word [rcx], ax
add rdx, 2
add rcx, 2
cmp rdx, 0x6a8
jae 0x110120194
jmp 0x11012014e
add rsi, 0xfffffffffffffffe
and qword [rsp + 0x38], 0
lea rax, [rbp + 0x1390]
and qword [rsp + 0x30], 0
lea r8, [rbp + 0x1390]
sub ecx, eax
mov dword [rsp + 0x28], 0xd55
mov eax, ecx
mov ecx, 0xfde9
cdq
sub eax, edx
xor edx, edx
sar eax, 1
mov r9d, eax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_WideCharToMultiByte]
mov r13d, eax
test eax, eax
je 0x11011ff4d
mov rcx, qword [rsp + 0x78]
xor r12d, r12d
mov r9, qword [rsp + 0x78]
and ecx, 0x1f
sar r9, 5
imul r10, rcx, 0x38
mov qword [rsp + 0x70], r9
mov qword [rsp + 0x68], r10
and qword [rsp + 0x20], 0
lea rdx, [rbp - 0x70]
movsxd rax, r12d
mov r8d, r13d
add rdx, rax
sub r8d, r12d
lea rax, [sym.msvcrt.dll___pioinfo]
mov rcx, qword [rax + r9*8]
lea r9, [rsp + 0x48]
mov rcx, qword [r10 + rcx]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x11012024f
add r12d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x70]
mov r10, qword [rsp + 0x68]
cmp r13d, r12d
jg 0x110120205
jmp 0x110120257
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
cmp r13d, r12d
jg 0x11011fd80
mov edi, esi
mov r8d, 0xd
sub edi, r15d
cmp edi, r14d
jb 0x110120145
jmp 0x11011fd80
mov rcx, qword [r12 + rcx]
lea r9, [rsp + 0x48]
and qword [rsp + 0x20], rdi
mov r8d, r14d
mov rdx, r15
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_WriteFile]
test eax, eax
je 0x110120126
mov edi, dword [rsp + 0x48]
xor ebx, ebx
jmp 0x11011fd85
mov ecx, ebx
call fcn.110107d08
jmp 0x11011fc51
mov rax, qword [rsp + 0x58]
lea rcx, [sym.msvcrt.dll___pioinfo]
mov rax, qword [rcx + rax*8]
mov rcx, qword [rsp + 0x60]
test byte [rcx + rax + 8], 0x40
je 0x1101202d4
cmp byte [r15], 0x1a
je 0x1101202f3
call sym.msvcrt.dll__errno
mov dword [rax], 0x1c
call sym.msvcrt.dll___doserrno
and dword [rax], 0
jmp 0x11011fc51
sub edi, r13d
mov eax, edi
jmp 0x1101202f5
xor eax, eax
mov rcx, qword [rbp + 0x1a40]
xor rcx, rsp
call fcn.1101303f0
mov rbx, qword [rsp + 0x1ba8]
add rsp, 0x1b50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret