Function at 0x1400022a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
xor eax, eax
mov dword [rsp + 0x4c], 0xffffffff
mov r15d, 1
mov dword [rsp + 0x54], eax
mov edi, ecx
mov dword [rsp + 0x44], eax
mov ecx, 2
mov qword [rsp + 0x70], rax
mov word [rsp + 0x48], cx
lea r8, str.c:r:H:w:l:b:d:LMp:si:o:h
mov ebx, r15d
mov word [rsp + 0x5c], r15w
mov ecx, edi
mov dword [rsp + 0xd0], ebx
mov rsi, rdx
mov dword [rsp + 0x58], eax
mov r13d, r15d
mov dword [rsp + 0x50], eax
mov r14d, eax
mov word [rsp + 0xd8], r15w
mov ebp, eax
mov qword [rsp + 0x68], rax
mov r12d, eax
call fcn.140003000
lea r9, [0x140000000]
cmp eax, 0xffffffff
je 0x140002924
mov r10d, 0xa
lea r8, str.none
add eax, 0xffffffb8
lea edx, [r10 - 5]
cmp eax, 0x2f
ja case.0x140002366.86
cdqe
movzx eax, byte [r9 + rax + 0x2eb0]
mov ecx, dword [r9 + rax*4 + 0x2e74]
add rcx, r9
jmp rcx
mov rbx, qword [0x140006660]
xor ecx, ecx
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x14000238e
cmp rcx, rdx
jne 0x140002371
mov word [section..data], r15w
jmp 0x1400023ad
lea rdx, str.packbits
mov rcx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jne 0x1400023da
mov eax, 0x8005
mov word [section..data], ax
mov ebx, dword [rsp + 0xd0]
lea r8, str.c:r:H:w:l:b:d:LMp:si:o:h
mov rdx, rsi
mov ecx, edi
call fcn.140003000
cmp eax, 0xffffffff
je 0x140002924
lea r9, [0x140000000]
jmp 0x140002337
mov r8d, 4
lea rdx, str.jpeg
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov rcx, rbx
test eax, eax
jne 0x14000245a
lea edx, [rax + 0x3a]
call sub.VCRUNTIME140.dll_strchr
mov ecx, 7
mov word [section..data], cx
test rax, rax
je 0x1400023ad
movsx ecx, byte [rax + 1]
lea rbx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isdigit]
test eax, eax
je 0x140002433
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [0x140006008], eax
jmp 0x140002443
cmp byte [rbx], 0x72
jne 0x140002e68
mov dword [0x140006004], r12d
mov edx, 0x3a
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
jne 0x140002410
jmp 0x1400023ad
mov r8d, 3
lea rdx, [0x140004e04]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov rcx, rbx
test eax, eax
jne 0x1400024a5
lea edx, [rax + 0x3a]
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140002492
lea rcx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov word [0x140006060], ax
mov r8d, 5
mov word [section..data], r8w
jmp 0x1400023ad
mov r8d, 3
lea rdx, [0x140004e08]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002e68
lea edx, [rax + 0x3a]
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1400024e1
lea rcx, [rax + 1]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov word [0x140006060], ax
mov eax, 8
jmp 0x1400023a6
mov rcx, qword [0x140006660]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rsp + 0x4c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
movsxd r14, eax
mov qword [rsp + 0x70], r14
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rsp + 0x54], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rsp + 0x44], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov r13d, eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.byte
mov r8d, 4
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002594
mov ebx, r15d
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.short
mov ebx, 5
mov r8d, ebx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400025d0
mov ebx, 3
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.long
mov r8d, 4
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14000260a
mov ebx, 4
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.sbyte
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002641
mov ebx, 6
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.sshort
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14000267b
mov ebx, 8
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.slong
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400026b2
mov ebx, 9
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.float
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400026e9
mov ebx, 0xb
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.double
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
mov ebx, r15d
mov eax, 0xc
cmove ebx, eax
mov ecx, ebx
mov dword [rsp + 0xd0], ebx
call sub.tiff.dll_TIFFDataWidth
mov dword [rsp + 0x5c], eax
jmp case.0x140002366.86
mov eax, 2
mov dword [rsp + 0x48], eax
jmp case.0x140002366.86
mov word [rsp + 0x48], r15w
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.miniswhite
mov r8, r10
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002768
mov dword [rsp + 0xd8], r12d
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.minisblack
mov r8d, 0xa
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002794
mov word [rsp + 0xd8], r15w
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, [0x140004b3c]
mov r8d, 3
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400027c4
mov eax, 2
mov word [rsp + 0xd8], ax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.cmyk
mov r8d, 4
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov r8d, 5
test eax, eax
jne 0x1400027f6
mov word [rsp + 0xd8], r8w
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.ycbcr
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002820
mov eax, 6
mov word [rsp + 0xd8], ax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.cielab
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002850
mov eax, 8
mov word [rsp + 0xd8], ax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.icclab
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002880
mov eax, 9
mov word [rsp + 0xd8], ax
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.itulab
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140002786
mov eax, 0xa
mov word [rsp + 0xd8], ax
jmp case.0x140002366.86
mov ebp, r15d
mov dword [rsp + 0x58], r15d
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.pixel
mov r8d, 4
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400028e9
mov dword [rsp + 0x50], r12d
jmp case.0x140002366.86
mov rcx, qword [0x140006660]
lea rdx, str.band
mov r8d, 6
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
xor ecx, ecx
test eax, eax
sete cl
mov dword [rsp + 0x50], ecx
jmp case.0x140002366.86
mov r9, qword [0x140006660]
mov qword [rsp + 0x68], r9
jmp case.0x140002366.86
movsxd rax, dword [0x140006014]
sub edi, eax
cmp edi, 2
jl 0x140002e68
mov rcx, qword [rsi + rax*8]
xor r8d, r8d
mov edx, 0x8000
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov dword [rsp + 0x40], eax
mov edi, eax
test eax, eax
jns 0x140002982
movsxd rbx, dword [0x140006014]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [rsi + rbx*8]
lea rdx, str._s:__s:_Cannot_open_input_file._n
mov r8, qword [rsi]
mov rcx, rax
call fcn.140001da0
mov eax, r15d
jmp 0x140002e14
test r13d, r13d
jne 0x1400029a9
lea ecx, [r13 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.The_number_of_bands_is_illegal._n
call fcn.140001da0
lea eax, [r13 - 1]
jmp 0x140002e14
lea rax, [rsp + 0x44]
mov r9d, r13d
mov qword [rsp + 0x30], rax
mov r8, r14
lea rax, [rsp + 0x54]
mov edx, ebx
mov qword [rsp + 0x28], rax
mov ecx, edi
mov dword [rsp + 0x20], ebp
call fcn.140001df0
test eax, eax
js 0x14000297a
mov rbp, qword [rsp + 0x68]
test rbp, rbp
jne 0x1400029f2
mov eax, dword [0x140006014]
inc eax
movsxd rcx, eax
mov rbp, qword [rsi + rcx*8]
mov qword [rsp + 0x68], rbp
lea rdx, [0x140004bc4]
mov rcx, rbp
call sub.tiff.dll_TIFFOpen
mov qword [rsp + 0x60], rax
mov rbx, rax
test rax, rax
jne 0x140002a34
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsi]
lea rdx, str._s:__s:_Cannot_open_file_for_output._n
mov rcx, rax
mov r9, rbp
call fcn.140001da0
mov eax, r15d
jmp 0x140002e14
mov ebp, dword [rsp + 0x54]
mov edx, pe_nt_image_headers64
mov r8d, ebp
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r14d, dword [rsp + 0x44]
mov edx, 0x101
mov r8d, r14d
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r8d, r15d
mov edx, 0x112
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r8d, r13d
mov edx, 0x115
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
movsx esi, word [rsp + 0x5c]
mov edx, 0x102
mov rcx, rbx
lea r8d, [rsi*8]
call sub.tiff.dll_TIFFSetField
movzx r8d, word [rsp + 0x48]
mov edx, 0x10a
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r8d, r15d
mov edx, 0x11c
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
movzx r8d, word [rsp + 0xd8]
mov edx, 0x106
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov eax, dword [rsp + 0xd0]
dec eax
cmp eax, 0xb
ja case.0x140002af1.2
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x2ee0]
add rcx, rdx
jmp rcx
mov eax, 2
mov r15d, eax
jmp case.0x140002af1.1
mov r15d, 3
jmp case.0x140002af1.1
mov r15d, 4
mov r8d, r15d
mov edx, 0x153
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
movzx eax, word [section..data]
mov ecx, 0xffff
cmp ax, cx
jne 0x140002b38
mov eax, 0x8005
mov word [section..data], ax
movzx r8d, ax
mov edx, 0x103
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
movzx ecx, word [section..data]
sub ecx, 5
je 0x140002b67
sub ecx, 2
je 0x140002ba1
sub ecx, 1
je 0x140002b67
cmp ecx, 0x80aa
jne 0x140002b84
movzx eax, word [0x140006060]
test ax, ax
je 0x140002b84
movzx r8d, ax
mov edx, 0x13d
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r15d, esi
imul r15d, r13d
cmp dword [rsp + 0x50], 1
je 0x140002bc3
mov ebx, r15d
imul ebx, ebp
mov dword [rsp + 0xd8], ebx
jmp 0x140002bd9
mov r8d, dword [0x140006008]
mov edx, 0x10001
mov rcx, rbx
call sub.tiff.dll_TIFFSetField
mov r8d, dword [0x140006004]
mov edx, 0x10002
jmp 0x140002b7c
mov ebx, esi
imul ebx, ebp
mov ecx, ebx
mov dword [rsp + 0xd8], ebx
call sub.tiff.dll__TIFFmalloc
mov r12, rax
imul r15d, ebp
mov ecx, r15d
mov dword [rsp + 0x48], r15d
call sub.tiff.dll__TIFFmalloc
mov edx, dword [rsp + 0x4c]
mov r15, rax
mov rcx, qword [rsp + 0x60]
call sub.tiff.dll_TIFFDefaultStripSize
mov rcx, qword [rsp + 0x60]
cmp eax, r14d
mov edx, 0x116
cmova eax, r14d
mov r8d, eax
call sub.tiff.dll_TIFFSetField
mov rdx, qword [rsp + 0x70]
xor r8d, r8d
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
mov edx, dword [rsp + 0x44]
xor r14d, r14d
mov dword [rsp + 0x4c], r14d
test edx, edx
je 0x140002deb
cmp dword [rsp + 0x50], 1
je 0x140002caf
mov r8d, dword [rsp + 0x48]
mov rdx, r15
mov ecx, edi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
jns 0x140002c8d
movsxd rbx, dword [0x140006014]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str._s:__s:_scanline__u:_Read_error._n
mov dword [rsp + 0x20], r14d
mov rcx, rax
mov rax, qword [rsp + 0xc8]
mov r9, qword [rax + rbx*8]
mov r8, qword [rax]
call fcn.140001da0
jmp 0x140002db5
cmp dword [rsp + 0x58], 0
je 0x140002db5
mov r8d, dword [rsp + 0xd0]
mov edx, ebp
mov rcx, r15
call fcn.140002f10
jmp 0x140002db5
xor edi, edi
test r13d, r13d
je 0x140002db1
nop word [rax + rax]
mov ecx, dword [rsp + 0x40]
xor r8d, r8d
imul edx, edi
add edx, r14d
imul edx, ebx
add rdx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseeki64]
cmp rax, 0xffffffffffffffff
je 0x140002d7c
mov ecx, dword [rsp + 0x40]
mov r8d, ebx
mov rdx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
test eax, eax
js 0x140002d61
cmp dword [rsp + 0x58], 0
je 0x140002d12
mov r8d, dword [rsp + 0xd0]
mov edx, ebp
mov rcx, r12
call fcn.140002f10
xor ebx, ebx
test ebp, ebp
je 0x140002d49
movsx r14, word [rsp + 0x5c]
nop
mov ecx, ebx
mov edx, esi
imul ecx, r13d
mov r8, r14
imul edx, ebx
add ecx, edi
imul ecx, esi
add rdx, r12
add rcx, r15
call sub.VCRUNTIME140.dll_memcpy
inc ebx
cmp ebx, ebp
jb 0x140002d20
mov r14d, dword [rsp + 0x4c]
mov ebx, dword [rsp + 0xd8]
inc edi
mov edx, dword [rsp + 0x44]
cmp edi, r13d
jb 0x140002cc0
jmp 0x140002db1
movsxd rbx, dword [0x140006014]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str._s:__s:_scanline__u:_Read_error._n
jmp 0x140002d95
movsxd rbx, dword [0x140006014]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str._s:__s:_scanline__u:_seek_error._n
mov rcx, rax
mov dword [rsp + 0x20], r14d
mov rax, qword [rsp + 0xc8]
mov r9, qword [rax + rbx*8]
mov r8, qword [rax]
call fcn.140001da0
mov edi, dword [rsp + 0x40]
mov rbx, qword [rsp + 0x60]
xor r9d, r9d
mov rcx, rbx
mov r8d, r14d
mov rdx, r15
call sub.tiff.dll_TIFFWriteScanline
test eax, eax
js 0x140002e2f
mov edx, dword [rsp + 0x44]
inc r14d
mov ebx, dword [rsp + 0xd8]
mov dword [rsp + 0x4c], r14d
cmp r14d, edx
jb 0x140002c38
mov rbx, qword [rsp + 0x60]
test r12, r12
je 0x140002dfd
mov rcx, r12
call sub.tiff.dll__TIFFfree
test r15, r15
je 0x140002e0a
mov rcx, r15
call sub.tiff.dll__TIFFfree
mov rcx, rbx
call sub.tiff.dll_TIFFClose
xor eax, eax
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rsp + 0xc8]
lea rdx, str._s:__s:_scanline__u:_Write_error._n
mov r9, qword [rsp + 0x68]
mov rcx, rax
mov dword [rsp + 0x20], r14d
mov r8, qword [r8]
call fcn.140001da0
jmp 0x140002df0
xor ecx, ecx
call fcn.140002f50
int3
mov ecx, r15d
call fcn.140002f50
int3