Function at 0x1400010d0
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov dword [rax + 8], ecx
push r12
push r14
sub rsp, 0x68
movsxd r14, ecx
mov r12, rdx
cmp r14d, 2
jl 0x140001c0d
mov rcx, qword [r12 + r14*8 - 8]
lea rdx, [0x14000345c]
mov qword [rax + 0x20], rbx
lea ebx, [r14 - 1]
mov qword [rax - 0x18], rbp
mov qword [rax - 0x20], rsi
mov qword [rax - 0x28], rdi
mov qword [rax - 0x30], r13
mov qword [rax - 0x38], r15
movaps xmmword [rax - 0x48], xmm6
call sub.tiff.dll_TIFFOpen
mov qword [rsp + 0x90], rax
mov r13, rax
test rax, rax
je 0x140001ac6
mov ebp, 1
cmp ebx, ebp
jle 0x140001a93
lea r15, [0x14000355c]
movsxd rbx, ebp
lea r8, [0x140003484]
xor esi, esi
mov rcx, qword [r12 + rbx*8]
movzx eax, byte [rcx]
cmp al, byte [0x140003460]
jne 0x1400011ae
movzx eax, byte [rcx + 1]
cmp al, byte [0x140003461]
jne 0x1400011ae
movzx eax, byte [rcx + 2]
cmp al, byte [0x140003462]
jne 0x1400011ae
lea eax, [r14 - 2]
cmp ebp, eax
jge 0x1400011ae
mov rcx, qword [r12 + rbx*8 + 8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edx, eax
mov rcx, r13
call sub.tiff.dll_TIFFSetDirectory
cmp eax, 1
jne 0x140001aa7
add ebp, 2
lea r8, [0x140003484]
movsxd rbx, ebp
mov rcx, rsi
mov rdx, qword [r12 + rbx*8]
nop dword [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400011fe
cmp rcx, 4
jne 0x1400011c0
lea eax, [r14 - 2]
cmp ebp, eax
jge 0x1400011fe
mov rcx, qword [r12 + rbx*8 + 8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
movsxd rdx, eax
mov rcx, r13
call sub.tiff.dll_TIFFSetSubDirectory
cmp eax, 1
jne 0x140001afa
add ebp, 2
movsxd rdx, ebp
movsxd rdi, ebp
mov rbx, qword [r12 + rdx*8]
movzx eax, byte [rbx]
cmp al, byte [0x1400034a8]
jne 0x140001297
movzx eax, byte [rbx + 1]
cmp al, byte [0x1400034a9]
jne 0x140001297
movzx eax, byte [rbx + 2]
cmp al, byte [0x1400034aa]
jne 0x140001297
lea eax, [r14 - 2]
cmp ebp, eax
jge 0x140001297
mov rdx, qword [r12 + rdx*8 + 8]
mov rcx, r13
call section..text
mov rbx, rax
test rax, rax
je 0x140001ac6
mov rcx, rax
call sub.tiff.dll_TIFFFieldTag
mov edx, eax
mov rcx, r13
call sub.tiff.dll_TIFFUnsetField
cmp eax, 1
je 0x14000128f
mov rcx, rbx
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Failed_to_unset__s_n
mov rcx, rax
call fcn.140001080
add ebp, 2
jmp 0x140001a85
movzx eax, byte [rbx]
lea r8d, [r14 - 3]
cmp al, byte [0x1400034c4]
jne 0x140001929
movzx eax, byte [rbx + 1]
cmp al, byte [0x1400034c5]
jne 0x140001929
movzx eax, byte [rbx + 2]
cmp al, byte [0x1400034c6]
jne 0x140001929
cmp ebp, r8d
jge 0x140001929
mov r14, qword [r12 + rdx*8 + 8]
mov rcx, r13
mov rdx, r14
call section..text
mov r15, rax
test rax, rax
je 0x140001b6f
add ebp, 2
mov rcx, rax
movsxd rbx, ebp
call sub.tiff.dll_TIFFFieldDataType
mov rcx, r15
cmp eax, 2
jne 0x1400013a0
call sub.tiff.dll_TIFFFieldPassCount
movsxd rsi, ebp
mov rdi, qword [r12 + rsi*8]
test eax, eax
je 0x140001351
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rdi + rax], 0
jne 0x140001320
inc rax
cmp rax, 0xffff
ja 0x14000136f
mov rcx, r15
movzx ebx, ax
call sub.tiff.dll_TIFFFieldTag
mov edx, eax
mov r9, rdi
mov r8d, ebx
mov rcx, r13
call sub.tiff.dll_TIFFSetField
jmp 0x140001366
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
mov edx, eax
mov r8, rdi
mov rcx, r13
call sub.tiff.dll_TIFFSetField
cmp eax, 1
je 0x140001a76
mov rcx, r15
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r12 + rsi*8]
lea rdx, str.Failed_to_set__s_s_n
mov rcx, rax
mov r8, rbx
call fcn.140001080
jmp 0x140001a76
call sub.tiff.dll_TIFFFieldWriteCount
test eax, eax
jg 0x1400013ba
mov rcx, r15
call sub.tiff.dll_TIFFFieldWriteCount
cmp eax, 0xffffffff
jne 0x140001a76
mov rcx, r15
mov r13d, 1
call sub.tiff.dll_TIFFFieldWriteCount
cmp eax, 0xffffffff
jne 0x1400013dc
mov rcx, qword [r12 + rbx*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
lea ebp, [rbx + 1]
jmp 0x1400013e6
mov rcx, r15
call sub.tiff.dll_TIFFFieldWriteCount
mov ebp, ebx
mov edi, dword [rsp + 0x80]
sub edi, ebp
movsx r12, ax
cmp edi, r12d
jl 0x140001b38
cmp ax, r13w
jg 0x140001535
mov rcx, r15
call sub.tiff.dll_TIFFFieldWriteCount
cmp eax, 0xffffffff
je 0x140001535
mov rcx, r15
call sub.tiff.dll_TIFFFieldDataType
dec eax
cmp eax, 0x11
ja case.0x14000143d.2
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x1c20]
add rcx, rdx
jmp rcx
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov rcx, r15
mov ebx, eax
call sub.tiff.dll_TIFFFieldTag
mov rcx, qword [rsp + 0x90]
mov edx, eax
mov r8d, ebx
call sub.tiff.dll_TIFFSetField
mov r13d, eax
inc ebp
jmp 0x1400018e3
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atol]
jmp 0x140001454
mov rcx, qword [rsp + 0x88]
xor edx, edx
movsxd rax, ebp
lea r8d, [rdx + 0xa]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoll]
mov rcx, r15
mov rbx, rax
call sub.tiff.dll_TIFFFieldTag
mov rcx, qword [rsp + 0x90]
mov edx, eax
mov r8, rbx
call sub.tiff.dll_TIFFSetField
mov r13d, eax
inc ebp
jmp 0x1400018e3
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
movaps xmm6, xmm0
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
mov rcx, qword [rsp + 0x90]
movaps xmm2, xmm6
movq r8, xmm2
mov edx, eax
call sub.tiff.dll_TIFFSetField
mov r13d, eax
inc ebp
jmp 0x1400018e3
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
cvtps2pd xmm6, xmm1
jmp 0x1400014eb
mov rcx, r15
call sub.tiff.dll_TIFFFieldDataType
add eax, 0xfffffffd
lea rbx, [0x140000000]
cmp eax, 0xf
ja case.0x140001558.6
cdqe
mov ecx, dword [rbx + rax*4 + 0x1c68]
add rcx, rbx
jmp rcx
mov ecx, 2
jmp 0x140001572
mov ecx, 4
jmp 0x140001572
mov ecx, 8
jmp 0x140001572
mov ecx, r13d
mov eax, r12d
imul eax, ecx
movsxd rcx, eax
call sub.tiff.dll__TIFFmalloc
mov rsi, rax
test rax, rax
je 0x140001b16
mov rcx, r15
call sub.tiff.dll_TIFFFieldDataType
dec eax
cmp eax, 0x11
ja case.0x1400015ac.2
movsxd rcx, eax
mov edx, dword [rbx + rcx*4 + 0x1ca8]
add rdx, rbx
jmp rdx
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
nop dword [rax + rax]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov byte [rbx + rsi], al
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x1400015d0
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov word [rsi + rbx*2], ax
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x140001607
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
nop
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov byte [rbx + rsi], al
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x140001640
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov word [rsi + rbx*2], ax
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x140001677
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
nop
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atol]
mov dword [rsi + rbx*4], eax
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x1400016b0
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atol]
mov dword [rsi + rbx*4], eax
lea rdi, [rdi + 8]
inc rbx
cmp rbx, r12
jl 0x1400016e7
jmp case.0x1400015ac.2
mov rdi, r12
test r12d, r12d
jle case.0x1400015ac.2
movsxd rax, ebp
mov rbx, rsi
lea r14, [rax*8]
sub r14, rsi
add r14, qword [rsp + 0x88]
nop dword [rax]
mov rcx, qword [r14 + rbx]
xor edx, edx
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoll]
mov qword [rbx], rax
lea rbx, [rbx + 8]
sub rdi, r13
jne 0x140001730
jmp case.0x1400015ac.2
mov rdi, r12
test r12d, r12d
jle case.0x1400015ac.2
movsxd rax, ebp
mov rbx, rsi
lea r14, [rax*8]
sub r14, rsi
add r14, qword [rsp + 0x88]
nop word [rax + rax]
mov rcx, qword [rbx + r14]
xor edx, edx
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoll]
mov qword [rbx], rax
lea rbx, [rbx + 8]
sub rdi, r13
jne 0x140001780
jmp case.0x1400015ac.2
mov rdi, r12
test r12d, r12d
jle case.0x1400015ac.2
movsxd rax, ebp
mov rbx, rsi
lea r14, [rax*8]
sub r14, rsi
add r14, qword [rsp + 0x88]
nop
mov rcx, qword [r14 + rbx]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
movsd qword [rbx], xmm0
lea rbx, [rbx + 8]
sub rdi, r13
jne 0x1400017c0
jmp case.0x1400015ac.2
xor ebx, ebx
test r12d, r12d
jle case.0x1400015ac.2
mov rcx, qword [rsp + 0x88]
movsxd rax, ebp
lea rdi, [rcx + rax*8]
nop
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
xorps xmm1, xmm1
lea rdi, [rdi + 8]
cvtsd2ss xmm1, xmm0
movss dword [rsi + rbx*4], xmm1
inc rbx
cmp rbx, r12
jl 0x1400017f0
mov rcx, r15
call sub.tiff.dll_TIFFFieldPassCount
mov rcx, r15
mov ebx, eax
call sub.tiff.dll_TIFFFieldTag
test ebx, ebx
je 0x140001841
mov rcx, qword [rsp + 0x90]
mov r9, rsi
mov r8d, r12d
mov edx, eax
call sub.tiff.dll_TIFFSetField
jmp 0x1400018d8
cmp eax, 0x129
je 0x140001891
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
cmp eax, 0x141
je 0x140001891
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
cmp eax, 0x212
je 0x140001891
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
cmp eax, 0x150
je 0x140001891
mov rcx, r15
call sub.tiff.dll_TIFFFieldTag
mov rcx, qword [rsp + 0x90]
mov edx, eax
mov r8, rsi
call sub.tiff.dll_TIFFSetField
jmp 0x1400018d8
mov rcx, r15
call sub.tiff.dll_TIFFFieldDataType
mov rcx, r15
cmp eax, r13d
jne 0x1400018aa
movzx ebx, byte [rsi + 1]
movzx edi, byte [rsi]
jmp 0x1400018be
call sub.tiff.dll_TIFFFieldDataType
cmp eax, 3
jne 0x1400018db
movzx ebx, word [rsi + 2]
mov rcx, r15
movzx edi, word [rsi]
call sub.tiff.dll_TIFFFieldTag
mov rcx, qword [rsp + 0x90]
mov r9d, ebx
mov r8d, edi
mov edx, eax
call sub.tiff.dll_TIFFSetField
mov r13d, eax
mov rcx, rsi
call sub.tiff.dll__TIFFfree
cmp r13d, 1
je case.0x14000143d.2
mov rcx, r15
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Failed_to_set__s_n
mov rcx, rax
call fcn.140001080
mov r13, qword [rsp + 0x90]
add ebp, r12d
mov r12, qword [rsp + 0x88]
jmp 0x140001a76
mov rcx, rsi
nop dword [rax]
movzx eax, byte [rbx + rcx]
inc rcx
cmp al, byte [r15 + rcx - 1]
jne 0x140001ba1
cmp rcx, 4
jne 0x140001930
cmp ebp, r8d
jge 0x140001ba1
mov rdx, qword [r12 + rdx*8 + 8]
mov rcx, r13
call section..text
mov rsi, rax
test rax, rax
je 0x140001ac6
mov rcx, rax
call sub.tiff.dll_TIFFFieldDataType
cmp eax, 2
jne 0x140001b79
mov rcx, qword [r12 + rdi*8 + 0x10]
lea rdx, [0x14000359c]
add ebp, eax
mov r14, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
jne 0x1400019aa
mov rcx, qword [r12 + rdi*8 + 0x10]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
jmp 0x140001a7d
mov ecx, 0xf4240
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1400019e3
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Memory_allocation_error_n
call fcn.140001080
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x140001a7d
mov r9, rbx
mov edx, 1
mov r8d, 0xf423f
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rbx
mov r15, rax
mov byte [rax + rdi], 0
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rsi
call sub.tiff.dll_TIFFFieldPassCount
mov rcx, rsi
mov ebx, eax
call sub.tiff.dll_TIFFFieldTag
mov edx, eax
mov rcx, r13
test ebx, ebx
je 0x140001a33
movzx r8d, r15w
mov r9, rdi
call sub.tiff.dll_TIFFSetField
jmp 0x140001a3b
mov r8, rdi
call sub.tiff.dll_TIFFSetField
test eax, eax
jne 0x140001a6c
mov rcx, rsi
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r12 + r14*8 + 0x10]
lea rdx, str.Failed_to_set__s_from_file__s_n
mov rcx, rax
mov r8, rbx
call fcn.140001080
mov rcx, rdi
call sub.tiff.dll__TIFFfree
inc ebp
lea r15, [0x14000355c]
mov r14d, dword [rsp + 0x80]
inc ebp
lea eax, [r14 - 1]
cmp ebp, eax
jl 0x14000114b
mov rcx, r13
call sub.tiff.dll_TIFFRewriteDirectory
mov rcx, r13
call sub.tiff.dll_TIFFClose
xor eax, eax
jmp 0x140001acb
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r12 + rbx*8 + 8]
lea rdx, str.Failed_to_set_directory_s_n
mov rcx, rax
call fcn.140001080
mov eax, 1
mov r15, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x98]
movaps xmm6, xmmword [rsp + 0x30]
add rsp, 0x68
pop r14
pop r12
ret
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r12 + rbx*8 + 8]
lea rdx, str.Failed_to_set_sub_directory_s_n
mov rcx, rax
jmp 0x140001ac1
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.No_space_for__s_tag_n
mov rcx, rax
call fcn.140001080
mov eax, r13d
jmp 0x140001acb
mov rcx, r15
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rbx
mov dword [rsp + 0x20], edi
mov rcx, rax
lea rdx, str.Number_of_tag_values_is_not_enough._Expected__d_values_for__s_tag__got__d_n
mov r8d, r12d
call fcn.140001080
mov eax, r13d
jmp 0x140001acb
mov eax, 3
jmp 0x140001acb
mov rcx, rsi
call sub.tiff.dll_TIFFFieldName
mov ecx, 2
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Only_ASCII_tags_can_be_set_from_file.__s_is_not_ASCII_tag._n
mov rcx, rax
jmp 0x140001ac1
movzx eax, byte [rbx]
cmp al, byte [0x1400035e0]
jne 0x140001bc4
movzx eax, byte [rbx + 1]
cmp al, byte [0x1400035e1]
jne 0x140001bc4
movzx eax, byte [rbx + 2]
cmp al, byte [0x1400035e2]
je 0x140001c18
lea rcx, str.__help
nop dword [rax + rax]
movzx eax, byte [rbx + rsi]
inc rsi
cmp al, byte [rcx + rsi - 1]
jne 0x140001be5
cmp rsi, 7
je 0x140001c18
jmp 0x140001bd0
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str.Unrecognised_option:__s_n
mov rcx, rax
call fcn.140001080
mov ecx, 1
call fcn.140001cf0
int3
mov ecx, 1
call fcn.140001cf0
int3
xor ecx, ecx
call fcn.140001cf0
int3