Function at 0x180052cac
Capabilities:
Compute adler32 checksum

Disassembly:
mov qword [rsp + 8], rdi
mov r10d, ecx
movzx r9d, cx
shr r10d, 0x10
mov r11, rdx
cmp r8d, 1
jne 0x180052cf9
movzx eax, byte [rdx]
mov edx, 0xfff1
add r9d, eax
cmp r9d, edx
lea ecx, [r9 - 0xfff1]
cmovb ecx, r9d
add r10d, ecx
cmp r10d, edx
lea eax, [r10 - 0xfff1]
cmovb eax, r10d
shl eax, 0x10
or eax, ecx
jmp 0x180052f86
test rdx, rdx
jne 0x180052d06
lea eax, [rdx + 1]
jmp 0x180052f86
cmp r8d, 0x10
jae 0x180052d4c
test r8d, r8d
je 0x180052d26
or ecx, 0xffffffff
movzx eax, byte [r11]
inc r11
add r9d, eax
add r10d, r9d
add r8d, ecx
jne 0x180052d14
mov edx, 0xfff1
lea ecx, [r9 - 0xfff1]
cmp r9d, edx
mov eax, 0x80078071
cmovb ecx, r9d
mul r10d
shr edx, 0xf
imul eax, edx, 0xf
add eax, r10d
jmp 0x180052cef
or ecx, 0xffffffff
cmp r8d, 0x15b0
jb 0x180052e62
mov eax, 0x5e6ea9af
mul r8d
shr edx, 0xb
mov edi, edx
add r8d, 0xffffea50
mov edx, 0x15b
movzx eax, byte [r11]
add r9d, eax
movzx eax, byte [r11 + 1]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 2]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 3]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 4]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 5]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 6]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 7]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 8]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 9]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xa]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xb]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xc]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xd]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xe]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xf]
add r10d, r9d
add r11, 0x10
add r9d, eax
add r10d, r9d
add edx, ecx
jne 0x180052d75
mov eax, 0x80078071
mul r9d
shr edx, 0xf
imul eax, edx, 0xffff000f
add r9d, eax
mov eax, 0x80078071
mul r10d
shr edx, 0xf
imul eax, edx, 0xffff000f
add r10d, eax
sub rdi, 1
jne 0x180052d69
test r8d, r8d
je 0x180052f7c
cmp r8d, 0x10
jb 0x180052f3d
mov edx, r8d
shr rdx, 4
movzx eax, byte [r11]
add r8d, 0xfffffff0
add r9d, eax
movzx eax, byte [r11 + 1]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 2]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 3]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 4]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 5]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 6]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 7]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 8]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 9]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xa]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xb]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xc]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xd]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xe]
add r10d, r9d
add r9d, eax
movzx eax, byte [r11 + 0xf]
add r10d, r9d
add r11, 0x10
add r9d, eax
add r10d, r9d
sub rdx, 1
jne 0x180052e7c
test r8d, r8d
je 0x180052f54
movzx eax, byte [r11]
inc r11
add r9d, eax
add r10d, r9d
add r8d, ecx
jne 0x180052f42
mov eax, 0x80078071
mul r9d
mov eax, 0x80078071
shr edx, 0xf
imul ecx, edx, 0xffff000f
mul r10d
add r9d, ecx
shr edx, 0xf
imul ecx, edx, 0xffff000f
add r10d, ecx
shl r10d, 0x10
or r10d, r9d
mov eax, r10d
mov rdi, qword [rsp + 8]
ret