Function at 0x140007a20
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rdi
push r13
lea rbp, [rsp - 8]
sub rsp, 0x108
mov rax, qword [0x140014098]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r13, rdx
mov qword [rsp + 0x58], rcx
lea rdx, [0x1400114b8]
mov dword [rsp + 0x48], 0
mov rbx, rcx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x140007a8a
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Failed_to_open__s_for_reading____n
mov rcx, rax
call fcn.140002170
xor eax, eax
jmp 0x140007f13
mov qword [rsp + 0x138], rsi
lea rax, [rsp + 0x48]
mov qword [rsp + 0x140], r12
lea r9, [rsp + 0x34]
mov qword [rsp + 0x148], r14
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x44]
mov qword [rsp + 0x100], r15
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.140007800
test eax, eax
je 0x140007ee8
mov ebx, dword [rsp + 0x44]
lea eax, [rbx - 0x18]
test eax, 0xfffffff7
jne 0x140007ee8
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x90
call sub.VCRUNTIME140.dll_memset
lea eax, [rbx - 8]
test eax, 0xfffffff7
je 0x140007b0d
xor ecx, ecx
mov dword [rsp + 0x40], 1
jmp 0x140007b1a
mov ecx, 1
mov dword [rsp + 0x40], 2
lea eax, [rbx - 0x10]
test eax, 0xffffffef
je 0x140007b2e
mov esi, 1
lea eax, [rsi + 2]
jmp 0x140007b38
mov esi, 2
mov eax, 4
mov r15d, dword [rsp + 0x50]
test ecx, ecx
mov ecx, dword [rsp + 0x34]
cmove esi, eax
test ecx, ecx
je 0x140007bc0
xor edx, edx
mov eax, 0x989680
div ecx
xor edx, edx
div esi
cmp r15d, eax
jbe 0x140007bc0
mov ebx, esi
imul rbx, r15
imul rbx, rcx
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
mov r14d, eax
mov rcx, rdi
mov eax, 0x7fffffff
cmp rbx, rax
cmova rbx, rax
xor r8d, r8d
lea edx, [rbx - 1]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov edx, 1
lea rcx, [rsp + 0x30]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rdi
cmp rax, 1
jne 0x140007eeb
xor r8d, r8d
mov edx, r14d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov ecx, dword [rsp + 0x34]
mov r14d, dword [r13 + 0x4714]
mov r12d, dword [r13 + 0x4718]
mov edx, esi
mov qword [rsp + 0x50], rdx
test esi, esi
je 0x140007c07
lea rax, [rsp + 0x7c]
nop
mov dword [rax - 4], 8
mov qword [rax], 8
mov dword [rax - 0x1c], r14d
mov dword [rax - 0x18], r12d
mov dword [rax - 0x14], r15d
mov dword [rax - 0x10], ecx
lea rax, [rax + 0x24]
sub rdx, 1
jne 0x140007be0
mov r8d, dword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov ecx, esi
call sub.openjp2.dll_opj_image_create
mov rbx, rax
test rax, rax
je 0x140007ee8
mov edx, dword [r13 + 0x470c]
mov dword [rax], edx
mov ecx, dword [r13 + 0x4710]
mov dword [rax + 4], ecx
lea eax, [r15 - 1]
imul eax, r14d
test edx, edx
je 0x140007c45
add eax, edx
mov r13d, dword [rsp + 0x34]
inc eax
mov dword [rbx + 8], eax
lea eax, [r13 - 1]
imul eax, r12d
test ecx, ecx
je 0x140007c5d
add eax, ecx
inc eax
mov dword [rsp + 0x40], 0
mov dword [rbx + 0xc], eax
test r13d, r13d
je 0x140007eb8
xor esi, esi
lea r12d, [r13 - 1]
mov eax, r15d
mov dword [rsp + 0x44], esi
neg eax
mov dword [rsp + 0x34], eax
mov ecx, eax
imul r12d, r15d
nop dword [rax]
cmp dword [rsp + 0x48], 0
mov eax, esi
cmovne eax, r12d
movsxd rsi, eax
mov rax, qword [rsp + 0x50]
cmp rax, 3
jne 0x140007d75
xor r14d, r14d
test r15d, r15d
je 0x140007e97
lea rsi, [rsi*4]
nop dword [rax]
nop word [rax + rax]
mov edx, 1
lea rcx, [rsp + 0x3a]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov edx, 1
lea rcx, [rsp + 0x39]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov edx, 1
lea rcx, [rsp + 0x38]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov rax, qword [rbx + 0x18]
inc r14d
movzx edx, byte [rsp + 0x38]
mov rcx, qword [rax + 0x30]
mov dword [rsi + rcx], edx
mov rax, qword [rbx + 0x18]
movzx edx, byte [rsp + 0x39]
mov rcx, qword [rax + 0x70]
mov dword [rsi + rcx], edx
mov rax, qword [rbx + 0x18]
movzx edx, byte [rsp + 0x3a]
mov rcx, qword [rax + 0xb0]
mov dword [rsi + rcx], edx
add rsi, 4
cmp r14d, r15d
jb 0x140007cd0
jmp 0x140007e93
cmp rax, 4
jne 0x140007e74
xor r14d, r14d
test r15d, r15d
je 0x140007e97
lea rsi, [rsi*4]
nop dword [rax]
nop word [rax + rax]
mov edx, 1
lea rcx, [rsp + 0x3d]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov edx, 1
lea rcx, [rsp + 0x3c]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov edx, 1
lea rcx, [rsp + 0x3b]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov edx, 1
lea rcx, [rsp + 0x30]
mov r8d, edx
mov r9, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
test rax, rax
je 0x140007ec6
mov rax, qword [rbx + 0x18]
inc r14d
movzx edx, byte [rsp + 0x3b]
mov rcx, qword [rax + 0x30]
mov dword [rsi + rcx], edx
mov rax, qword [rbx + 0x18]
movzx edx, byte [rsp + 0x3c]
mov rcx, qword [rax + 0x70]
mov dword [rsi + rcx], edx
mov rax, qword [rbx + 0x18]
movzx edx, byte [rsp + 0x3d]
mov rcx, qword [rax + 0xb0]
mov dword [rsi + rcx], edx
mov rax, qword [rbx + 0x18]
movzx edx, byte [rsp + 0x30]
mov rcx, qword [rax + 0xf0]
mov dword [rsi + rcx], edx
add rsi, 4
cmp r14d, r15d
jb 0x140007da0
jmp 0x140007e93
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsp + 0x58]
lea rdx, str.Currently_unsupported_bit_depth_:__s_n
mov rcx, rax
call fcn.140002170
mov ecx, dword [rsp + 0x34]
mov eax, dword [rsp + 0x40]
add r12d, ecx
mov esi, dword [rsp + 0x44]
inc eax
add esi, r15d
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x44], esi
cmp eax, r13d
jb 0x140007c90
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, rbx
jmp 0x140007ef3
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._nError:_fread_return_a_number_of_element_different_from_the_expected._n
call fcn.140002170
mov rcx, rbx
call sub.openjp2.dll_opj_image_destroy
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor eax, eax
mov r14, qword [rsp + 0x148]
mov r12, qword [rsp + 0x140]
mov rsi, qword [rsp + 0x138]
mov r15, qword [rsp + 0x100]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14000cdb0
add rsp, 0x108
pop r13
pop rdi
pop rbx
pop rbp
ret