Function at 0x180205730
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, [0x1805f3f58]
call fcn.1802647b0
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x4834], 0
jne 0x18020577a
lea rcx, str.cant_merge_dc_and_ac
call fcn.1802030f0
jmp 0x180205e12
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x483c], 0
jne 0x180205aaa
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 0x1802057da
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 0x180205e12
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 0x18020580a
mov rcx, qword [rsp + 0xb0]
call fcn.180204b00
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 0x18020592d
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 0x18020588a
lea rcx, [0x180498690]
call fcn.1802030f0
jmp 0x180205e12
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, [0x180498560]
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 0x180205a8d
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb0]
call fcn.180204c20
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
jge 0x18020595e
lea rcx, [0x1804986a8]
call fcn.1802030f0
jmp 0x180205e12
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 0x180205a26
cmp dword [rsp + 0x30], 0xf
jge 0x180205a19
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 0x1802059f6
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0xb0]
call fcn.180204ff0
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 0x180205aa5
mov eax, dword [rsp + 0x20]
add eax, 0x10
mov dword [rsp + 0x20], eax
jmp 0x180205a8d
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, [0x180498560]
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.180204ef0
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 0x1802057ec
jmp 0x180205e0d
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 0x180205bd3
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 0x180205b20
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 0x180205bce
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180498560]
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 0x180205bc9
mov rcx, qword [rsp + 0xb0]
call fcn.1802050c0
test eax, eax
je 0x180205bc9
mov rax, qword [rsp + 0x40]
movsx eax, word [rax]
movsx ecx, word [rsp + 0x3c]
and eax, ecx
test eax, eax
jne 0x180205bc9
mov rax, qword [rsp + 0x40]
movsx eax, word [rax]
test eax, eax
jle 0x180205bb0
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 0x180205bc9
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 0x180205b16
jmp 0x180205e0d
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.180204c20
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jge 0x180205c16
lea rcx, [0x1804986c0]
call fcn.1802030f0
jmp 0x180205e12
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 0x180205ccc
cmp dword [rsp + 0x48], 0xf
jge 0x180205cca
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 0x180205cc2
mov edx, dword [rsp + 0x48]
mov rcx, qword [rsp + 0xb0]
call fcn.180204ff0
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 0x180205d0b
cmp dword [rsp + 0x4c], 1
je 0x180205ce4
lea rcx, str.bad_huffman_code
call fcn.1802030f0
jmp 0x180205e12
mov rcx, qword [rsp + 0xb0]
call fcn.1802050c0
test eax, eax
je 0x180205d00
movsx eax, word [rsp + 0x3c]
mov dword [rsp + 0x4c], eax
jmp 0x180205d0b
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 0x180205df5
movsxd rax, dword [rsp + 0x20]
lea rcx, [0x180498560]
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 0x180205dd0
mov rcx, qword [rsp + 0xb0]
call fcn.1802050c0
test eax, eax
je 0x180205dce
mov rax, qword [rsp + 0x58]
movsx eax, word [rax]
movsx ecx, word [rsp + 0x3c]
and eax, ecx
test eax, eax
jne 0x180205dce
mov rax, qword [rsp + 0x58]
movsx eax, word [rax]
test eax, eax
jle 0x180205db5
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 0x180205dce
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 0x180205df0
cmp dword [rsp + 0x48], 0
jne 0x180205de6
mov rax, qword [rsp + 0x58]
movzx ecx, word [rsp + 0x4c]
mov word [rax], cx
jmp 0x180205df5
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
jmp 0x180205d0b
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x4838]
cmp dword [rsp + 0x20], eax
jle 0x180205be5
mov eax, 1
add rsp, 0xa0
pop rdi
ret