Function at 0x1400035d0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x20
mov r12, r8
mov r13, rdx
mov rdi, rcx
test rcx, rcx
je 0x14000372f
movzx eax, byte [rcx]
cmp al, byte [0x1400053ac]
jne 0x140003613
movzx eax, byte [rcx + 1]
cmp al, byte [0x1400053ad]
je 0x14000372f
test r13, r13
je 0x140003655
test r12, r12
je 0x140003655
xor ebx, ebx
mov qword [rdx], rbx
lea rdx, [0x1400065f4]
mov qword [r8], rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rsi, rax
test rax, rax
jne 0x14000365c
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.cannot_open_input_file__s_n
mov rcx, rax
call fcn.1400011b0
xor eax, eax
jmp 0x14000387b
xor edx, edx
mov rcx, rsi
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
xor r8d, r8d
xor edx, edx
mov rcx, rsi
movsxd rbp, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
lea rcx, [rbp + 1]
call sub.libwebp.dll_WebPMalloc
mov r14, rax
test rax, rax
jne 0x1400036c2
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea ecx, [r14 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rdi
lea rdx, str.memory_allocation_failure_when_reading_file__s_n
mov rcx, rax
call fcn.1400011b0
xor eax, eax
jmp 0x14000387b
mov r9, rsi
mov r8d, 1
mov rdx, rbp
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp rbx, 1
je 0x140003718
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rdi
lea rdx, str.Could_not_read__d_bytes_of_data_from_file__s_n
mov rcx, rax
mov r8d, ebp
call fcn.1400011b0
mov rcx, r14
call sub.libwebp.dll_WebPFree
xor eax, eax
jmp 0x14000387b
mov byte [r14 + rbp], 0
mov eax, 1
mov qword [r13], r14
mov qword [r12], rbp
jmp 0x14000387b
xor ebx, ebx
mov qword [rsp + 0x50], r15
mov edi, ebx
mov ebp, ebx
mov r14d, ebx
test r13, r13
je 0x140003874
test r12, r12
je 0x140003874
mov qword [rdx], rbx
xor ecx, ecx
mov qword [r8], rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
mov edx, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__setmode]
cmp eax, 0xffffffff
jne 0x140003798
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Failed_to_reopen_file_in_O_BINARY_mode._n
call fcn.1400011b0
jmp 0x140003874
test rsi, rsi
je 0x140003874
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
jne 0x140003824
mov eax, 0x4000
nop dword [rax + rax]
test rdi, rdi
mov rsi, rdi
mov rcx, r14
cmove rsi, rax
add rdi, rsi
lea rdx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r15, rax
test rax, rax
je 0x140003839
xor ecx, ecx
mov r14, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rcx, [r14 + rbp]
mov r8, rsi
mov r9, rax
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add rbp, rax
cmp rbp, rdi
jb 0x140003824
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
test eax, eax
mov eax, 0x4000
je 0x1400037c0
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x14000385e
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Could_not_read_from_stdin_n
call fcn.1400011b0
jmp 0x140003874
test r14, r14
je 0x140003867
mov byte [r14 + rbp], bl
mov qword [r13], r14
mov ebx, 1
mov qword [r12], rbp
mov r15, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
add rsp, 0x20
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret