Function at 0x407c90
Capabilities:
Compute adler32 checksum

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rax, rdx
mov edx, ecx
mov dword [rsp + 0x80], r8d
movzx esi, cx
shr edx, 0x10
cmp r8d, 1
mov dword [rsp + 0x18], edx
je 0x408008
test rax, rax
je 0x408037
cmp dword [rsp + 0x80], 0xf
jbe 0x407f99
cmp dword [rsp + 0x80], 0x15af
jbe 0x40803e
mov r15d, esi
mov rsi, rax
sub dword [rsp + 0x80], 0x15b0
lea rax, [rsi + 0x15b0]
mov qword [rsp + 0x10], rax
nop word cs:[rax + rax]
movzx r13d, byte [rsi]
add rsi, 0x10
movzx r14d, byte [rsi - 0xf]
movzx r12d, byte [rsi - 0xe]
movzx ebp, byte [rsi - 0xd]
add r13d, r15d
movzx edi, byte [rsi - 0xc]
add r14d, r13d
movzx ebx, byte [rsi - 0xb]
add r12d, r14d
movzx r11d, byte [rsi - 0xa]
add r13d, r14d
add ebp, r12d
movzx r10d, byte [rsi - 9]
add r13d, r12d
movzx r9d, byte [rsi - 8]
add edi, ebp
add r13d, ebp
add ebx, edi
add r13d, edi
movzx r8d, byte [rsi - 5]
add r11d, ebx
add ebx, r13d
movzx ecx, byte [rsi - 4]
add r10d, r11d
add r11d, ebx
movzx edx, byte [rsi - 3]
lea eax, [r10 + r9]
movzx r9d, byte [rsi - 7]
add r10d, r11d
mov dword [rsp + 8], eax
add r10d, dword [rsp + 8]
movzx r15d, byte [rsi - 1]
add r9d, eax
mov eax, r9d
movzx r9d, byte [rsi - 6]
mov dword [rsp + 0xc], eax
add r10d, dword [rsp + 0xc]
add r9d, eax
movzx eax, byte [rsi - 2]
add r8d, r9d
add r9d, r10d
add ecx, r8d
add r8d, r9d
add edx, ecx
add ecx, r8d
add eax, edx
add edx, ecx
add r15d, eax
add eax, edx
add eax, r15d
add dword [rsp + 0x18], eax
cmp rsi, qword [rsp + 0x10]
jne 0x407d10
mov eax, 0x80078071
mov ecx, dword [rsp + 0x18]
mul r15d
mov rsi, qword [rsp + 0x10]
shr edx, 0xf
imul eax, edx, 0xfff1
sub r15d, eax
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul eax, edx, 0xfff1
sub ecx, eax
cmp dword [rsp + 0x80], 0x15af
mov dword [rsp + 0x18], ecx
ja 0x407cef
mov eax, dword [rsp + 0x80]
mov esi, r15d
test eax, eax
je 0x407f8e
cmp dword [rsp + 0x80], 0xf
jbe 0x408048
mov eax, dword [rsp + 0x80]
mov r15, qword [rsp + 0x10]
mov dword [rsp + 8], eax
movzx r13d, byte [r15]
add r15, 0x10
movzx r14d, byte [r15 - 0xf]
movzx r12d, byte [r15 - 0xe]
movzx ebp, byte [r15 - 0xd]
add r13d, esi
movzx edi, byte [r15 - 0xc]
add r14d, r13d
movzx ebx, byte [r15 - 0xb]
add r12d, r14d
movzx r11d, byte [r15 - 0xa]
add r13d, r14d
add ebp, r12d
movzx r10d, byte [r15 - 9]
add r13d, r12d
add edi, ebp
movzx r9d, byte [r15 - 8]
add r13d, ebp
add ebx, edi
movzx r8d, byte [r15 - 7]
add r13d, edi
add r11d, ebx
movzx ecx, byte [r15 - 6]
add ebx, r13d
add r10d, r11d
movzx eax, byte [r15 - 5]
add r11d, ebx
sub dword [rsp + 8], 0x10
add r9d, r10d
add r10d, r11d
add r8d, r9d
add r9d, r10d
add ecx, r8d
add r8d, r9d
lea edx, [rcx + rax]
movzx eax, byte [r15 - 4]
add ecx, r8d
mov esi, edx
mov dword [rsp + 0xc], esi
add ecx, dword [rsp + 0xc]
mov edx, eax
movzx eax, byte [r15 - 2]
add edx, esi
mov esi, edx
movzx edx, byte [r15 - 3]
mov dword [rsp + 0x1c], esi
add ecx, dword [rsp + 0x1c]
add edx, esi
movzx esi, byte [r15 - 1]
add eax, edx
add edx, ecx
add esi, eax
add eax, edx
add eax, esi
add dword [rsp + 0x18], eax
cmp dword [rsp + 8], 0xf
ja 0x407e47
mov eax, dword [rsp + 0x80]
mov edx, dword [rsp + 0x80]
sub eax, 0x10
shr eax, 4
and edx, 0xf
add rax, 1
shl rax, 4
add qword [rsp + 0x10], rax
lea eax, [rdx - 1]
test edx, edx
je 0x407f65
mov rbx, qword [rsp + 0x10]
mov ecx, dword [rsp + 0x18]
lea rdx, [rbx + rax + 1]
mov rax, rbx
add rax, 1
movzx r8d, byte [rax - 1]
add esi, r8d
add ecx, esi
cmp rax, rdx
jne 0x407f4e
mov dword [rsp + 0x18], ecx
mov eax, esi
mov ecx, 0x80078071
mul ecx
mov eax, edx
shr eax, 0xf
imul eax, eax, 0xfff1
sub esi, eax
mov eax, dword [rsp + 0x18]
mul ecx
shr edx, 0xf
imul eax, edx, 0xfff1
sub dword [rsp + 0x18], eax
mov eax, dword [rsp + 0x18]
shl eax, 0x10
or eax, esi
jmp 0x407ff7
mov ecx, dword [rsp + 0x80]
lea edx, [rcx - 1]
test ecx, ecx
je 0x407fc7
mov ecx, dword [rsp + 0x18]
lea rdx, [rax + rdx + 1]
add rax, 1
movzx r8d, byte [rax - 1]
add esi, r8d
add ecx, esi
cmp rax, rdx
jne 0x407fb0
mov dword [rsp + 0x18], ecx
cmp esi, 0xfff1
mov edx, 0x80078071
mov ecx, dword [rsp + 0x18]
lea eax, [rsi - 0xfff1]
cmovae esi, eax
mov eax, dword [rsp + 0x18]
mul edx
shr edx, 0xf
imul eax, edx, 0xfff1
sub ecx, eax
mov eax, ecx
shl eax, 0x10
or eax, esi
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx eax, byte [rax]
add eax, esi
lea edx, [rax - 0xfff1]
cmp eax, 0xfff1
cmovae eax, edx
mov edx, dword [rsp + 0x18]
add edx, eax
lea ecx, [rdx - 0xfff1]
cmp edx, 0xfff1
cmovae edx, ecx
shl edx, 0x10
or eax, edx
jmp 0x407ff7
mov eax, 1
jmp 0x407ff7
mov qword [rsp + 0x10], rax
jmp 0x407e37
mov eax, dword [rsp + 0x80]
sub eax, 1
jmp 0x407f3d