Function at 0x14002ef50
Capabilities:
Get number of processors

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rdi
sub rsp, 0x68
mov rdi, rcx
call fcn.1400239a0
mov rcx, rdi
mov ebx, eax
call fcn.1400239a0
shl ebx, 0x10
add eax, ebx
cmp eax, 0x38425053
je 0x14002efa8
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.not_PSD
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x68
pop rdi
pop rbx
ret
mov rcx, rdi
call fcn.1400239a0
cmp eax, 1
je 0x14002efda
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.wrong_version
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x68
pop rdi
pop rbx
ret
cmp qword [rdi + 0x10], 0
mov qword [rsp + 0x60], rsi
lea rsi, [rdi + 0xb8]
mov qword [rsp + 0x40], r15
je 0x14002f019
mov ecx, dword [rdi + 0xc0]
sub ecx, dword [rsi]
cmp ecx, 6
jge 0x14002f019
mov rax, qword [rdi + 0xc0]
mov edx, 6
sub edx, ecx
mov qword [rsi], rax
mov rcx, qword [rdi + 0x28]
call qword [rdi + 0x18]
jmp 0x14002f01d
add qword [rsi], 6
mov rcx, rdi
call fcn.1400239a0
mov dword [rsp + 0xa0], eax
mov r15d, eax
cmp eax, 0x10
ja 0x14002fb29
mov qword [rsp + 0x80], rbp
mov rcx, rdi
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x50], r13
call fcn.1400239a0
mov rcx, rdi
mov r13d, eax
call fcn.1400239a0
shl r13d, 0x10
mov rcx, rdi
add r13d, eax
mov dword [rsp + 0xb0], r13d
call fcn.1400239a0
mov rcx, rdi
mov r12d, eax
call fcn.1400239a0
shl r12d, 0x10
mov rcx, rdi
add r12d, eax
mov dword [rsp + 0x20], r12d
call fcn.1400239a0
movsxd rbp, eax
lea ecx, [rbp - 8]
test ecx, 0xfffffff7
je 0x14002f0c4
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.unsupported_bit_depth
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14002f2ca
mov rcx, rdi
call fcn.1400239a0
cmp eax, 3
je 0x14002f0f4
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.wrong_color_format
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14002f2ca
mov rcx, rdi
call fcn.1400239a0
mov rcx, rdi
mov ebx, eax
call fcn.1400239a0
mov ecx, eax
shl ebx, 0x10
add ecx, ebx
jns 0x14002f11b
mov rax, qword [rdi + 0xc0]
mov qword [rsi], rax
jmp 0x14002f14b
cmp qword [rdi + 0x10], 0
je 0x14002f145
mov edx, dword [rdi + 0xc0]
sub edx, dword [rsi]
cmp edx, ecx
jge 0x14002f145
mov rax, qword [rdi + 0xc0]
sub ecx, edx
mov edx, ecx
mov qword [rsi], rax
mov rcx, qword [rdi + 0x28]
call qword [rdi + 0x18]
jmp 0x14002f14b
movsxd rax, ecx
add qword [rsi], rax
mov rcx, rdi
call fcn.1400239a0
mov rcx, rdi
mov ebx, eax
call fcn.1400239a0
mov ecx, eax
shl ebx, 0x10
add ecx, ebx
jns 0x14002f172
mov rax, qword [rdi + 0xc0]
mov qword [rsi], rax
jmp 0x14002f1a2
cmp qword [rdi + 0x10], 0
je 0x14002f19c
mov edx, dword [rdi + 0xc0]
sub edx, dword [rsi]
cmp edx, ecx
jge 0x14002f19c
mov rax, qword [rdi + 0xc0]
sub ecx, edx
mov edx, ecx
mov qword [rsi], rax
mov rcx, qword [rdi + 0x28]
call qword [rdi + 0x18]
jmp 0x14002f1a2
movsxd rax, ecx
add qword [rsi], rax
mov rcx, rdi
call fcn.1400239a0
mov rcx, rdi
mov ebx, eax
call fcn.1400239a0
mov ecx, eax
shl ebx, 0x10
add ecx, ebx
jns 0x14002f1c9
mov rax, qword [rdi + 0xc0]
mov qword [rsi], rax
jmp 0x14002f1f9
cmp qword [rdi + 0x10], 0
je 0x14002f1f3
mov edx, dword [rdi + 0xc0]
sub edx, dword [rsi]
cmp edx, ecx
jge 0x14002f1f3
mov rax, qword [rdi + 0xc0]
sub ecx, edx
mov edx, ecx
mov qword [rsi], rax
mov rcx, qword [rdi + 0x28]
call qword [rdi + 0x18]
jmp 0x14002f1f9
movsxd rax, ecx
add qword [rsi], rax
mov rcx, rdi
call fcn.1400239a0
mov ebx, eax
cmp eax, 1
jle 0x14002f22b
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.bad_compression
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14002f2ca
test r12d, r12d
js 0x14002fb06
jne 0x14002f240
lea ecx, [r12*4]
jmp 0x14002f262
mov eax, 0x7fffffff
cdq
idiv r12d
cmp eax, 4
jl 0x14002fb06
lea ecx, [r12*4]
test ecx, ecx
js 0x14002fb06
test r13d, r13d
js 0x14002fb06
je 0x14002f27e
mov eax, 0x7fffffff
cdq
idiv r13d
cmp ecx, eax
jg 0x14002fb06
mov qword [rsp + 0x48], r14
mov r14d, r13d
imul r14d, r12d
lea eax, [r14*4]
movsxd rcx, eax
call fcn.1400a9790
mov qword [rsp + 0x38], rax
mov r12, rax
test rax, rax
jne 0x14002f2ed
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.outofmem
mov qword [rdx + rcx], rax
xor eax, eax
mov r14, qword [rsp + 0x48]
mov r13, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x60]
mov r15, qword [rsp + 0x40]
add rsp, 0x68
pop rdi
pop rbx
ret
test ebx, ebx
je 0x14002f3c3
mov ecx, r13d
imul ecx, r15d
add ecx, ecx
jns 0x14002f30c
mov rax, qword [rdi + 0xc0]
mov qword [rsi], rax
jmp 0x14002f33c
cmp qword [rdi + 0x10], 0
je 0x14002f336
mov edx, dword [rdi + 0xc0]
sub edx, dword [rsi]
cmp edx, ecx
jge 0x14002f336
mov rax, qword [rdi + 0xc0]
sub ecx, edx
mov edx, ecx
mov qword [rsi], rax
mov rcx, qword [rdi + 0x28]
call qword [rdi + 0x18]
jmp 0x14002f33c
movsxd rax, ecx
add qword [rsi], rax
xor r13d, r13d
mov eax, 0xff
mov ebx, r13d
nop word [rax + rax]
movsxd rdx, ebx
add rdx, r12
cmp ebx, r15d
jl 0x14002f37e
test r14d, r14d
jle 0x14002f392
cmp ebx, 3
mov ecx, r13d
cmove ecx, eax
mov eax, r14d
nop dword [rax]
mov byte [rdx], cl
lea rdx, [rdx + 4]
sub rax, 1
jne 0x14002f370
jmp 0x14002f38d
mov r8d, r14d
mov rcx, rdi
call fcn.14002eda0
test eax, eax
je 0x14002f39e
mov eax, 0xff
inc ebx
cmp ebx, 4
jl 0x14002f350
jmp 0x14002f4fe
mov rcx, r12
call fcn.1400a9798
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.corrupt
jmp 0x14002f2bf
xor r13d, r13d
mov qword [rsp + 0x30], rax
mov rdx, rbp
mov r8, rax
mov eax, dword [rsp + 0xa0]
mov r15d, r13d
mov qword [rsp + 0x28], rdx
mov ecx, 0xff
cmp r15d, eax
jl 0x14002f414
cmp r15d, 3
mov edx, r13d
mov rax, r12
cmove edx, ecx
test r14d, r14d
jle 0x14002f4cc
mov ecx, r14d
mov byte [rax], dl
lea rax, [rax + 4]
sub rcx, 1
jne 0x14002f403
jmp 0x14002f4c7
mov r9, qword [rsp + 0xa8]
cmp dword [r9], 0x10
jne 0x14002f448
mov rbx, r8
test r14d, r14d
jle 0x14002f4d8
mov ebp, r14d
mov rcx, rdi
call fcn.1400239a0
mov word [rbx], ax
lea rbx, [rbx + 8]
sub rbp, 1
jne 0x14002f431
jmp 0x14002f4c2
mov rbx, r12
cmp rdx, 0x10
jne 0x14002f479
test r14d, r14d
jle 0x14002f4d8
mov ebp, r14d
nop dword [rax]
mov rcx, rdi
call fcn.1400239a0
sar eax, 8
mov byte [rbx], al
lea rbx, [rbx + 4]
sub rbp, 1
jne 0x14002f460
jmp 0x14002f4c2
test r14d, r14d
jle 0x14002f4d8
mov ebp, r14d
mov rax, qword [rsi]
cmp rax, qword [rdi + 0xc0]
jae 0x14002f498
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14002f4b6
cmp dword [rdi + 0x30], r13d
je 0x14002f4b4
mov rcx, rdi
call fcn.140023860
mov rax, qword [rsi]
movzx ecx, byte [rax]
inc rax
mov qword [rsi], rax
jmp 0x14002f4b6
xor cl, cl
mov byte [rbx], cl
add rbx, 4
sub rbp, 1
jne 0x14002f481
mov r8, qword [rsp + 0x30]
mov ecx, 0xff
mov eax, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0x28]
add r8, 2
inc r15d
inc r12
mov qword [rsp + 0x30], r8
cmp r15d, 4
jl 0x14002f3e5
mov r15d, dword [rsp + 0xa0]
mov r12, qword [rsp + 0x38]
cmp r15d, 4
jl 0x14002facc
mov rax, qword [rsp + 0xa8]
movsxd rdx, r14d
cmp dword [rax], 0x10
jne 0x14002f80a
movss xmm3, dword [0x140129424]
mov r10d, 0xfffd
movss xmm4, dword [0x1401293c8]
cmp rdx, 4
jl 0x14002f764
lea r8, [rdx - 4]
shr r8, 2
lea rcx, [r12 + 0xa]
inc r8
lea r13, [r8*4]
nop dword [rax]
nop dword [rax + rax]
movzx r9d, word [rcx - 4]
lea eax, [r9 - 1]
cmp ax, r10w
ja 0x14002f5de
movzx eax, word [rcx - 0xa]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm4
movaps xmm1, xmm4
divss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx - 0xa], ax
movzx eax, word [rcx - 8]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx - 8], ax
movzx eax, word [rcx - 6]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov word [rcx - 6], ax
movzx r9d, word [rcx + 4]
lea eax, [r9 - 1]
cmp ax, r10w
ja 0x14002f65a
movzx eax, word [rcx - 2]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm4
movaps xmm1, xmm4
divss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx - 2], ax
movzx eax, word [rcx]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx], ax
movzx eax, word [rcx + 2]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov word [rcx + 2], ax
movzx r9d, word [rcx + 0xc]
lea eax, [r9 - 1]
cmp ax, r10w
ja 0x14002f6d8
movzx eax, word [rcx + 6]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm4
movaps xmm1, xmm4
divss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx + 6], ax
movzx eax, word [rcx + 8]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx + 8], ax
movzx eax, word [rcx + 0xa]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov word [rcx + 0xa], ax
movzx r9d, word [rcx + 0x14]
lea eax, [r9 - 1]
cmp ax, r10w
ja 0x14002f756
movzx eax, word [rcx + 0xe]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm4
movaps xmm1, xmm4
divss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx + 0xe], ax
movzx eax, word [rcx + 0x10]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx + 0x10], ax
movzx eax, word [rcx + 0x12]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov word [rcx + 0x12], ax
add rcx, 0x20
sub r8, 1
jne 0x14002f560
cmp r13, rdx
jge 0x14002facc
lea rcx, [r13*8 + 2]
add rcx, r12
sub rdx, r13
movzx r8d, word [rcx + 4]
lea eax, [r8 - 1]
cmp ax, r10w
ja 0x14002f7f7
movzx eax, word [rcx - 2]
xorps xmm0, xmm0
cvtsi2ss xmm0, r8d
movaps xmm2, xmm4
movaps xmm1, xmm4
divss xmm0, xmm3
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx - 2], ax
movzx eax, word [rcx]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov word [rcx], ax
movzx eax, word [rcx + 2]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov word [rcx + 2], ax
add rcx, 8
sub rdx, 1
jne 0x14002f77b
jmp 0x14002facc
movss xmm3, dword [0x1401293c8]
movss xmm4, dword [0x140129414]
cmp rdx, 4
jl 0x14002fa30
lea r8, [rdx - 4]
shr r8, 2
lea rcx, [r12 + 5]
inc r8
lea r13, [r8*4]
nop dword [rax]
movzx r9d, byte [rcx - 2]
lea eax, [r9 - 1]
cmp al, 0xfd
ja 0x14002f8b9
movzx eax, byte [rcx - 5]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm3
movaps xmm1, xmm3
divss xmm0, xmm4
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm4
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx - 5], al
movzx eax, byte [rcx - 4]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx - 4], al
movzx eax, byte [rcx - 3]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [rcx - 3], al
movzx r9d, byte [rcx + 2]
lea eax, [r9 - 1]
cmp al, 0xfd
ja 0x14002f930
movzx eax, byte [rcx - 1]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm3
movaps xmm1, xmm3
divss xmm0, xmm4
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm4
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx - 1], al
movzx eax, byte [rcx]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx], al
movzx eax, byte [rcx + 1]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [rcx + 1], al
movzx r9d, byte [rcx + 6]
lea eax, [r9 - 1]
cmp al, 0xfd
ja 0x14002f9a9
movzx eax, byte [rcx + 3]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm3
movaps xmm1, xmm3
divss xmm0, xmm4
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm4
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx + 3], al
movzx eax, byte [rcx + 4]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx + 4], al
movzx eax, byte [rcx + 5]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [rcx + 5], al
movzx r9d, byte [rcx + 0xa]
lea eax, [r9 - 1]
cmp al, 0xfd
ja 0x14002fa22
movzx eax, byte [rcx + 7]
xorps xmm0, xmm0
cvtsi2ss xmm0, r9d
movaps xmm2, xmm3
movaps xmm1, xmm3
divss xmm0, xmm4
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm4
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx + 7], al
movzx eax, byte [rcx + 8]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx + 8], al
movzx eax, byte [rcx + 9]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [rcx + 9], al
add rcx, 0x10
sub r8, 1
jne 0x14002f840
cmp r13, rdx
jge 0x14002facc
lea rcx, [r13*4 + 1]
add rcx, r12
sub rdx, r13
movzx r8d, byte [rcx + 2]
lea eax, [r8 - 1]
cmp al, 0xfd
ja 0x14002fabe
movzx eax, byte [rcx - 1]
xorps xmm0, xmm0
cvtsi2ss xmm0, r8d
movaps xmm2, xmm3
movaps xmm1, xmm3
divss xmm0, xmm4
divss xmm2, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
subss xmm1, xmm2
mulss xmm0, xmm2
mulss xmm1, xmm4
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx - 1], al
movzx eax, byte [rcx]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
xorps xmm0, xmm0
mov byte [rcx], al
movzx eax, byte [rcx + 1]
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
addss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [rcx + 1], al
add rcx, 4
sub rdx, 1
jne 0x14002fa47
mov rax, qword [rsp + 0x98]
test rax, rax
je 0x14002fadf
mov dword [rax], 4
mov eax, dword [rsp + 0xb0]
mov rcx, qword [rsp + 0x90]
mov dword [rcx], eax
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x88]
mov dword [rcx], eax
mov rax, r12
jmp 0x14002f2c5
mov rax, qword gs:[0x58]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.too_large
mov qword [rdx + rcx], rax
xor eax, eax
jmp 0x14002f2ca
mov rax, qword gs:[0x58]
mov rsi, qword [rsp + 0x60]
mov r15, qword [rsp + 0x40]
mov edx, 0x18
mov rcx, qword [rax]
lea rax, str.wrong_channel_count
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x68
pop rdi
pop rbx
ret