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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0xa0
lea rcx, [0x1804b7d08]
call fcn.1801a9330
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x4834], 0
jne 0x18014923a
lea rcx, str.cant_merge_dc_and_ac
call fcn.180146bb0
jmp 0x1801498d2
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x483c], 0
jne 0x18014956a
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4840]
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x4844], 0
je 0x18014929a
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4844]
dec eax
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
mov eax, 1
jmp 0x1801498d2
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4834]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x4824], 0x10
jge 0x1801492ca
mov rcx, qword [rsp + 0xb0]
call fcn.1801485c0
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4820]
shr eax, 0x17
and eax, 0x1ff
mov dword [rsp + 0x2c], eax
movsxd rax, dword [rsp + 0x2c]
mov rcx, qword [rsp + 0xc8]
movsx eax, word [rcx + rax*2]
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x1801493ed
mov eax, dword [rsp + 0x30]
sar eax, 4
and eax, 0xf
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x30]
and eax, 0xf
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4824]
cmp dword [rsp + 0x34], eax
jle 0x18014934a
lea rcx, [0x180393108]
call fcn.180146bb0
jmp 0x1801498d2
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0xb0]
mov qword [rsp + 0x60], rcx
movzx ecx, al
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x4820]
shl eax, cl
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4820], eax
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x34]
mov eax, dword [rax + 0x4824]
sub eax, ecx
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4824], eax
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180392e70]
movzx eax, byte [rcx + rax]
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
sar eax, 8
mov ecx, dword [rsp + 0x24]
mov edx, 1
shl edx, cl
mov ecx, edx
imul eax, ecx
mov ecx, dword [rsp + 0x28]
mov rdx, qword [rsp + 0xb8]
mov word [rdx + rcx*2], ax
jmp 0x18014954d
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb0]
call fcn.1801486e0
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
jge 0x18014941e
lea rcx, [0x180393128]
call fcn.180146bb0
jmp 0x1801498d2
mov eax, dword [rsp + 0x38]
and eax, 0xf
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x38]
sar eax, 4
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x34], 0
jne 0x1801494e6
cmp dword [rsp + 0x30], 0xf
jge 0x1801494d9
mov eax, dword [rsp + 0x30]
mov ecx, 1
mov dword [rsp + 0x6c], ecx
movzx ecx, al
mov eax, dword [rsp + 0x6c]
shl eax, cl
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
cmp dword [rsp + 0x30], 0
je 0x1801494b6
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0xb0]
call fcn.180148ab0
mov dword [rsp + 0x70], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4844]
mov dword [rsp + 0x74], eax
mov eax, dword [rsp + 0x70]
mov ecx, dword [rsp + 0x74]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4844]
dec eax
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
jmp 0x180149565
mov eax, dword [rsp + 0x20]
add eax, 0x10
mov dword [rsp + 0x20], eax
jmp 0x18014954d
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x20]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x20], eax
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180392e70]
movzx eax, byte [rcx + rax]
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x28], eax
mov edx, dword [rsp + 0x34]
mov rcx, qword [rsp + 0xb0]
call fcn.1801489b0
mov ecx, dword [rsp + 0x24]
mov edx, 1
shl edx, cl
mov ecx, edx
imul eax, ecx
mov ecx, dword [rsp + 0x28]
mov rdx, qword [rsp + 0xb8]
mov word [rdx + rcx*2], ax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4838]
cmp dword [rsp + 0x20], eax
jle 0x1801492ac
jmp 0x1801498cd
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4840]
mov ecx, 1
mov dword [rsp + 0x7c], ecx
movzx ecx, al
mov eax, dword [rsp + 0x7c]
shl eax, cl
mov word [rsp + 0x3c], ax
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x4844], 0
je 0x180149693
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4844]
dec eax
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4834]
mov dword [rsp + 0x20], eax
jmp 0x1801495e0
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4838]
cmp dword [rsp + 0x20], eax
jg 0x18014968e
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180392e70]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0xb8]
lea rax, [rcx + rax*2]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
movsx eax, word [rax]
test eax, eax
je 0x180149689
mov rcx, qword [rsp + 0xb0]
call fcn.180148b80
test eax, eax
je 0x180149689
mov rax, qword [rsp + 0x40]
movsx eax, word [rax]
movsx ecx, word [rsp + 0x3c]
and eax, ecx
test eax, eax
jne 0x180149689
mov rax, qword [rsp + 0x40]
movsx eax, word [rax]
test eax, eax
jle 0x180149670
movsx eax, word [rsp + 0x3c]
mov rcx, qword [rsp + 0x40]
movsx ecx, word [rcx]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x40]
mov word [rcx], ax
jmp 0x180149689
movsx eax, word [rsp + 0x3c]
mov rcx, qword [rsp + 0x40]
movsx ecx, word [rcx]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x40]
mov word [rcx], ax
jmp 0x1801495d6
jmp 0x1801498cd
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4834]
mov dword [rsp + 0x20], eax
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb0]
call fcn.1801486e0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x1801496d6
lea rcx, [0x180393148]
call fcn.180146bb0
jmp 0x1801498d2
mov eax, dword [rsp + 0x50]
and eax, 0xf
mov dword [rsp + 0x4c], eax
mov eax, dword [rsp + 0x50]
sar eax, 4
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x4c], 0
jne 0x18014978c
cmp dword [rsp + 0x48], 0xf
jge 0x18014978a
mov eax, dword [rsp + 0x48]
mov ecx, 1
mov dword [rsp + 0x80], ecx
movzx ecx, al
mov eax, dword [rsp + 0x80]
shl eax, cl
dec eax
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
cmp dword [rsp + 0x48], 0
je 0x180149782
mov edx, dword [rsp + 0x48]
mov rcx, qword [rsp + 0xb0]
call fcn.180148ab0
mov dword [rsp + 0x84], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4844]
mov dword [rsp + 0x88], eax
mov eax, dword [rsp + 0x84]
mov ecx, dword [rsp + 0x88]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0xb0]
mov dword [rcx + 0x4844], eax
mov dword [rsp + 0x48], 0x40
jmp 0x1801497cb
cmp dword [rsp + 0x4c], 1
je 0x1801497a4
lea rcx, str.bad_huffman_code
call fcn.180146bb0
jmp 0x1801498d2
mov rcx, qword [rsp + 0xb0]
call fcn.180148b80
test eax, eax
je 0x1801497c0
movsx eax, word [rsp + 0x3c]
mov dword [rsp + 0x4c], eax
jmp 0x1801497cb
movsx eax, word [rsp + 0x3c]
neg eax
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4838]
cmp dword [rsp + 0x20], eax
jg 0x1801498b5
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180392e70]
movzx eax, byte [rcx + rax]
mov rcx, qword [rsp + 0xb8]
lea rax, [rcx + rax*2]
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
movsx eax, word [rax]
test eax, eax
je 0x180149890
mov rcx, qword [rsp + 0xb0]
call fcn.180148b80
test eax, eax
je 0x18014988e
mov rax, qword [rsp + 0x58]
movsx eax, word [rax]
movsx ecx, word [rsp + 0x3c]
and eax, ecx
test eax, eax
jne 0x18014988e
mov rax, qword [rsp + 0x58]
movsx eax, word [rax]
test eax, eax
jle 0x180149875
movsx eax, word [rsp + 0x3c]
mov rcx, qword [rsp + 0x58]
movsx ecx, word [rcx]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
jmp 0x18014988e
movsx eax, word [rsp + 0x3c]
mov rcx, qword [rsp + 0x58]
movsx ecx, word [rcx]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
jmp 0x1801498b0
cmp dword [rsp + 0x48], 0
jne 0x1801498a6
mov rax, qword [rsp + 0x58]
movzx ecx, word [rsp + 0x4c]
mov word [rax], cx
jmp 0x1801498b5
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
jmp 0x1801497cb
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4838]
cmp dword [rsp + 0x20], eax
jle 0x1801496a5
mov eax, 1
add rsp, 0xa0
pop rdi
ret