Function at 0x140001f50
Capabilities:
Read file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
sub rsp, 0xd8
mov rax, qword [0x14002e008]
xor rax, rsp
mov qword [rsp + 0xa0], rax
mov rbx, rdx
mov rdi, rcx
mov rcx, rbx
lea rdx, [0x14001dbf4]
xor esi, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x20], rax
mov rbp, rax
test rax, rax
jne 0x140001fbb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, dword [rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
mov rdx, rbx
lea rcx, str.ERROR:_Unable_to_open_filesystem_image__s:__s_n
mov r8, rax
call fcn.1400023a0
lea eax, [rsi - 1]
jmp 0x1400022e7
mov qword [rsp + 0x110], r12
xor edx, edx
mov qword [rsp + 0xd0], r13
mov rcx, rbp
mov qword [rsp + 0xc8], r14
mov qword [rsp + 0xc0], r15
lea r8d, [rdx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
xor r8d, r8d
xor edx, edx
mov rcx, rbp
movsxd r13, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fseeki64]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
mov ecx, 0x20000
xor r15d, r15d
xor r12d, r12d
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
cmp byte [rdi + 8], sil
je 0x140002029
lea rcx, [rsp + 0x40]
call qword [sym.imp.LIBEAY32.dll_Ordinal_503]
movaps xmmword [rsp + 0xb0], xmm6
mov rax, r13
mov qword [rsp + 0x28], rax
test r13, r13
je 0x1400021cd
movsd xmm6, qword [0x140029558]
nop word [rax + rax]
mov ebx, 0x20000
cmp rax, rbx
cmovb ebx, eax
xor r12d, r12d
cmp byte [rdi + 8], r12b
je 0x14000207d
lea eax, [rbx + r15]
cmp eax, 0x20000
jl 0x14000207d
mov ebx, 0x20000
mov r12d, 1
sub ebx, r15d
mov r9, qword [rsp + 0x20]
mov edx, 1
movsxd rbp, ebx
mov rcx, r14
mov r8, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbp
jne 0x140002284
mov rcx, qword [rdi]
lea r9, [rsp + 0x30]
mov r8d, ebx
mov dword [rsp + 0x30], 0
mov rdx, r14
call qword [sym.imp.imobiledevice.dll_idevice_connection_send]
mov edx, dword [rsp + 0x30]
test eax, eax
jne 0x14000226c
cmp edx, ebx
jne 0x14000226c
cmp byte [rdi + 8], al
je 0x14000213d
mov r8, rbp
lea rcx, [rsp + 0x40]
mov rdx, r14
call qword [sym.imp.LIBEAY32.dll_Ordinal_504]
add r15d, ebx
test r12d, r12d
je 0x14000213d
lea rdx, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.LIBEAY32.dll_Ordinal_502]
mov rcx, qword [rdi]
lea r9, [rsp + 0x30]
mov r8d, socket
mov dword [rsp + 0x30], 0
mov rdx, r14
call qword [sym.imp.imobiledevice.dll_idevice_connection_send]
mov edx, dword [rsp + 0x30]
test eax, eax
jne 0x140002251
cmp edx, 0x14
jne 0x140002251
lea rcx, [rsp + 0x40]
call qword [sym.imp.LIBEAY32.dll_Ordinal_503]
xor r15d, r15d
mov r8, qword [rdi + 0x10]
add rsi, rbp
test r8, r8
je 0x1400021b5
xorps xmm0, xmm0
test rsi, rsi
js 0x140002158
cvtsi2sd xmm0, rsi
jmp 0x140002170
mov rax, rsi
mov rcx, rsi
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm0, rcx
addsd xmm0, xmm0
xorps xmm1, xmm1
test r13, r13
js 0x14000217f
cvtsi2sd xmm1, r13
jmp 0x140002197
mov rax, r13
mov rcx, r13
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm1, rcx
addsd xmm1, xmm1
divsd xmm0, xmm1
movaps xmm1, xmm0
mulsd xmm1, xmm6
cvttsd2si ebx, xmm1
cmp ebx, dword [rdi + 0xc]
jle 0x1400021b5
mov rdx, qword [rdi + 0x18]
call r8
mov dword [rdi + 0xc], ebx
mov rax, qword [rsp + 0x28]
sub rax, rbp
mov qword [rsp + 0x28], rax
jne 0x140002050
mov rbp, qword [rsp + 0x20]
cmp byte [rdi + 8], 0
je 0x1400022ab
test r12d, r12d
jne 0x1400022ab
lea rdx, [rsp + 0x40]
mov rcx, r14
call qword [sym.imp.LIBEAY32.dll_Ordinal_502]
mov rcx, qword [rdi]
lea r9, [rsp + 0x30]
lea r8d, [r12 + 0x14]
mov dword [rsp + 0x30], r12d
mov rdx, r14
call qword [sym.imp.imobiledevice.dll_idevice_connection_send]
mov edx, dword [rsp + 0x30]
test eax, eax
jne 0x14000221a
cmp edx, 0x14
je 0x1400022ab
mov r8d, socket
lea rcx, str.ERROR:_Unable_to_send_data_to_ASR._Sent__u_of__u_bytes._n
call fcn.1400023a0
lea rcx, str.ERROR:_Unable_to_send_chunk_checksum_n
call fcn.1400023a0
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, 0xffffffff
jmp 0x1400022bf
mov r8d, socket
lea rcx, str.ERROR:_Unable_to_send_data_to_ASR._Sent__u_of__u_bytes._n
call fcn.1400023a0
lea rcx, str.ERROR:_Unable_to_send_chunk_checksum_n
jmp 0x14000228b
mov r8d, ebx
lea rcx, str.ERROR:_Unable_to_send_data_to_ASR._Sent__u_of__u_bytes._n
call fcn.1400023a0
lea rcx, str.ERROR:_Unable_to_send_filesystem_payload_n
jmp 0x14000228b
lea rcx, str.Error_reading_filesystem_n
call fcn.1400023a0
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, 0xffffffff
jmp 0x1400022bf
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
movaps xmm6, xmmword [rsp + 0xb0]
mov r14, qword [rsp + 0xc8]
mov r13, qword [rsp + 0xd0]
mov r12, qword [rsp + 0x110]
mov r15, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14001bfa0
add rsp, 0xd8
pop rdi
pop rsi
pop rbp
pop rbx
ret