Function at 0x140003d90
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov r14, rcx
mov ebx, r9d
xor ecx, ecx
mov edi, r8d
mov qword [rsp + 0x30], rcx
mov r13, rdx
lea r15d, [rcx + 0x24]
mov rcx, r14
call fcn.140003850
mov r9d, ebx
mov r8d, edi
mov rdx, r13
mov rcx, r14
call fcn.140002ef0
mov rdx, r14
movsxd rbx, eax
lea rcx, str.exec_n
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputs]
mov rcx, r13
call sub.tiff.dll_TIFFIsTiled
mov dword [rsp + 0x28], eax
mov r12d, eax
mov rcx, r13
test eax, eax
je 0x140003e07
call sub.tiff.dll_TIFFNumberOfTiles
mov edx, 0x145
jmp 0x140003e11
call sub.tiff.dll_TIFFNumberOfStrips
mov edx, 0x117
lea r8, [rsp + 0x38]
mov dword [rsp + 0x24], eax
mov rcx, r13
mov qword [rsp + 0x80], rbp
mov edi, eax
call sub.tiff.dll_TIFFGetField
test ebx, ebx
je 0x140003e69
mov rcx, qword [rsp + 0x38]
mov rbp, qword [rcx]
cmp edi, 1
jbe 0x140003e80
add rcx, 8
lea edx, [rdi - 1]
nop dword [rax]
nop dword [rax + rax]
mov rax, rbp
mov rbp, qword [rcx]
cmp rbp, rax
lea rcx, [rcx + 8]
cmovle rbp, rax
sub rdx, 1
jne 0x140003e50
jmp 0x140003e80
mov rcx, r13
test r12d, r12d
je 0x140003e78
call sub.tiff.dll_TIFFTileSize
jmp 0x140003e7d
call sub.tiff.dll_TIFFStripSize
mov rbp, rax
mov rax, qword [0x14000d010]
mov qword [rsp + 0x88], rsi
test rax, rax
je 0x140003ede
cmp rbp, rax
jg 0x140003e9e
test rbp, rbp
jns 0x140003ede
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [0x14000d010]
lea rdx, str.MemoryLimitError:_allocation_of__lld_bytes_is_forbidden._Limit_is__lld._n
mov rcx, rax
mov r8, rbp
call fcn.140005670
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.__________________use__M_option_to_change_limit._n
call fcn.140005670
jmp 0x140003eee
mov rcx, rbp
call fcn.1400073df
mov rsi, rax
test rax, rax
jne 0x140003f20
mov rcx, qword [0x14000d0a8]
lea rax, str.tiles
test r12d, r12d
lea r9, str.strips
mov r8, rbp
lea rdx, str.Cant_alloc__lld_bytes_for__s.
cmovne r9, rax
call sub.tiff.dll_TIFFError
xor eax, eax
jmp 0x1400042af
cmp dword [0x14000d070], 0
je 0x140003f6f
mov rax, rbp
cqo
sub rax, rdx
sar rax, 1
lea rcx, [rax + 8]
add rcx, rbp
call fcn.140005ad0
mov qword [rsp + 0x30], rax
mov rdi, rax
test rax, rax
jne 0x140003f74
mov rcx, rsi
call sub.tiff.dll__TIFFfree
mov rcx, qword [0x14000d0a8]
lea rdx, str.Cannot_allocate_ASCII85_encoding_buffer.
call sub.tiff.dll_TIFFError
xor eax, eax
jmp 0x1400042af
mov rdi, qword [rsp + 0x30]
lea r8, [rsp + 0x20]
mov edx, 0x10a
mov rcx, r13
call sub.tiff.dll_TIFFGetFieldDefaulted
xor r12d, r12d
cmp dword [rsp + 0x24], r12d
jbe 0x140004293
movsxd rax, dword [rsp + 0x28]
mov rcx, rbx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rbx
cmp dword [0x14000d070], 0
je 0x140003fc5
mov dword [0x14000d6f8], 0x48
mov dword [0x14000d6fc], 0
jmp 0x140003fcb
mov r15d, 0x24
test rcx, rcx
mov r9, rbp
mov rcx, r13
mov r8, rsi
mov edx, r12d
je 0x140004005
test rax, rax
je 0x140003fe8
call sub.tiff.dll_TIFFReadRawTile
jmp 0x140003fed
call sub.tiff.dll_TIFFReadRawStrip
cmp word [rsp + 0x20], 2
mov rbx, rax
jne 0x140004019
mov rdx, rax
mov rcx, rsi
call sub.tiff.dll_TIFFReverseBits
jmp 0x140004019
test rax, rax
je 0x140004011
call sub.tiff.dll_TIFFReadEncodedTile
jmp 0x140004016
call sub.tiff.dll_TIFFReadEncodedStrip
mov rbx, rax
test rbx, rbx
jns 0x14000405e
cmp dword [rsp + 0x28], 0
lea rax, str.tile
mov rcx, qword [0x14000d0a8]
lea r8, str.strip
cmovne r8, rax
lea rdx, str.Cant_read__s__u.
mov r9d, r12d
call sub.tiff.dll_TIFFError
cmp dword [0x14000d070], 0
je 0x14000405e
mov rdx, r14
xor ecx, ecx
call fcn.140001360
cmp word [0x14000d0cc], 0x10
jne 0x1400040bc
mov rcx, r13
call sub.tiff.dll_TIFFIsBigEndian
test eax, eax
jne 0x1400040bc
test rbx, rbx
jle 0x1400040bc
cmp word [0x14000d0cc], 8
jbe 0x1400040bc
lea r9, [rbx - 1]
xor r8d, r8d
test r9, r9
jle 0x1400040bc
lea rdx, [rsi + 1]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx]
add r8d, 2
movzx ecx, byte [rdx - 1]
mov byte [rdx - 1], al
movsxd rax, r8d
mov byte [rdx], cl
lea rdx, [rdx + 2]
cmp rax, r9
jl 0x1400040a0
cmp dword [0x14000d0e0], 0
je 0x14000419e
movzx edx, word [0x14000d0dc]
xor r10d, r10d
movzx r8d, word [0x14000d0c8]
xor r9d, r9d
mov r11d, r8d
movsxd rcx, r8d
movsxd rax, edx
sub r11d, edx
sub rcx, rax
cmp rcx, rbx
jge 0x140004198
mov ecx, r8d
mov rax, rsi
sub rcx, rdx
nop
movzx ecx, byte [rcx + rsi]
mov r8d, 0xff
sub r8d, ecx
mov edx, r11d
sub edx, 1
je 0x14000416c
sub edx, 1
je 0x14000414b
cmp edx, 1
jne 0x14000417e
movsxd rdx, r9d
movzx ecx, r8b
add r10d, 3
add cl, byte [rdx + rsi]
mov byte [rax], cl
movzx ecx, byte [rdx + rsi + 1]
add cl, r8b
mov byte [rax + 1], cl
movzx ecx, byte [rdx + rsi + 2]
add cl, r8b
mov byte [rax + 2], cl
add rax, 3
jmp 0x14000417e
movsxd rdx, r9d
movzx ecx, r8b
add r10d, 2
add cl, byte [rdx + rsi]
mov byte [rax], cl
movzx ecx, byte [rdx + rsi + 1]
add cl, r8b
mov byte [rax + 1], cl
add rax, 2
jmp 0x14000417e
movsxd rcx, r9d
inc r10d
movzx edx, byte [rcx + rsi]
add dl, r8b
mov byte [rax], dl
inc rax
movzx ecx, word [0x14000d0c8]
add r9d, ecx
lea ecx, [r9 + r11]
movsxd rcx, ecx
cmp rcx, rbx
jl 0x140004100
movsxd rax, r10d
sub rbx, rax
cmp dword [0x14000d070], 0
je 0x1400041da
mov r9, rbx
mov r8, rsi
mov edx, 1
mov rcx, rdi
call fcn.1400010d0
test rax, rax
jle 0x14000423f
mov r9, r14
mov r8d, 1
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
jmp 0x14000423f
mov rdi, rsi
test rbx, rbx
jle 0x140004248
movzx ecx, byte [rdi]
mov rdx, r14
mov rax, qword [str.0123456789abcdef]
shr rcx, 4
movsx ecx, byte [rcx + rax]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
movzx ecx, byte [rdi]
mov rdx, r14
mov rax, qword [str.0123456789abcdef]
and ecx, 0xf
movsx ecx, byte [rcx + rax]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
dec r15d
lea rdi, [rdi + 1]
test r15d, r15d
jg 0x140004237
mov rdx, r14
mov ecx, 0xa
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov r15d, 0x24
dec rbx
test rbx, rbx
jg 0x1400041e2
cmp dword [0x14000d070], 0
jne 0x140004276
cmp dword [0x14000d074], 0
jne 0x14000425a
cmp dword [0x14000d078], 0
je 0x140004268
mov rdx, r14
mov ecx, 0x3e
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdx, r14
mov ecx, 0xa
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_putc]
mov rdi, qword [rsp + 0x30]
inc r12d
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
cmp r12d, dword [rsp + 0x24]
jb 0x140003fa6
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400042a2
call sub.tiff.dll__TIFFfree
mov rcx, rsi
call sub.tiff.dll__TIFFfree
mov eax, 1
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
ret