Function at 0x1400d6530
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x100
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rdi, rcx
movsx ecx, word [rdx + 0x136]
mov rbx, rdx
lea rsi, [0x1401f468c]
sub ecx, 5
je 0x1400d6577
dec ecx
jne 0x1400d657e
lea rsi, str.CMYK
jmp 0x1400d657e
lea rsi, [0x14020e8d0]
lea rcx, [rsp + 0x30]
call fcn.140061e90
lea rcx, [rbp - 0x69]
sub rcx, rsi
nop
movzx eax, byte [rsi]
lea rsi, [rsi + 1]
mov byte [rcx + rsi - 1], al
test al, al
jne 0x1400d6590
movzx ecx, word [rbx + 0x48]
xor r15d, r15d
mov qword [rsp + 0xf0], r14
lea eax, [rcx - 1]
lea r14d, [r15 + 1]
cmp ax, r14w
jbe 0x1400d65e2
cmp cx, 4
mov ecx, dword [rbx + 0x50]
jne 0x1400d65cd
mov dword [rbp - 0x79], 0x80100
jmp 0x1400d65ea
lea eax, [rcx + rcx*2]
mov dword [rsp + 0x40], 0x180001
mov word [rbp - 0x79], r15w
mov dword [rbp - 0x7d], eax
jmp 0x1400d65f5
mov ecx, dword [rbx + 0x50]
mov word [rbp - 0x79], r15w
mov dword [rbp - 0x7d], ecx
mov dword [rsp + 0x40], 0x80001
mov rsi, r15
cmp word [rbx + 0x134], si
je 0x1400d661f
movsxd rcx, ecx
mov edx, 4
call fcn.1401be1f8
mov rsi, rax
test rax, rax
jne 0x1400d661f
movzx eax, r14w
jmp 0x1400d6844
lea rdx, [rsp + 0x30]
mov rcx, rbx
mov qword [rsp + 0xf8], r13
call fcn.14005fe70
movzx r13d, ax
test ax, ax
jne 0x1400d6838
movzx ecx, word [rbx + 0x48]
mov qword [rsp + 0x140], r12
mov r12d, r15d
lea eax, [rcx - 1]
cmp ax, 1
jbe 0x1400d69e5
cmp cx, 4
jne 0x1400d687c
cmp dword [rbx + 0x54], r15d
jle 0x1400d681b
mov r8d, r14d
mov edx, r12d
mov rcx, rbx
call fcn.1400629c0
cmp word [rbx + 0x134], 0
jne 0x1400d6748
cmp dword [rbx + 0x50], 0
mov r14d, r15d
jle 0x1400d672f
nop word [rax + rax]
mov rax, qword [rsp + 0x38]
mov r8, qword [rbp - 0x71]
movzx ecx, byte [r15 + rax]
lea edx, [rcx + rcx*2]
lea rcx, [rsp + 0x24]
movzx eax, byte [rdx + r8]
mov byte [rsp + 0x24], al
lea eax, [rdx + 1]
movzx eax, byte [rax + r8]
mov byte [rsp + 0x25], al
lea eax, [rdx + 2]
lea rdx, [rsp + 0x20]
movzx eax, byte [rax + r8]
mov byte [rsp + 0x26], al
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x21]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x22]
mov rdx, qword [rdi]
call fcn.1401c1ae4
cmp word [rbx + 0x136], 6
jne 0x1400d671f
movzx ecx, byte [rsp + 0x23]
mov rdx, qword [rdi]
call fcn.1401c1ae4
inc r14d
inc r15
cmp r14d, dword [rbx + 0x50]
jl 0x1400d66a0
xor r15d, r15d
lea r14d, [r15 + 1]
inc r12d
cmp r12d, dword [rbx + 0x54]
jl 0x1400d6671
jmp 0x1400d681b
cmp dword [rbx + 0x50], 0
mov r10d, r15d
mov r9, r15
jle 0x1400d67ec
nop dword [rax + rax]
mov rax, qword [rsp + 0x38]
mov r8, qword [rbp - 0x71]
movzx ecx, byte [r9 + rax]
lea edx, [rcx + rcx*2]
lea rcx, [rsp + 0x24]
movzx eax, byte [rdx + r8]
mov byte [rsp + 0x24], al
lea eax, [rdx + 1]
movzx eax, byte [rax + r8]
mov byte [rsp + 0x25], al
lea eax, [rdx + 2]
lea rdx, [rsp + 0x20]
movzx eax, byte [rax + r8]
mov byte [rsp + 0x26], al
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
movzx eax, byte [rsp + 0x21]
mov byte [r9 + rsi], cl
movsxd rcx, dword [rbx + 0x50]
add rcx, r9
inc r10d
mov byte [rcx + rsi], al
movsxd rax, dword [rbx + 0x50]
lea rcx, [r9 + rax*2]
movzx eax, byte [rsp + 0x22]
mov byte [rcx + rsi], al
movsxd rcx, dword [rbx + 0x50]
lea rax, [r9 + rcx*2]
inc r9
add rcx, rax
movzx eax, byte [rsp + 0x23]
mov byte [rcx + rsi], al
cmp r10d, dword [rbx + 0x50]
jl 0x1400d6760
cmp word [rbx + 0x136], 6
movsxd rdx, dword [rbx + 0x50]
mov r9, qword [rdi]
mov rcx, rsi
jne 0x1400d6866
mov r8d, 4
call fcn.1401c24f8
cmp rax, 3
je 0x1400d6736
mov r13d, 6
mov rcx, rbx
call fcn.14005dcb0
mov r12, qword [rsp + 0x140]
test rsi, rsi
je 0x1400d6838
mov rcx, rsi
call fcn.1401be23c
movzx eax, r13w
mov r13, qword [rsp + 0xf8]
mov r14, qword [rsp + 0xf0]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1401bd600
add rsp, 0x100
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r8d, 3
call fcn.1401c24f8
cmp rax, 3
jne 0x1400d6815
jmp 0x1400d6736
cmp dword [rbx + 0x54], r12d
jle 0x1400d681b
mov r8d, r14d
mov edx, r12d
mov rcx, rbx
call fcn.1400629c0
cmp word [rbx + 0x134], 0
jne 0x1400d6928
cmp dword [rbx + 0x50], 0
mov r14d, r15d
jle 0x1400d6910
nop word [rax + rax]
movsxd rcx, r15d
lea rdx, [rsp + 0x20]
add rcx, qword [rsp + 0x38]
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x21]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x22]
mov rdx, qword [rdi]
call fcn.1401c1ae4
cmp word [rbx + 0x136], 6
jne 0x1400d6900
movzx ecx, byte [rsp + 0x23]
mov rdx, qword [rdi]
call fcn.1401c1ae4
inc r14d
add r15d, 3
cmp r14d, dword [rbx + 0x50]
jl 0x1400d68b0
xor r15d, r15d
mov r14d, 1
inc r12d
cmp r12d, dword [rbx + 0x54]
jl 0x1400d6882
jmp 0x1400d681b
cmp dword [rbx + 0x50], 0
mov r11d, r15d
mov r9, r15
jle 0x1400d699d
mov r10d, r15d
nop word [rax + rax]
movsxd rcx, r10d
lea rdx, [rsp + 0x20]
add rcx, qword [rsp + 0x38]
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
movzx eax, byte [rsp + 0x21]
mov byte [r9 + rsi], cl
movsxd rcx, dword [rbx + 0x50]
inc r11d
add rcx, r9
add r10d, 3
mov byte [rcx + rsi], al
movsxd rax, dword [rbx + 0x50]
lea rcx, [r9 + rax*2]
movzx eax, byte [rsp + 0x22]
mov byte [rcx + rsi], al
movsxd rcx, dword [rbx + 0x50]
lea rax, [r9 + rcx*2]
inc r9
add rcx, rax
movzx eax, byte [rsp + 0x23]
mov byte [rcx + rsi], al
cmp r11d, dword [rbx + 0x50]
jl 0x1400d6940
cmp word [rbx + 0x136], 6
movsxd rdx, dword [rbx + 0x50]
mov r9, qword [rdi]
mov rcx, rsi
jne 0x1400d69cb
mov r8d, 4
call fcn.1401c24f8
cmp rax, 3
jne 0x1400d6815
jmp 0x1400d6916
mov r8d, 3
call fcn.1401c24f8
cmp rax, 3
jne 0x1400d6815
jmp 0x1400d6916
cmp dword [rbx + 0x54], r12d
jle 0x1400d681b
nop
mov r8d, r14d
mov edx, r12d
mov rcx, rbx
call fcn.1400629c0
cmp word [rbx + 0x134], 0
jne 0x1400d6aa8
cmp dword [rbx + 0x50], 0
mov r14d, r15d
jle 0x1400d6a8f
nop word [rax + rax]
mov rax, qword [rsp + 0x38]
lea rdx, [rsp + 0x20]
movzx ecx, byte [r15 + rax]
mov byte [rsp + 0x26], cl
mov byte [rsp + 0x25], cl
mov byte [rsp + 0x24], cl
lea rcx, [rsp + 0x24]
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x21]
mov rdx, qword [rdi]
call fcn.1401c1ae4
movzx ecx, byte [rsp + 0x22]
mov rdx, qword [rdi]
call fcn.1401c1ae4
cmp word [rbx + 0x136], 6
jne 0x1400d6a83
movzx ecx, byte [rsp + 0x23]
mov rdx, qword [rdi]
call fcn.1401c1ae4
inc r14d
inc r15
cmp r14d, dword [rbx + 0x50]
jl 0x1400d6a20
xor r15d, r15d
lea r14d, [r15 + 1]
inc r12d
cmp r12d, dword [rbx + 0x54]
jl 0x1400d69f0
jmp 0x1400d681b
cmp dword [rbx + 0x50], 0
mov r10d, r15d
mov r9, r15
jle 0x1400d6b2c
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rsp + 0x38]
lea rdx, [rsp + 0x20]
movzx ecx, byte [r9 + rax]
mov byte [rsp + 0x26], cl
mov byte [rsp + 0x25], cl
mov byte [rsp + 0x24], cl
lea rcx, [rsp + 0x24]
call fcn.1400d6430
movzx ecx, byte [rsp + 0x20]
movzx eax, byte [rsp + 0x21]
mov byte [r9 + rsi], cl
movsxd rcx, dword [rbx + 0x50]
inc r10d
add rcx, r9
mov byte [rcx + rsi], al
movsxd rax, dword [rbx + 0x50]
lea rcx, [r9 + rax*2]
movzx eax, byte [rsp + 0x22]
mov byte [rcx + rsi], al
movsxd rcx, dword [rbx + 0x50]
lea rax, [r9 + rcx*2]
inc r9
add rcx, rax
movzx eax, byte [rsp + 0x23]
mov byte [rcx + rsi], al
cmp r10d, dword [rbx + 0x50]
jl 0x1400d6ac0
cmp word [rbx + 0x136], 6
movsxd rdx, dword [rbx + 0x50]
mov r9, qword [rdi]
mov rcx, rsi
jne 0x1400d6b5a
mov r8d, 4
call fcn.1401c24f8
cmp rax, 3
jne 0x1400d6815
jmp 0x1400d6a96
mov r8d, 3
call fcn.1401c24f8
cmp rax, 3
jne 0x1400d6815
jmp 0x1400d6a96