Function at 0x1400d6e00
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0x100
mov rax, qword [0x1402a83b0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rsi, rcx
movsx ecx, word [rdx + 0x136]
mov rbx, rdx
dec ecx
je 0x1400d6e62
dec ecx
je 0x1400d6e59
dec ecx
je 0x1400d6e50
dec ecx
je 0x1400d6e47
lea rdi, [0x14020e914]
jmp 0x1400d6e69
lea rdi, str.ARGB
jmp 0x1400d6e69
lea rdi, str.ABGR
jmp 0x1400d6e69
lea rdi, str.RGBA
jmp 0x1400d6e69
lea rdi, [0x14021b62c]
lea rcx, [rsp + 0x30]
call fcn.140061e90
lea rcx, [rbp - 0x69]
sub rcx, rdi
nop word [rax + rax]
movzx eax, byte [rdi]
inc rdi
mov byte [rcx + rdi - 1], al
test al, al
jne 0x1400d6e80
movzx ecx, word [rbx + 0x48]
xor r14d, r14d
mov qword [rsp + 0xf0], r15
lea eax, [rcx - 1]
lea r15d, [r14 + 1]
cmp ax, r15w
jbe 0x1400d6f7f
lea edx, [r14 + 8]
cmp cx, 4
jne 0x1400d6ef1
mov eax, dword [rbx + 0x50]
mov ecx, 0xfffd
mov dword [rsp + 0x40], 0x80001
mov dword [rbp - 0x7d], eax
movzx eax, word [rbx + 0x136]
dec ax
test cx, ax
mov eax, 0x100
jne 0x1400d6ee4
mov eax, 0x200
mov word [rbp - 0x79], ax
mov word [rbp - 0x77], dx
jmp 0x1400d6f92
movzx r8d, word [rbx + 0x136]
lea eax, [r8 - 2]
cmp word [rbx + 0x134], r14w
jne 0x1400d6f3a
mov word [rsp + 0x40], r15w
cmp ax, 2
jbe 0x1400d6f28
mov eax, 0x18
mov word [rsp + 0x42], ax
mov eax, dword [rbx + 0x50]
lea ecx, [rax + rax*2]
mov dword [rbp - 0x7d], ecx
jmp 0x1400d6f5a
mov eax, 0x20
mov word [rsp + 0x42], ax
mov eax, dword [rbx + 0x50]
shl eax, 2
jmp 0x1400d6f57
cmp ax, 2
mov eax, 3
ja 0x1400d6f4a
mov eax, 4
mov word [rsp + 0x40], ax
mov eax, dword [rbx + 0x50]
mov word [rsp + 0x42], dx
mov dword [rbp - 0x7d], eax
lea eax, [r8 - 1]
mov ecx, 0xfffd
test cx, ax
je 0x1400d6f79
cmp r8w, 4
jne 0x1400d6f8d
mov dword [rsp + 0x30], 0x10
jmp 0x1400d6f8d
mov dword [rsp + 0x30], edx
jmp 0x1400d6f8d
mov eax, dword [rbx + 0x50]
mov dword [rsp + 0x40], 0x80001
mov dword [rbp - 0x7d], eax
mov word [rbp - 0x79], r14w
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14005fe70
movzx edi, ax
mov dword [rsp + 0x20], edi
test ax, ax
jne 0x1400d73b3
movzx ecx, word [rbx + 0x48]
mov qword [rsp + 0x140], r12
mov qword [rsp + 0xf8], r13
lea eax, [rcx - 1]
cmp ax, 1
jbe 0x1400d7222
cmp cx, 4
jne 0x1400d71cd
mov r13d, r14d
cmp dword [rbx + 0x54], r14d
jle 0x1400d739b
nop word [rax + rax]
mov r8d, r15d
mov edx, r13d
mov rcx, rbx
call fcn.1400629c0
cmp word [rbx + 0x134], r14w
jne 0x1400d70a3
mov r12, r14
mov r15d, r14d
cmp dword [rbx + 0x50], r12d
jle 0x1400d71b1
nop dword [rax]
movzx eax, word [rbx + 0x136]
sub ax, 3
cmp ax, 1
ja 0x1400d703b
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [r12 + rax]
mov rax, qword [rbp - 0x71]
lea edi, [rcx + rcx*2]
movzx ecx, byte [rdi + rax]
call fcn.1401c1ae4
mov rax, qword [rbp - 0x71]
mov rdx, qword [rsi]
lea ecx, [rdi + 1]
movzx ecx, byte [rcx + rax]
call fcn.1401c1ae4
mov rax, qword [rbp - 0x71]
mov rdx, qword [rsi]
lea ecx, [rdi + 2]
movzx ecx, byte [rcx + rax]
call fcn.1401c1ae4
cmp word [rbx + 0x136], 2
jne 0x1400d7092
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc r15d
inc r12
cmp r15d, dword [rbx + 0x50]
jl 0x1400d7020
jmp 0x1400d71b1
movzx eax, word [rbx + 0x136]
sub ax, 3
cmp ax, 1
ja 0x1400d70d1
mov edi, r14d
cmp dword [rbx + 0x50], r14d
jle 0x1400d70d1
nop dword [rax]
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc edi
cmp edi, dword [rbx + 0x50]
jl 0x1400d70c0
mov edi, r14d
mov r15, r14
cmp dword [rbx + 0x50], r14d
jle 0x1400d7108
nop dword [rax]
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [r15 + rax]
mov rax, qword [rbp - 0x71]
lea ecx, [rcx + rcx*2]
movzx ecx, byte [rcx + rax]
call fcn.1401c1ae4
inc edi
lea r15, [r15 + 1]
cmp edi, dword [rbx + 0x50]
jl 0x1400d70e0
mov edi, r14d
mov r15, r14
cmp dword [rbx + 0x50], r14d
jle 0x1400d714b
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [r15 + rax]
mov rax, qword [rbp - 0x71]
lea ecx, [rcx + rcx*2]
lea ecx, [rcx + 1]
movzx ecx, byte [rcx + rax]
call fcn.1401c1ae4
inc edi
lea r15, [r15 + 1]
cmp edi, dword [rbx + 0x50]
jl 0x1400d7120
mov edi, r14d
mov r15, r14
cmp dword [rbx + 0x50], r14d
jle 0x1400d718b
nop word [rax + rax]
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [r15 + rax]
mov rax, qword [rbp - 0x71]
lea ecx, [rcx + rcx*2]
lea ecx, [rcx + 2]
movzx ecx, byte [rcx + rax]
call fcn.1401c1ae4
inc edi
lea r15, [r15 + 1]
cmp edi, dword [rbx + 0x50]
jl 0x1400d7160
cmp word [rbx + 0x136], 2
jne 0x1400d71b1
mov edi, r14d
cmp dword [rbx + 0x50], r14d
jle 0x1400d71b1
nop
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc edi
cmp edi, dword [rbx + 0x50]
jl 0x1400d71a0
inc r13d
mov r15d, 1
cmp r13d, dword [rbx + 0x54]
jl 0x1400d6ff0
mov edi, dword [rsp + 0x20]
jmp 0x1400d739b
cmp dword [rbx + 0x54], r14d
jle 0x1400d739b
nop word [rax + rax]
mov r8d, r15d
mov edx, r14d
mov rcx, rbx
call fcn.1400629c0
movsx r8, word [rsp + 0x40]
movsxd rdx, dword [rbp - 0x7d]
mov r9, qword [rsi]
mov rcx, qword [rsp + 0x38]
call fcn.1401c24f8
movsx rcx, word [rsp + 0x40]
cmp rax, rcx
jne 0x1400d7396
inc r14d
cmp r14d, dword [rbx + 0x54]
jl 0x1400d71e0
jmp 0x1400d739b
mov r12d, r14d
cmp dword [rbx + 0x54], r14d
jle 0x1400d739b
nop
mov r8d, r15d
mov edx, r12d
mov rcx, rbx
call fcn.1400629c0
cmp word [rbx + 0x134], r14w
jne 0x1400d72ea
mov rdi, r14
mov r15d, r14d
cmp dword [rbx + 0x50], edi
jle 0x1400d72ce
nop word [rax + rax]
movzx eax, word [rbx + 0x136]
sub ax, 3
cmp ax, 1
ja 0x1400d727b
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [rdi + rax]
call fcn.1401c1ae4
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [rdi + rax]
call fcn.1401c1ae4
mov rax, qword [rsp + 0x38]
mov rdx, qword [rsi]
movzx ecx, byte [rdi + rax]
call fcn.1401c1ae4
cmp word [rbx + 0x136], 2
jne 0x1400d72c2
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc r15d
inc rdi
cmp r15d, dword [rbx + 0x50]
jl 0x1400d7260
mov r15d, 1
inc r12d
cmp r12d, dword [rbx + 0x54]
jl 0x1400d7230
mov edi, dword [rsp + 0x20]
jmp 0x1400d739b
movzx eax, word [rbx + 0x136]
sub ax, 3
cmp ax, 1
ja 0x1400d7315
mov edi, r14d
cmp dword [rbx + 0x50], r14d
jle 0x1400d7315
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc edi
cmp edi, dword [rbx + 0x50]
jl 0x1400d7304
movsxd rdx, dword [rbp - 0x7d]
mov r9, qword [rsi]
mov rcx, qword [rsp + 0x38]
mov r8, r15
call fcn.1401c24f8
test rax, rax
je 0x1400d7396
movsxd rdx, dword [rbp - 0x7d]
mov r9, qword [rsi]
mov rcx, qword [rsp + 0x38]
mov r8, r15
call fcn.1401c24f8
test rax, rax
je 0x1400d7396
movsxd rdx, dword [rbp - 0x7d]
mov r9, qword [rsi]
mov rcx, qword [rsp + 0x38]
mov r8, r15
call fcn.1401c24f8
test rax, rax
je 0x1400d7396
cmp word [rbx + 0x136], 2
jne 0x1400d72d4
mov edi, r14d
cmp dword [rbx + 0x50], r14d
jle 0x1400d72d4
nop dword [rax + rax]
mov rdx, qword [rsi]
xor ecx, ecx
call fcn.1401c1ae4
inc edi
cmp edi, dword [rbx + 0x50]
jl 0x1400d7380
jmp 0x1400d72d4
mov edi, 6
mov rcx, rbx
call fcn.14005dcb0
mov r13, qword [rsp + 0xf8]
mov r12, qword [rsp + 0x140]
movzx eax, di
mov r15, qword [rsp + 0xf0]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1401bd600
add rsp, 0x100
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret