Function at 0x1400a1e60
Capabilities:
Link many functions at runtime
Read file on windows

Disassembly:
push rbp
push rbx
push r13
lea rbp, [rsp - 0x21c0]
mov eax, 0x22c0
call fcn.1401c2680
sub rsp, rax
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rbp + 0x2190], rax
xor eax, eax
mov qword [rsp + 0x48], rdx
mov rbx, rcx
lea edx, [rax + 1]
lea rcx, str.openjp2
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x70], rax
call fcn.14005a660
mov r13, rax
mov qword [rsp + 0x28], rax
test rax, rax
jne 0x1400a1ec9
lea eax, [r13 + 2]
jmp 0x1400a2899
mov qword [rsp + 0x22f0], rsi
mov qword [rsp + 0x22b8], rdi
mov qword [rsp + 0x22b0], r12
lea rdx, str.opj_set_default_decoder_parameters
mov rcx, rax
mov qword [rsp + 0x22a8], r14
mov qword [rsp + 0x22a0], r15
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_create_decompress
mov rcx, r13
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_setup_decoder
mov rcx, r13
mov r14, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_destroy_cstr_info
mov rcx, r13
mov qword [rsp + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_image_destroy
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_set_info_handler
mov rcx, r13
mov qword [rsp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_set_warning_handler
mov rcx, r13
mov qword [rbp - 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_set_error_handler
mov rcx, r13
mov qword [rbp - 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_destroy
mov rcx, r13
mov qword [rbp - 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_create_default_file_stream
mov rcx, r13
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_destroy_codec
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_destroy_cstr_index
mov rcx, r13
mov qword [rsp + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_read_header
mov rcx, r13
mov qword [rbp - 0x80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_get_decoded_tile
mov rcx, r13
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_create
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_set_user_data
mov rcx, r13
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_set_read_function
mov rcx, r13
mov r15, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_set_seek_function
mov rcx, r13
mov qword [rsp + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_stream_set_skip_function
mov rcx, r13
mov qword [rsp + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_set_decode_area
mov rcx, r13
mov qword [rbp - 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.opj_decode
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsp + 0x28]
lea rdx, str.opj_end_decompress
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsp + 0x28]
lea rdx, str.opj_stream_set_user_data_length
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x60], rax
test rdi, rdi
je 0x1400a2861
test r15, r15
je 0x1400a2861
mov r9, qword [rbx]
mov edx, 0xc
lea rcx, [rbp + 0x2180]
lea r8d, [rdx - 0xb]
call fcn.1401c1e14
test rax, rax
je 0x1400a22f7
lea rcx, [rbp + 0x120]
call rdi
mov rax, qword [rbp + 0x2180]
cmp rax, qword [0x14021b198]
jne 0x1400a2108
mov eax, dword [rbp + 0x2188]
cmp eax, dword [0x14021b1a0]
je 0x1400a2133
mov eax, dword [rbp + 0x2180]
cmp eax, dword [0x14021b1a8]
je 0x1400a2133
cmp eax, dword [0x14021b1b0]
jne 0x1400a2861
mov dword [rbp + 0x2128], 0
mov edi, 1
jmp 0x1400a213e
mov edi, 1
mov dword [rbp + 0x2128], edi
mov rcx, qword [rbx]
xor r8d, r8d
xor edx, edx
call fcn.1401c1f88
cmp qword [rbx], 0
je 0x1400a2861
mov edx, edi
mov ecx, 0x100000
call qword [rsp + 0x50]
xor r8d, r8d
mov rdx, rbx
mov rcx, rax
mov rdi, rax
call r15
lea rdx, [0x1400a28c0]
mov rcx, rdi
call qword [rsp + 0x38]
lea rdx, [0x1400a28d0]
mov rcx, rdi
call qword [rsp + 0x78]
lea rdx, [0x1400ea0d0]
mov rcx, rdi
call qword [rbp - 0x68]
mov rdx, qword [rbx + 0x108]
mov rcx, rdi
call qword [rsp + 0x60]
mov ecx, dword [rbp + 0x2128]
mov ebx, 2
test ecx, ecx
je 0x1400a21dc
dec ecx
je 0x1400a21cd
dec ecx
jne 0x1400a21eb
lea ecx, [rbx - 1]
call r14
mov r15, rax
mov qword [rsp + 0x30], rax
jmp 0x1400a21f0
mov ecx, ebx
call r14
mov r15, rax
mov qword [rsp + 0x30], rax
jmp 0x1400a21f0
xor ecx, ecx
call r14
mov r15, rax
mov qword [rsp + 0x30], rax
jmp 0x1400a21f0
mov r15, qword [rsp + 0x30]
lea rdx, [fcn.14016a580]
xor r8d, r8d
mov rcx, r15
call qword [rbp - 0x60]
lea rdx, [fcn.14016a580]
xor r8d, r8d
mov rcx, r15
call qword [rbp - 0x78]
lea rdx, [fcn.14016a580]
xor r8d, r8d
mov rcx, r15
call qword [rbp - 0x70]
lea rdx, [rbp + 0x120]
mov rcx, r15
call qword [rsp + 0x68]
test eax, eax
jne 0x1400a2269
call fcn.1401be514
lea rdx, str.ERROR____j2k_dump:_failed_to_setup_the_decoder_n
add rax, 0x60
mov rcx, rax
call fcn.1401be844
mov rcx, rdi
call rsi
mov rcx, r15
call qword [rsp + 0x40]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, bx
jmp 0x1400a2871
lea r8, [rsp + 0x20]
mov rdx, r15
mov rcx, rdi
call r12
test eax, eax
jne 0x1400a22bb
call fcn.1401be514
lea rdx, str.ERROR____opj_decompress:_failed_to_read_the_header_n
add rax, 0x60
mov rcx, rax
call fcn.1401be844
mov rcx, rdi
call rsi
mov rcx, r15
call qword [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
call qword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, bx
jmp 0x1400a2871
mov r8, qword [rsp + 0x20]
mov rdx, rdi
mov rcx, r15
call r13
test eax, eax
jne 0x1400a230c
call fcn.1401be514
lea rdx, str.ERROR____opj_decompress:_failed_to_decode_image__n
lea rcx, [rax + 0x60]
call fcn.1401be844
mov rcx, r15
call qword [rsp + 0x40]
mov rcx, rdi
call rsi
mov rcx, qword [rsp + 0x20]
call qword [rsp + 0x58]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 4
jmp 0x1400a2871
mov rcx, rdi
call rsi
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1400a2838
mov rcx, qword [rcx + 0x18]
mov r8d, dword [rcx + 0x18]
cmp r8d, 8
jae 0x1400a2342
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 9
jmp 0x1400a2871
mov rax, qword [rsp + 0x20]
mov edx, dword [rax + 0x10]
cmp edx, 3
jb 0x1400a267c
mov eax, dword [rcx + 0x40]
cmp dword [rcx], eax
jne 0x1400a267c
cmp eax, dword [rcx + 0x80]
jne 0x1400a267c
mov eax, dword [rcx + 0x44]
cmp dword [rcx + 4], eax
jne 0x1400a267c
cmp eax, dword [rcx + 0x84]
jne 0x1400a267c
mov eax, dword [rcx + 0x58]
cmp r8d, eax
jne 0x1400a267c
cmp eax, dword [rcx + 0x98]
jne 0x1400a267c
mov rdi, qword [rsp + 0x48]
cmp edx, 4
lea rcx, [rbp - 0x50]
sbb esi, esi
add esi, 4
mov dword [rsp + 0x50], esi
call qword [rdi + 0x18]
movzx eax, word [0x14021b260]
movsd xmm0, qword [str.JPEG_2000]
movsd qword [rbp + 0x9e], xmm0
mov rdx, qword [rsp + 0x20]
mov word [rbp + 0xa6], ax
mov word [rbp - 0x30], si
mov eax, 0xa
mov word [rbp - 8], ax
mov eax, 8
mov word [rbp - 0x2e], ax
mov rax, qword [rdx + 0x18]
mov r8d, dword [rax + 8]
mov dword [rbp - 0x38], r8d
mov rax, qword [rdx + 0x18]
mov ecx, dword [rax + 0xc]
mov dword [rbp - 0x28], r8d
mov dword [rbp - 0x34], ecx
cmp dword [rdx + 0x14], 3
jne 0x1400a241f
cmp dword [rdx + 0x10], 3
jne 0x1400a241f
lea eax, [r8 + r8*2]
mov dword [rbp - 0x30], 0x180001
mov dword [rbp - 0x28], eax
test esi, esi
jle 0x1400a2456
mov rdx, qword [rdx + 0x18]
lea rcx, [rbp + 0x2160]
mov r8d, esi
add rdx, 0x18
mov eax, dword [rdx]
cmp eax, 8
jbe 0x1400a2443
add eax, 0xfffffff8
mov dword [rcx], eax
jmp 0x1400a2449
mov dword [rcx], 0
add rdx, 0x40
add rcx, 4
dec r8
jne 0x1400a2435
lea rdx, [rbp - 0x50]
mov rcx, rdi
call qword [rdi]
movzx ebx, ax
test ax, ax
jne 0x1400a282d
xor eax, eax
mov r13d, eax
mov dword [rsp + 0x38], eax
cmp dword [rbp - 0x34], eax
jle 0x1400a2660
mov r14d, eax
mov rax, qword [rsp + 0x20]
mov r11, qword [rbp - 0x40]
cmp dword [rax + 0x14], 3
jne 0x1400a2550
cmp dword [rax + 0x10], 3
jne 0x1400a2550
mov rcx, qword [rax + 0x18]
mov edx, dword [rcx]
cmp edx, 1
jne 0x1400a262c
cmp dword [rcx + 0x40], 2
jne 0x1400a24d3
cmp dword [rcx + 0x80], 2
jne 0x1400a24d3
cmp dword [rcx + 4], edx
jne 0x1400a24d3
cmp dword [rcx + 0x44], 2
jne 0x1400a24d3
cmp dword [rcx + 0x84], 2
je 0x1400a262c
cmp edx, 1
jne 0x1400a262c
cmp dword [rcx + 0x40], 2
jne 0x1400a2501
cmp dword [rcx + 0x80], 2
jne 0x1400a2501
cmp dword [rcx + 4], edx
jne 0x1400a2501
cmp dword [rcx + 0x44], edx
jne 0x1400a2501
cmp dword [rcx + 0x84], edx
je 0x1400a262c
cmp edx, 1
jne 0x1400a262c
cmp dword [rcx + 0x40], edx
jne 0x1400a262c
cmp dword [rcx + 0x80], edx
jne 0x1400a262c
cmp dword [rcx + 4], edx
jne 0x1400a262c
cmp dword [rcx + 0x44], edx
jne 0x1400a262c
cmp dword [rcx + 0x84], edx
jne 0x1400a262c
mov r8, r11
mov edx, r13d
mov rcx, rax
call fcn.1400a2900
jmp 0x1400a262c
test esi, esi
jle 0x1400a262c
mov ecx, dword [rbp - 0x38]
xor r13d, r13d
lea r15, [rbp + 0x2160]
mov ebx, r13d
mov r12d, esi
nop dword [rax + rax]
mov r9d, r13d
mov r10, r13
test ecx, ecx
jle 0x1400a260d
mov edi, dword [r15]
nop dword [rax]
nop word [rax + rax]
mov r8, qword [rax + 0x18]
movsxd rcx, ecx
mov rax, qword [r8 + rbx + 0x30]
imul rcx, r14
add rcx, r10
mov edx, dword [rax + rcx*4]
cmp dword [r8 + rbx + 0x20], r13d
je 0x1400a25bf
mov ecx, dword [r8 + rbx + 0x18]
mov r8d, 1
dec ecx
shl r8d, cl
jmp 0x1400a25c2
mov r8d, r13d
add edx, r8d
lea ecx, [rdi - 1]
mov eax, edx
sar eax, cl
and eax, 0x80000001
jge 0x1400a25da
dec eax
or eax, 0xfffffffe
inc eax
mov ecx, edi
sar edx, cl
add eax, edx
cmp eax, 0xff
jle 0x1400a25ee
mov eax, 0xff
jmp 0x1400a25f4
test eax, eax
cmovs eax, r13d
mov byte [r11], al
mov ecx, dword [rbp - 0x38]
mov rax, qword [rsp + 0x20]
inc r9d
inc r11
inc r10
cmp r9d, ecx
jl 0x1400a2590
add r15, 4
add rbx, 0x40
dec r12
jne 0x1400a2570
mov r13d, dword [rsp + 0x38]
mov rdi, qword [rsp + 0x48]
mov esi, dword [rsp + 0x50]
mov r9d, 1
mov r8d, r13d
or edx, 0xffffffff
mov rcx, rdi
call qword [rdi + 8]
movzx ebx, ax
test ax, ax
jne 0x1400a265b
inc r13d
inc r14
mov dword [rsp + 0x38], r13d
cmp r13d, dword [rbp - 0x34]
jl 0x1400a2480
mov r15, qword [rsp + 0x30]
xor r8d, r8d
xor edx, edx
xor r9d, r9d
mov rcx, rdi
call qword [rdi + 0x10]
mov rcx, qword [rsp + 0x20]
call qword [rsp + 0x58]
jmp 0x1400a283d
cmp edx, 1
jne 0x1400a2828
mov r14, qword [rsp + 0x48]
lea rcx, [rbp - 0x50]
call qword [r14 + 0x18]
mov r8, qword [rsp + 0x20]
movzx eax, word [0x14021b260]
movsd xmm0, qword [str.JPEG_2000]
movsd qword [rbp + 0x9e], xmm0
mov word [rbp + 0xa6], ax
mov eax, 0xa
mov word [rbp - 8], ax
mov eax, 8
mov word [rbp - 0x2e], ax
movzx eax, word [r8 + 0x10]
mov word [rbp - 0x30], ax
mov rax, qword [r8 + 0x18]
mov edx, dword [rax + 8]
mov dword [rbp - 0x38], edx
mov rax, qword [r8 + 0x18]
mov ecx, dword [rax + 0xc]
mov dword [rbp - 0x28], edx
mov dword [rbp - 0x34], ecx
mov eax, dword [r8 + 0x10]
test eax, eax
je 0x1400a2715
mov rdx, qword [r8 + 0x18]
lea rcx, [rbp + 0x2160]
mov r8d, eax
add rdx, 0x18
mov eax, dword [rdx]
add rdx, 0x40
add rcx, 4
dec r8
jne 0x1400a2701
mov r15, qword [rsp + 0x30]
lea rdx, [rbp - 0x50]
mov rcx, r14
call qword [r14]
movzx ebx, ax
test ax, ax
jne 0x1400a282d
xor r12d, r12d
mov esi, r12d
cmp dword [rbp - 0x34], r12d
jle 0x1400a280e
mov edi, r12d
lea r15d, [r12 + 1]
nop dword [rax]
nop word [rax + rax]
mov ecx, dword [rbp - 0x38]
mov r9, qword [rbp - 0x40]
mov r10d, r12d
mov r11, r12
test ecx, ecx
jle 0x1400a27e3
nop word [rax + rax]
mov rax, qword [rsp + 0x20]
movsxd rcx, ecx
mov r8, qword [rax + 0x18]
imul rcx, rdi
add rcx, r11
mov rax, qword [r8 + 0x30]
mov ebx, dword [rax + rcx*4]
cmp dword [r8 + 0x20], r12d
je 0x1400a279d
mov ecx, dword [r8 + 0x18]
mov edx, r15d
dec ecx
shl edx, cl
jmp 0x1400a27a0
mov edx, r12d
mov ecx, dword [r8 + 0x18]
lea eax, [rdx + rbx]
xor edx, edx
mov r8d, r15d
shl r8d, cl
imul eax, eax, 0xff
dec r8d
div r8d
cmp eax, 0xff
jle 0x1400a27c9
mov eax, 0xff
jmp 0x1400a27cf
test eax, eax
cmovs eax, r12d
mov byte [r9], al
mov ecx, dword [rbp - 0x38]
inc r10d
inc r9
inc r11
cmp r10d, ecx
jl 0x1400a2770
mov r9d, r15d
mov r8d, esi
or edx, 0xffffffff
mov rcx, r14
call qword [r14 + 8]
movzx ebx, ax
test ax, ax
jne 0x1400a2809
inc esi
inc rdi
cmp esi, dword [rbp - 0x34]
jl 0x1400a2750
mov r15, qword [rsp + 0x30]
xor r8d, r8d
xor edx, edx
xor r9d, r9d
mov rcx, r14
call qword [r14 + 0x10]
mov rcx, qword [rsp + 0x20]
call qword [rsp + 0x58]
jmp 0x1400a283d
movzx ebx, word [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call qword [rsp + 0x58]
jmp 0x1400a283d
movzx ebx, word [rsp + 0x38]
test r15, r15
je 0x1400a2849
mov rcx, r15
call qword [rsp + 0x40]
lea rcx, [rsp + 0x70]
call qword [rbp - 0x80]
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, bx
jmp 0x1400a2871
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 2
mov r14, qword [rsp + 0x22a8]
mov r12, qword [rsp + 0x22b0]
mov rdi, qword [rsp + 0x22b8]
mov rsi, qword [rsp + 0x22f0]
mov r15, qword [rsp + 0x22a0]
mov rcx, qword [rbp + 0x2190]
xor rcx, rsp
call fcn.1401bd600
add rsp, 0x22c0
pop r13
pop rbx
pop rbp
ret