Function at 0x14000c550
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0xd8]
sub rsp, 0x1a0
movaps xmmword [rax - 0x48], xmm6
mov rax, qword [0x140014098]
xor rax, rsp
mov qword [rbp + 0x88], rax
xor ebx, ebx
lea rdx, [0x1400114b8]
mov qword [rsp + 0x58], rbx
mov esi, ebx
mov qword [rsp + 0x70], rbx
mov r15d, ebx
mov dword [rsp + 0x50], ebx
mov edi, ebx
mov qword [rbp - 0x70], rbx
mov r14, rcx
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rsp + 0x68], rax
mov r12, rax
test rax, rax
jne 0x14000c5ec
lea ecx, [rbx + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, r14
lea rdx, str.pngtoimage:_can_not_open__s_n
mov rcx, rax
call fcn.140002170
xor eax, eax
jmp 0x14000cb76
mov r13d, 1
lea rcx, [rbp + 0x80]
mov edx, r13d
mov r9, rax
mov r8d, 8
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 8
jne 0x14000caed
mov rax, qword [rbp + 0x80]
cmp rax, qword [0x140011e68]
jne 0x14000caed
xor r9d, r9d
lea rcx, str.1.6.37
xor r8d, r8d
xor edx, edx
call sub.libpng16.dll_png_create_read_struct
mov qword [rsp + 0x58], rax
test rax, rax
je 0x14000cb0f
mov rcx, rax
call sub.libpng16.dll_png_create_info_struct
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14000cb0f
mov rcx, qword [rsp + 0x58]
lea rdx, [0x14000d99e]
mov r8d, 0x100
call sub.libpng16.dll_png_set_longjmp_fn
mov rcx, rax
mov rdx, rsp
call sub.VCRUNTIME140.dll___intrinsic_setjmp
mov r12, qword [rsp + 0x68]
test eax, eax
jne 0x14000cade
mov rcx, qword [rsp + 0x58]
mov rdx, r12
call sub.libpng16.dll_png_init_io
mov rcx, qword [rsp + 0x58]
mov edx, 8
call sub.libpng16.dll_png_set_sig_bytes
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_read_info
mov rdx, qword [rsp + 0x70]
lea rax, [rbp - 0x58]
mov rcx, qword [rsp + 0x58]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x60]
lea rax, [rbp - 0x54]
mov qword [rsp + 0x38], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x74]
mov qword [rsp + 0x20], rax
call sub.libpng16.dll_png_get_IHDR
test eax, eax
je 0x14000cade
cmp dword [rbp - 0x78], 3
jne 0x14000c719
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_set_expand
mov rdx, qword [rsp + 0x70]
mov r8d, 0x10
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_get_valid
test eax, eax
je 0x14000c73c
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_set_expand
mov rdx, qword [rsp + 0x70]
lea r8, [rbp - 0x68]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_get_gAMA
movsd xmm1, qword [0x140011f20]
test eax, eax
jne 0x14000c765
movsd qword [rbp - 0x68], xmm1
movaps xmm2, xmm1
jmp 0x14000c76a
movsd xmm2, qword [rbp - 0x68]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_set_gamma
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_read_update_info
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_get_color_type
movzx eax, al
mov r12d, 2
mov dword [rbp - 0x78], eax
test eax, eax
je 0x14000c7f4
cmp eax, r12d
je 0x14000c7ec
cmp eax, 4
je 0x14000c7e7
cmp eax, 6
je 0x14000c7df
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, dword [rbp - 0x78]
lea rdx, str.pngtoimage:_colortype__d_is_not_supported_n
mov rcx, rax
call fcn.140002170
mov rsi, qword [rbp - 0x70]
mov r15, qword [rsp + 0x78]
mov rdi, qword [rbp - 0x80]
jmp 0x14000cb0a
mov r14d, 4
jmp 0x14000c7f7
mov r14d, r12d
jmp 0x14000c7f7
mov r14d, 3
jmp 0x14000c7f7
mov r14d, r13d
mov rdx, qword [rsp + 0x70]
lea rdi, [0x140000000]
mov rcx, qword [rsp + 0x58]
mov eax, r14d
mov qword [rbp - 0x48], rax
mov rax, qword [rdi + rax*8 + 0x112f0]
mov qword [rbp - 0x40], rax
call sub.libpng16.dll_png_get_bit_depth
movzx eax, al
mov dword [rbp - 0x74], eax
test eax, eax
je 0x14000cac5
cmp eax, 8
ja 0x14000c84b
mov ecx, 0x117
bt ecx, eax
jae 0x14000c84b
mov rdi, qword [rdi + rax*8 + 0x11340]
mov qword [rbp - 0x60], rdi
jmp 0x14000c85f
cmp eax, 0x10
jne 0x14000cac5
lea rax, [0x14000c520]
mov qword [rbp - 0x60], rax
mov ecx, dword [rsp + 0x50]
mov edx, 8
inc ecx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rbp - 0x70], rax
mov rsi, rax
test rax, rax
jne 0x14000c8a2
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.pngtoimage:_memory_out_n
call fcn.140002170
mov r15, qword [rsp + 0x78]
mov rdi, qword [rbp - 0x80]
jmp 0x14000cb0a
mov edi, ebx
cmp dword [rsp + 0x50], ebx
jbe 0x14000c8db
nop word [rax + rax]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x58]
call sub.libpng16.dll_png_get_rowbytes
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, edi
mov qword [rsi + rcx*8], rax
test rax, rax
je 0x14000c87c
inc edi
cmp edi, dword [rsp + 0x50]
jb 0x14000c8b0
mov rcx, qword [rsp + 0x58]
mov rdx, rsi
call sub.libpng16.dll_png_read_image
xor edx, edx
lea rcx, [rbp - 0x10]
mov r8d, 0x90
call sub.VCRUNTIME140.dll_memset
mov r15, qword [rbp + 0xe8]
lea rax, [rbp + 0xc]
mov r10d, dword [rsp + 0x50]
mov edx, dword [rbp - 0x74]
mov r11d, dword [rsp + 0x60]
mov r8d, dword [r15 + 0x4714]
mov r9d, dword [r15 + 0x4718]
mov ecx, r14d
nop dword [rax]
nop word [rax + rax]
mov dword [rax - 4], edx
mov dword [rax], edx
mov dword [rax + 4], ebx
mov dword [rax - 0x1c], r8d
mov dword [rax - 0x18], r9d
mov dword [rax - 0x14], r11d
mov dword [rax - 0x10], r10d
lea rax, [rax + 0x24]
sub rcx, r13
jne 0x14000c930
mov r8d, ebx
lea rdx, [rbp - 0x10]
cmp r14d, r12d
mov ecx, r14d
setbe r8b
inc r8d
call sub.openjp2.dll_opj_image_create
mov qword [rbp - 0x80], rax
mov rdi, rax
test rax, rax
je 0x14000cabe
mov ecx, dword [r15 + 0x470c]
mov dword [rax], ecx
mov ecx, dword [r15 + 0x4710]
mov dword [rax + 4], ecx
mov edx, dword [rsp + 0x60]
dec edx
imul edx, dword [r15 + 0x4714]
inc edx
add edx, dword [rax]
mov dword [rax + 8], edx
mov ecx, dword [rsp + 0x50]
dec ecx
imul ecx, dword [r15 + 0x4718]
inc ecx
add ecx, dword [rax + 4]
mov dword [rax + 0xc], ecx
mov ecx, dword [rsp + 0x60]
mov eax, r14d
imul rcx, rax
shl rcx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x78], rax
mov r15, rax
test rax, rax
je 0x14000cb0a
movzx ecx, r14w
mov r9d, r14d
and cx, r13w
lea edx, [r14 - 1]
sub r13w, cx
lea r8, [rbp - 0x38]
mov rcx, qword [rdi + 0x18]
shl rdx, 6
mov word [rdx + rcx + 0x38], r13w
mov rdx, rbx
nop word [rax + rax]
mov rax, qword [rdi + 0x18]
lea r8, [r8 + 8]
lea rdx, [rdx + 0x40]
mov rcx, qword [rax + rdx - 0x10]
mov qword [r8 - 8], rcx
sub r9, 1
jne 0x14000ca10
mov r14d, ebx
cmp dword [rsp + 0x50], ebx
jbe 0x14000cb0a
mov ecx, dword [rsp + 0x60]
mov rdi, qword [rbp - 0x48]
mov r13, qword [rbp - 0x40]
movd xmm6, r12d
mov r12, qword [rbp - 0x60]
nop dword [rax]
mov r8d, ecx
mov rdx, r15
imul r8, rdi
mov ecx, r14d
mov rcx, qword [rsi + rcx*8]
call r12
mov r8d, dword [rsp + 0x60]
lea rdx, [rbp - 0x38]
mov rcx, r15
call r13
mov ecx, dword [rsp + 0x60]
xorps xmm0, xmm0
mov rax, rbx
movd xmm2, ecx
pshufd xmm2, xmm2, 0
punpckldq xmm2, xmm0
psllq xmm2, xmm6
nop
movdqu xmm0, xmmword [rbp + rax*8 - 0x38]
movdqa xmm1, xmm2
paddq xmm1, xmm0
movdqu xmmword [rbp + rax*8 - 0x38], xmm1
add rax, 2
cmp rax, 4
jl 0x14000ca90
inc r14d
cmp r14d, dword [rsp + 0x50]
jb 0x14000ca50
mov rdi, qword [rbp - 0x80]
jmp 0x14000cb0a
mov r15, qword [rsp + 0x78]
jmp 0x14000cb0a
mov ecx, r12d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, dword [rbp - 0x74]
lea rdx, str.pngtoimage:_bit_depth__d_is_not_supported_n
jmp 0x14000c7c5
mov rsi, qword [rbp - 0x70]
mov r15, qword [rsp + 0x78]
mov rdi, qword [rbp - 0x80]
jmp 0x14000cb0f
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, r14
lea rdx, str.pngtoimage:__s_is_no_valid_PNG_file_n
mov rcx, rax
call fcn.140002170
mov r12, qword [rsp + 0x68]
test rsi, rsi
je 0x14000cb42
cmp dword [rsp + 0x50], ebx
jbe 0x14000cb39
nop word [rax + rax]
mov eax, ebx
mov rcx, qword [rsi + rax*8]
test rcx, rcx
je 0x14000cb31
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc ebx
cmp ebx, dword [rsp + 0x50]
jb 0x14000cb20
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test r15, r15
je 0x14000cb50
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp qword [rsp + 0x58], 0
je 0x14000cb6a
xor r8d, r8d
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x58]
call sub.libpng16.dll_png_destroy_read_struct
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, rdi
mov rcx, qword [rbp + 0x88]
xor rcx, rsp
call fcn.14000cdb0
mov rbx, qword [rsp + 0x1f0]
movaps xmm6, xmmword [rsp + 0x190]
add rsp, 0x1a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret