Function at 0x683ae820
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, 0xb8
xor eax, eax
mov qword [rsp + 0x60], 0
lea rdi, [rcx + 8]
mov r9, rcx
mov qword [rsp + 0x68], 0
and rdi, 0xfffffffffffffff8
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov dword [rsp + 0xa0], 0
mov qword [rcx], 0
mov qword [rcx + 0x3f8], 0
sub rcx, rdi
add ecx, 0x400
shr ecx, 3
rep stosq qword [rdi], rax
test r8d, r8d
jle 0x683ae9c4
lea r11, [rdx + 1]
lea r10d, [r8 - 1]
mov rbp, rdx
add r10, r11
mov rbx, r10
sub rbx, rdx
and ebx, 7
je 0x683ae969
cmp rbx, 1
je 0x683ae957
cmp rbx, 2
je 0x683ae94a
cmp rbx, 3
je 0x683ae93b
cmp rbx, 4
je 0x683ae92c
cmp rbx, 5
je 0x683ae91d
cmp rbx, 6
jne 0x683aefa8
movzx r12d, byte [rbp]
add rbp, 1
add dword [rsp + r12*4 + 0x60], 1
movzx r13d, byte [rbp]
add rbp, 1
add dword [rsp + r13*4 + 0x60], 1
movzx r14d, byte [rbp]
add rbp, 1
add dword [rsp + r14*4 + 0x60], 1
movzx r15d, byte [rbp]
add rbp, 1
add dword [rsp + r15*4 + 0x60], 1
movzx ecx, byte [rbp]
add rbp, 1
add dword [rsp + rcx*4 + 0x60], 1
movzx eax, byte [rbp]
add rbp, 1
add dword [rsp + rax*4 + 0x60], 1
cmp r10, rbp
je 0x683ae9c4
movzx edi, byte [rbp]
movzx r11d, byte [rbp + 1]
add rbp, 8
movzx ebx, byte [rbp - 6]
movzx esi, byte [rbp - 5]
movzx r12d, byte [rbp - 4]
movzx r13d, byte [rbp - 3]
movzx r14d, byte [rbp - 2]
movzx r15d, byte [rbp - 1]
add dword [rsp + rdi*4 + 0x60], 1
add dword [rsp + r11*4 + 0x60], 1
add dword [rsp + rbx*4 + 0x60], 1
add dword [rsp + rsi*4 + 0x60], 1
add dword [rsp + r12*4 + 0x60], 1
add dword [rsp + r13*4 + 0x60], 1
add dword [rsp + r14*4 + 0x60], 1
add dword [rsp + r15*4 + 0x60], 1
cmp r10, rbp
jne 0x683ae969
mov r10d, dword [rsp + 0x64]
mov dword [rsp + 0x60], 0
cmp r10d, 2
jg 0x683aef50
mov ecx, dword [rsp + 0x68]
cmp ecx, 4
jg 0x683aef50
mov r11d, dword [rsp + 0x6c]
cmp r11d, 8
jg 0x683aef50
mov ebx, dword [rsp + 0x70]
cmp ebx, 0x10
jg 0x683aef50
mov esi, dword [rsp + 0x74]
cmp esi, 0x20
jg 0x683aef50
mov edi, dword [rsp + 0x78]
cmp edi, 0x40
jg 0x683aef50
mov ebp, dword [rsp + 0x7c]
cmp ebp, 0x80
jg 0x683aef50
mov r12d, dword [rsp + 0x80]
cmp r12d, 0x100
jg 0x683aef50
mov r13d, dword [rsp + 0x84]
cmp r13d, 0x200
jg 0x683aef50
mov r14d, dword [rsp + 0x88]
cmp r14d, 0x400
jg 0x683aef50
mov eax, dword [rsp + 0x8c]
mov dword [rsp + 0xc], eax
cmp eax, 0x800
jg 0x683aef50
mov r15d, dword [rsp + 0x90]
mov dword [rsp + 0x10], r15d
cmp r15d, 0x1000
jg 0x683aef50
mov eax, dword [rsp + 0x94]
mov dword [rsp + 0x14], eax
cmp eax, 0x2000
jg 0x683aef50
mov r15d, dword [rsp + 0x98]
mov dword [rsp + 0x18], r15d
cmp r15d, 0x4000
jg 0x683aef50
mov eax, dword [rsp + 0x9c]
mov dword [rsp + 0x1c], eax
cmp eax, 0x8000
jg 0x683aef50
xor r15d, r15d
xor eax, eax
mov dword [rsp + 0x24], 0
mov word [r9 + 0x402], r15w
mov r15d, r10d
mov word [r9 + 0x466], ax
shl r15d, 0xf
lea eax, [r10 + r10]
mov dword [rsp + 0x28], eax
mov word [r9 + 0x404], ax
add eax, ecx
mov dword [r9 + 0x424], r15d
mov word [r9 + 0x468], r10w
test ecx, ecx
je 0x683aeb35
cmp eax, 4
jg 0x683aef90
mov r15d, eax
add ecx, r10d
add eax, eax
shl r15d, 0xe
mov dword [rsp + 0x2c], eax
mov word [r9 + 0x406], ax
add eax, r11d
mov dword [r9 + 0x428], r15d
mov word [r9 + 0x46a], cx
test r11d, r11d
je 0x683aeb6d
cmp eax, 8
jg 0x683aef90
mov r10d, eax
add ecx, r11d
add eax, eax
shl r10d, 0xd
mov dword [rsp + 0x30], eax
mov word [r9 + 0x408], ax
add eax, ebx
mov dword [r9 + 0x42c], r10d
mov word [r9 + 0x46c], cx
test ebx, ebx
je 0x683aeba3
cmp eax, 0x10
jg 0x683aef90
mov r11d, eax
add ecx, ebx
add eax, eax
shl r11d, 0xc
mov dword [rsp + 0x34], eax
mov word [r9 + 0x40a], ax
add eax, esi
mov dword [r9 + 0x430], r11d
mov word [r9 + 0x46e], cx
test esi, esi
je 0x683aebd8
cmp eax, 0x20
jg 0x683aef90
mov ebx, eax
add ecx, esi
add eax, eax
shl ebx, 0xb
mov dword [rsp + 0x38], eax
mov word [r9 + 0x40c], ax
add eax, edi
mov dword [r9 + 0x434], ebx
mov word [r9 + 0x470], cx
test edi, edi
je 0x683aec0b
cmp eax, 0x40
jg 0x683aef90
mov esi, eax
add ecx, edi
add eax, eax
shl esi, 0xa
mov dword [rsp + 0x3c], eax
mov word [r9 + 0x40e], ax
add eax, ebp
mov dword [r9 + 0x438], esi
mov word [r9 + 0x472], cx
test ebp, ebp
je 0x683aec40
cmp eax, 0x80
jg 0x683aef90
mov edi, eax
add ecx, ebp
add eax, eax
shl edi, 9
mov dword [rsp + 0x40], eax
mov word [r9 + 0x410], ax
add eax, r12d
mov dword [r9 + 0x43c], edi
mov word [r9 + 0x474], cx
test r12d, r12d
je 0x683aec77
cmp eax, 0x100
jg 0x683aef90
mov ebp, eax
add ecx, r12d
add eax, eax
shl ebp, 8
mov dword [rsp + 0x44], eax
mov word [r9 + 0x412], ax
add eax, r13d
mov dword [r9 + 0x440], ebp
mov word [r9 + 0x476], cx
test r13d, r13d
je 0x683aecaf
cmp eax, 0x200
jg 0x683aef90
mov r12d, eax
add ecx, r13d
add eax, eax
shl r12d, 7
mov dword [rsp + 0x48], eax
mov word [r9 + 0x414], ax
add eax, r14d
mov dword [r9 + 0x444], r12d
mov word [r9 + 0x478], cx
test r14d, r14d
je 0x683aece9
cmp eax, 0x400
jg 0x683aef90
mov r13d, eax
add ecx, r14d
mov r14d, dword [rsp + 0xc]
add eax, eax
shl r13d, 6
mov dword [rsp + 0x4c], eax
mov word [r9 + 0x416], ax
add eax, r14d
mov dword [r9 + 0x448], r13d
mov word [r9 + 0x47a], cx
test r14d, r14d
je 0x683aed28
cmp eax, 0x800
jg 0x683aef90
mov r15d, eax
mov r10d, dword [rsp + 0x10]
add eax, eax
add ecx, dword [rsp + 0xc]
shl r15d, 5
mov dword [rsp + 0x50], eax
mov word [r9 + 0x418], ax
add eax, r10d
mov dword [r9 + 0x44c], r15d
mov word [r9 + 0x47c], cx
test r10d, r10d
je 0x683aed68
cmp eax, 0x1000
jg 0x683aef90
mov r11d, eax
mov ebx, dword [rsp + 0x14]
add eax, eax
add ecx, dword [rsp + 0x10]
shl r11d, 4
mov dword [rsp + 0x54], eax
mov word [r9 + 0x41a], ax
add eax, ebx
mov dword [r9 + 0x450], r11d
mov word [r9 + 0x47e], cx
test ebx, ebx
je 0x683aeda5
cmp eax, 0x2000
jg 0x683aef90
mov edi, dword [rsp + 0x18]
lea esi, [rax*8]
add ecx, dword [rsp + 0x14]
add eax, eax
mov dword [rsp + 0x58], eax
mov word [r9 + 0x41c], ax
add eax, edi
mov dword [r9 + 0x454], esi
mov word [r9 + 0x480], cx
test edi, edi
je 0x683aede2
cmp eax, 0x4000
jg 0x683aef90
add ecx, dword [rsp + 0x18]
lea ebp, [rax*4]
add eax, eax
mov word [r9 + 0x482], cx
mov ecx, dword [rsp + 0x1c]
mov dword [rsp + 0x5c], eax
mov word [r9 + 0x41e], ax
add eax, ecx
mov dword [r9 + 0x458], ebp
test ecx, ecx
jne 0x683aef80
mov dword [r9 + 0x460], 0x10000
add eax, eax
mov dword [r9 + 0x45c], eax
test r8d, r8d
jle 0x683aef78
lea esi, [r8 - 1]
mov ebp, 1
xor r8d, r8d
mov edi, 0x10
jmp 0x683aee69
add r10d, 1
mov dword [rsp + r11*4 + 0x20], r10d
lea r13, [r8 + 1]
cmp r8, rsi
je 0x683aef78
mov r8, r13
movzx r13d, byte [rdx + r8]
mov ecx, r13d
test r13d, r13d
je 0x683aee59
movzx eax, r13b
movsxd r11, r13d
lea r12, [r9 + rax*2]
mov r10d, dword [rsp + r11*4 + 0x20]
movzx r14d, word [r12 + 0x400]
movzx r15d, word [r12 + 0x464]
mov eax, r10d
sub eax, r14d
add eax, r15d
cdqe
mov byte [r9 + rax + 0x484], r13b
mov word [r9 + rax*2 + 0x5a4], r8w
cmp r13d, 9
jg 0x683aee50
mov r14d, r10d
lea ebx, [r10 + r10]
mov r12d, r13d
sar r14d, 1
and ebx, 0xaaaa
shl r12d, 9
and r14d, 0x5555
or r12d, r8d
or r14d, ebx
mov ebx, ebp
mov r15d, r14d
shl r14d, 2
sar r15d, 2
and r14d, 0xcccc
shl ebx, cl
mov ecx, edi
and r15d, 0x3333
sub ecx, r13d
or r15d, r14d
mov eax, r15d
shl r15d, 4
sar eax, 4
and r15d, 0xf0f0
and eax, 0xf0f
or r15d, eax
mov eax, r15d
shl r15d, 8
movzx r14d, r15w
sar eax, 8
movsxd r15, ebx
or eax, r14d
sar eax, cl
cdqe
nop dword [rax]
mov word [r9 + rax*2], r12w
add rax, r15
cmp eax, 0x1ff
jle 0x683aef38
jmp 0x683aee50
lea r11, str.bad_sizes
xor eax, eax
mov qword [0x683c4440], r11
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, 1
jmp 0x683aef60
cmp eax, 0x8000
jle 0x683aee18
nop dword [rax + rax]
lea rdx, str.bad_codelengths
xor eax, eax
mov qword [0x683c4440], rdx
jmp 0x683aef60
movzx esi, byte [rdx]
mov rbp, r11
add dword [rsp + rsi*4 + 0x60], 1
jmp 0x683ae90e