Function at 0x14018d1d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
mov eax, dword [rcx + 0x10]
mov rdi, qword [rsp + 0x100]
mov rbx, rcx
mov rsi, r8
mov rbp, rdx
mov r8, qword [rbx]
mov edx, dword [rcx + 0x18]
mov ecx, eax
mov dword [rsp + 0xf8], r9d
mov dword [rdi], 0
shr ecx, 3
mov dword [rdi + 4], 0
mov r9d, dword [r8 + rcx]
mov ecx, eax
and ecx, 7
bswap r9d
shl r9d, cl
cmp r9d, 0x7ffffff
ja 0x14018dad0
mov ecx, r9d
mov r8d, 0x1f
add eax, 0x20
or ecx, 1
bsr ecx, ecx
xor ecx, 0x1f
sub r8d, ecx
lea ecx, [r8 + r8 - 0x1f]
sub eax, ecx
cmp edx, eax
cmovbe eax, edx
cmp ecx, 6
mov dword [rbx + 0x10], eax
jle 0x14018dc95
shr r9d, cl
lea ecx, [r9 - 1]
cmp ecx, 7
mov dword [rdi + 8], ecx
ja 0x14018db02
mov r14d, dword [rbp + 0xc]
mov eax, 1
shl eax, cl
mov dword [rsp + 0x2c], eax
test r14d, r14d
jne 0x14018db3a
lea rax, [rdi + 0x18]
mov r8, rsi
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x88], rdi
mov dword [rsp + 0x3c], 0
mov qword [rsp + 0x30], rax
mov rax, qword [0x140441840]
mov qword [rsp + 0x40], rax
mov rax, qword [0x1404445d0]
mov qword [rsp + 0x48], rax
mov rax, qword [0x140441840]
mov qword [rsp + 0x60], rax
mov rax, qword [0x1404445d0]
mov qword [rsp + 0x68], rax
mov rax, qword [0x140441840]
mov qword [rsp + 0x70], rax
mov rax, qword [0x1404445d0]
mov qword [rsp + 0x78], rax
mov rax, qword [0x140441840]
mov qword [rsp + 0x50], rax
mov rax, qword [0x1404445d0]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x30]
mov dword [rax - 8], 0
mov dword [rax], 0
mov r13d, dword [r8]
test r13d, r13d
jle 0x14018dbb2
mov r9, qword [rsp + 0x80]
mov r10, qword [rbx]
xor r11d, r11d
mov eax, dword [rbx + 0x18]
mov rdx, qword [rsp + 0x88]
mov rsi, r9
jmp 0x14018d3c9
mov ecx, r13d
shr ecx, 3
movzx r12d, byte [r10 + rcx]
mov ecx, r13d
and ecx, 7
shl r12d, cl
cmp eax, r13d
mov ecx, r12d
lea r12d, [r13 + 1]
cmovg r13d, r12d
test cl, cl
mov dword [rbx + 0x10], r13d
js 0x14018d5b2
mov ecx, dword [rsp + 0x38]
mov dword [rdx + 0x324], 0
mov dword [rdx + 0x32c], 0
mov dword [rdx + 0x320], ecx
mov dword [rdx + 0x328], ecx
cmp dword [rsp + 0x108], 3
je 0x14018d878
add r11d, 1
add rdx, 0x20
add r9, 0x10
add rsi, 0x20
cmp dword [r8], r11d
jle 0x14018dbb2
mov r12d, dword [rbx + 0x10]
mov ecx, r12d
shr ecx, 3
movzx r13d, byte [r10 + rcx]
mov ecx, r12d
and ecx, 7
shl r13d, cl
mov ecx, r13d
xor r13d, r13d
cmp r12d, eax
setl r13b
add r12d, r13d
test cl, cl
mov r13d, r12d
mov dword [rbx + 0x10], r12d
js 0x14018d450
mov ecx, dword [rsp + 0x2c]
mov dword [r9 + 0x24], 0
mov dword [r9 + 0x20], ecx
mov r12d, dword [rbp + 0xc]
test r12d, r12d
jne 0x14018d350
cmp dword [rsp + 0x108], 3
jne 0x14018d3b0
mov ecx, dword [r9 + 0x20]
mov dword [rsi + 0x130], ecx
mov dword [rsi + 0x120], ecx
mov ecx, dword [r9 + 0x24]
mov dword [rsi + 0x134], ecx
mov dword [rsi + 0x124], ecx
jmp 0x14018d3b0
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
and ecx, 7
bswap r13d
shl r13d, cl
cmp r13d, 0x7ffffff
ja 0x14018d982
or r13d, 1
add r12d, 0x1f
bsr ecx, r13d
mov r13d, 0x1f
xor ecx, 0x1f
sub r13d, ecx
sub r12d, r13d
cmp r12d, eax
cmova r12d, eax
mov ecx, r12d
shr ecx, 3
mov r14d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r13d
and ecx, 7
add r12d, 0x20
bswap r14d
shl r14d, cl
mov ecx, r13d
shr r14d, cl
cmp eax, r12d
mov r13d, r14d
cmovbe r12d, eax
mov ecx, r14d
and r13d, 1
shr ecx, 1
mov dword [rbx + 0x10], r12d
mov r14d, r13d
neg r14d
xor ecx, r14d
add ecx, r13d
mov dword [r9 + 0x20], ecx
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
and ecx, 7
bswap r13d
shl r13d, cl
cmp r13d, 0x7ffffff
ja 0x14018d950
or r13d, 1
mov r14d, 0x1f
add r12d, 0x1f
bsr ecx, r13d
xor ecx, 0x1f
sub r14d, ecx
sub r12d, r14d
cmp r12d, eax
cmova r12d, eax
mov ecx, r12d
shr ecx, 3
mov r15d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r14d
and ecx, 7
lea r13d, [r12 + 0x20]
bswap r15d
shl r15d, cl
mov ecx, r14d
shr r15d, cl
cmp r13d, eax
mov r12d, r15d
cmova r13d, eax
shr r15d, 1
and r12d, 1
mov dword [rbx + 0x10], r13d
mov r14d, r12d
neg r14d
xor r15d, r14d
lea ecx, [r12 + r15]
mov r12d, dword [r9 + 0x20]
mov dword [r9 + 0x24], ecx
movsx r14d, r12b
cmp r12d, r14d
jne 0x14018da9b
movsx r14d, cl
cmp r14d, ecx
jne 0x14018da9b
cmp r12d, dword [rsp + 0x2c]
jne 0x14018d59b
test ecx, ecx
je 0x14018d40c
mov rcx, qword [rsp + 0x30]
mov dword [rdi], 1
mov dword [rcx - 8], 1
jmp 0x14018d40c
mov ecx, r13d
shr ecx, 3
mov r12d, dword [r10 + rcx]
mov ecx, r13d
and ecx, 7
bswap r12d
shl r12d, cl
cmp r12d, 0x7ffffff
ja 0x14018d9e0
or r12d, 1
mov r14d, 0x1f
add r13d, 0x1f
bsr ecx, r12d
xor ecx, 0x1f
sub r14d, ecx
sub r13d, r14d
cmp r13d, eax
mov r12d, r13d
cmova r12d, eax
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r14d
and ecx, 7
add r12d, 0x20
bswap r13d
shl r13d, cl
mov ecx, r14d
shr r13d, cl
cmp eax, r12d
cmovbe r12d, eax
mov ecx, r13d
and r13d, 1
mov r14d, r13d
shr ecx, 1
mov dword [rbx + 0x10], r12d
neg r14d
xor ecx, r14d
add ecx, r13d
mov dword [rdx + 0x320], ecx
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
and ecx, 7
bswap r13d
shl r13d, cl
cmp r13d, 0x7ffffff
ja 0x14018d9b0
or r13d, 1
add r12d, 0x1f
bsr ecx, r13d
mov r13d, 0x1f
xor ecx, 0x1f
sub r13d, ecx
sub r12d, r13d
cmp r12d, eax
cmova r12d, eax
mov ecx, r12d
shr ecx, 3
mov r14d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r13d
and ecx, 7
bswap r14d
shl r14d, cl
mov ecx, r13d
shr r14d, cl
lea ecx, [r12 + 0x20]
mov r12d, r14d
cmp eax, ecx
cmovbe ecx, eax
and r12d, 1
shr r14d, 1
mov r13d, r12d
mov dword [rbx + 0x10], ecx
neg r13d
xor r14d, r13d
lea ecx, [r12 + r14]
mov r12d, dword [rdx + 0x320]
mov dword [rdx + 0x324], ecx
movsx r13d, r12b
cmp r13d, r12d
jne 0x14018da70
movsx r12d, cl
cmp ecx, r12d
jne 0x14018da70
test ecx, ecx
jne 0x14018d930
cmp dword [rsp + 0x38], r13d
jne 0x14018d930
mov r12d, dword [rbx + 0x10]
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
and ecx, 7
bswap r13d
shl r13d, cl
cmp r13d, 0x7ffffff
ja 0x14018da40
or r13d, 1
add r12d, 0x1f
bsr ecx, r13d
mov r13d, 0x1f
xor ecx, 0x1f
sub r13d, ecx
sub r12d, r13d
cmp eax, r12d
cmovbe r12d, eax
mov ecx, r12d
shr ecx, 3
mov r14d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r13d
and ecx, 7
add r12d, 0x20
bswap r14d
shl r14d, cl
mov ecx, r13d
shr r14d, cl
cmp eax, r12d
mov r13d, r14d
cmovbe r12d, eax
mov ecx, r14d
and r13d, 1
shr ecx, 1
mov dword [rbx + 0x10], r12d
mov r14d, r13d
neg r14d
xor ecx, r14d
add ecx, r13d
mov dword [rdx + 0x328], ecx
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
and ecx, 7
bswap r13d
shl r13d, cl
cmp r13d, 0x7ffffff
ja 0x14018da13
or r13d, 1
mov r14d, 0x1f
add r12d, 0x1f
bsr ecx, r13d
xor ecx, 0x1f
sub r14d, ecx
sub r12d, r14d
cmp eax, r12d
cmovbe r12d, eax
mov ecx, r12d
shr ecx, 3
mov r13d, dword [r10 + rcx]
mov ecx, r12d
sub r12d, r14d
and ecx, 7
bswap r13d
shl r13d, cl
mov ecx, r14d
shr r13d, cl
lea ecx, [r12 + 0x20]
mov r12d, r13d
cmp eax, ecx
cmovbe ecx, eax
and r12d, 1
shr r13d, 1
mov r14d, r12d
mov dword [rbx + 0x10], ecx
neg r14d
xor r13d, r14d
lea ecx, [r12 + r13]
mov r12d, dword [rdx + 0x328]
mov dword [rdx + 0x32c], ecx
movsx r13d, r12b
cmp r12d, r13d
jne 0x14018dc10
movsx r13d, cl
cmp r13d, ecx
jne 0x14018dc10
cmp dword [rsp + 0x38], r12d
jne 0x14018d858
test ecx, ecx
je 0x14018d3a2
cmp dword [rsp + 0x108], 3
mov rcx, qword [rsp + 0x30]
mov dword [rdi + 4], 1
mov dword [rcx], 1
jne 0x14018d3b0
mov r12d, dword [r9 + 0x20]
lea r13d, [r11 + r11 + 0x10]
lea ecx, [r13 + 1]
movsxd r13, r13d
mov dword [rsi + 0x130], r12d
mov dword [rsi + 0x120], r12d
mov r12d, dword [r9 + 0x24]
movsxd rcx, ecx
mov dword [rsi + 0x134], r12d
mov dword [rsi + 0x124], r12d
movsxd r12, dword [rsp + 0x3c]
mov r15d, dword [rdx + 0x320]
lea rcx, [r12 + rcx*2]
lea r12, [r12 + r13*2]
lea r14, [rcx + 0x32]
lea r13, [r12 + 0x32]
shl rcx, 4
shl r12, 4
add rcx, rdi
shl r13, 4
shl r14, 4
add r12, rdi
mov dword [rdi + r14], r15d
mov dword [rdi + r13], r15d
mov r13d, dword [rdx + 0x324]
mov dword [rcx + 0x324], r13d
mov dword [r12 + 0x324], r13d
mov r13d, dword [rdx + 0x328]
mov dword [rcx + 0x328], r13d
mov dword [r12 + 0x328], r13d
mov r13d, dword [rdx + 0x32c]
mov dword [rcx + 0x32c], r13d
mov dword [r12 + 0x32c], r13d
jmp 0x14018d3b0
mov rcx, qword [rsp + 0x30]
mov dword [rdi + 4], 1
mov dword [rcx], 1
jmp 0x14018d705
mov r15, qword [0x140441840]
shr r13d, 0x17
mov ecx, r13d
movzx r13d, byte [r15 + rcx]
mov r15, qword [0x1404445d0]
movsx ecx, byte [r15 + rcx]
add r13d, r12d
cmp r13d, eax
cmova r13d, eax
mov dword [rbx + 0x10], r13d
jmp 0x14018d56a
mov r15, qword [rsp + 0x40]
shr r13d, 0x17
mov ecx, r13d
movzx r13d, byte [r15 + rcx]
mov r15, qword [rsp + 0x48]
movsx ecx, byte [r15 + rcx]
add r12d, r13d
cmp r12d, eax
cmova r12d, eax
mov dword [rbx + 0x10], r12d
jmp 0x14018d4db
mov rcx, qword [rsp + 0x50]
shr r13d, 0x17
movzx ecx, byte [rcx + r13]
add r12d, ecx
mov rcx, qword [rsp + 0x58]
cmp eax, r12d
cmovbe r12d, eax
mov dword [rbx + 0x10], r12d
movsx ecx, byte [rcx + r13]
jmp 0x14018d6cb
shr r12d, 0x17
mov ecx, r12d
mov r12, qword [0x140441840]
movzx r12d, byte [r12 + rcx]
add r12d, r13d
mov r13, qword [0x1404445d0]
cmp r12d, eax
cmova r12d, eax
mov dword [rbx + 0x10], r12d
movsx ecx, byte [r13 + rcx]
jmp 0x14018d63d
mov rcx, qword [rsp + 0x60]
shr r13d, 0x17
movzx ecx, byte [rcx + r13]
add r12d, ecx
mov rcx, qword [rsp + 0x68]
cmp eax, r12d
cmovbe r12d, eax
mov dword [rbx + 0x10], r12d
movsx ecx, byte [rcx + r13]
jmp 0x14018d822
mov rcx, qword [rsp + 0x70]
shr r13d, 0x17
movzx ecx, byte [rcx + r13]
add r12d, ecx
mov rcx, qword [rsp + 0x78]
cmp eax, r12d
cmovbe r12d, eax
mov dword [rbx + 0x10], r12d
movsx ecx, byte [rcx + r13]
jmp 0x14018d794
xor eax, eax
movsxd rdx, eax
movsxd rax, dword [rsp + 0x3c]
movsxd r11, r11d
mov esi, dword [rsp + 0x38]
lea rax, [rax + r11*2]
lea rax, [rdx + rax*2]
mov dword [rdi + rax*8 + 0x320], esi
mov dword [rdi + rax*8 + 0x324], 0
mov rcx, qword [rsp + 0x110]
lea rdx, str.Out_of_range_weight
call fcn.14036d010
mov eax, 0xbebbb1b7
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [0x140441840]
shr r9d, 0x17
movzx ecx, byte [rcx + r9]
add eax, ecx
cmp edx, eax
cmovbe eax, edx
mov dword [rbx + 0x10], eax
mov rax, qword [0x1404449c0]
movzx ecx, byte [rax + r9]
cmp ecx, 7
mov dword [rdi + 8], ecx
jbe 0x14018d276
mov r9d, ecx
mov rcx, qword [rsp + 0x110]
lea r8, str.luma_log2_weight_denom__d_is_out_of_range_n
mov edx, 0x10
call fcn.14036cf30
mov r14d, dword [rbp + 0xc]
mov dword [rdi + 8], 0
mov dword [rsp + 0x2c], 1
test r14d, r14d
je 0x14018d28e
mov edx, dword [rbx + 0x10]
mov rcx, qword [rbx]
mov r8d, dword [rbx + 0x18]
mov eax, edx
shr eax, 3
mov eax, dword [rcx + rax]
mov ecx, edx
and ecx, 7
bswap eax
shl eax, cl
cmp eax, 0x7ffffff
ja 0x14018dc1a
mov ecx, eax
mov r9d, 0x1f
add edx, 0x20
or ecx, 1
bsr ecx, ecx
xor ecx, 0x1f
sub r9d, ecx
lea ecx, [r9 + r9 - 0x1f]
sub edx, ecx
cmp r8d, edx
cmovbe edx, r8d
cmp ecx, 6
mov dword [rbx + 0x10], edx
jle 0x14018dc46
shr eax, cl
lea ecx, [rax - 1]
cmp ecx, 7
mov dword [rdi + 0xc], ecx
ja 0x14018dc65
mov eax, 1
shl eax, cl
mov dword [rsp + 0x38], eax
jmp 0x14018d28e
cmp dword [rsp + 0xf8], 3
jne 0x14018dbea
add dword [rsp + 0x3c], 1
add qword [rsp + 0x30], 4
add r8, 4
mov eax, dword [rsp + 0x3c]
add qword [rsp + 0x88], 0x10
add qword [rsp + 0x80], 8
cmp eax, 2
jne 0x14018d312
mov eax, 1
mov ecx, dword [rdi]
test ecx, ecx
jne 0x14018dbff
mov edx, dword [rdi + 4]
xor eax, eax
test edx, edx
setne al
mov dword [rdi], eax
xor eax, eax
jmp 0x14018dab4
mov eax, 1
jmp 0x14018da72
shr eax, 0x17
mov ecx, eax
mov rax, qword [0x140441840]
movzx eax, byte [rax + rcx]
add edx, eax
mov rax, qword [0x1404449c0]
cmp r8d, edx
cmovbe edx, r8d
mov dword [rbx + 0x10], edx
movzx ecx, byte [rax + rcx]
jmp 0x14018db96
lea r8, [0x14041bfa7]
xor ecx, ecx
mov edx, 0x10
call fcn.14036cf30
mov dword [rdi + 0xc], 0xbebbb1b7
mov ecx, 0xbebbb1b7
mov r9d, ecx
mov rcx, qword [rsp + 0x110]
lea r8, str.chroma_log2_weight_denom__d_is_out_of_range_n
mov edx, 0x10
call fcn.14036cf30
mov dword [rdi + 0xc], 0
mov dword [rsp + 0x38], 1
jmp 0x14018d28e
lea r8, [0x14041bfa7]
xor ecx, ecx
mov edx, 0x10
call fcn.14036cf30
mov dword [rdi + 8], 0xbebbb1b7
mov ecx, 0xbebbb1b7
jmp 0x14018db02