Function at 0x59ea30
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 qword [rsp + 0x80], r8
shr edx, 0x10
cmp r8, 1
movzx esi, cx
mov dword [rsp + 0x18], edx
je 0x59ef05
test rax, rax
je 0x59ef37
cmp qword [rsp + 0x80], 0xf
ja 0x59ec38
cmp qword [rsp + 0x80], 0
je 0x59ebf7
movzx edx, byte [rax]
add esi, edx
add dword [rsp + 0x18], esi
cmp qword [rsp + 0x80], 1
mov ecx, dword [rsp + 0x18]
je 0x59ebf7
movzx edx, byte [rax + 1]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 2
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 2]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 3
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 3]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 4
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 4]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 5
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 5]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 6
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 6]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 7
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 7]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 8
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 8]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 9
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 9]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 0xa
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 0xa]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 0xb
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 0xb]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 0xc
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 0xc]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 0xd
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx edx, byte [rax + 0xd]
add esi, edx
add ecx, esi
cmp qword [rsp + 0x80], 0xe
mov dword [rsp + 0x18], ecx
je 0x59ebf7
movzx eax, byte [rax + 0xe]
add esi, eax
add ecx, esi
mov dword [rsp + 0x18], ecx
lea eax, [rsi - 0xfff1]
cmp esi, 0xfff1
mov edx, 0x80078071
cmovae esi, eax
mov eax, dword [rsp + 0x18]
mul edx
shr edx, 0xf
imul eax, edx, 0xfff1
mov edx, dword [rsp + 0x18]
sub edx, eax
mov eax, edx
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
cmp qword [rsp + 0x80], 0x15af
jbe 0x59ef41
mov r15d, esi
mov rsi, rax
sub qword [rsp + 0x80], 0x15b0
lea rax, [rsi + 0x15b0]
mov qword [rsp + 0x10], rax
nop dword [rax + rax]
movzx r13d, byte [rsi]
add rsi, 0x10
movzx r14d, byte [rsi - 0xf]
movzx r12d, byte [rsi - 0xe]
movzx ebp, byte [rsi - 0xd]
movzx edi, byte [rsi - 0xc]
movzx ebx, byte [rsi - 0xb]
add r13d, r15d
movzx r11d, byte [rsi - 0xa]
movzx r10d, byte [rsi - 9]
add r14d, r13d
movzx r9d, byte [rsi - 8]
movzx r8d, byte [rsi - 5]
add r12d, r14d
add r13d, r14d
movzx ecx, byte [rsi - 4]
add ebp, r12d
add r13d, r12d
movzx edx, byte [rsi - 3]
add edi, ebp
add r13d, ebp
movzx r15d, byte [rsi - 1]
add ebx, edi
add r13d, edi
add r11d, ebx
add ebx, r13d
add r10d, r11d
add r11d, ebx
lea eax, [r10 + r9]
movzx r9d, byte [rsi - 7]
add r10d, r11d
mov dword [rsp], eax
add r10d, dword [rsp]
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 0x59ec70
mov eax, 0x80078071
mov ecx, dword [rsp + 0x18]
mov rsi, qword [rsp + 0x10]
mul r15d
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 qword [rsp + 0x80], 0x15af
mov dword [rsp + 0x18], ecx
ja 0x59ec50
cmp qword [rsp + 0x80], 0
mov esi, r15d
je 0x59eef7
cmp qword [rsp + 0x80], 0xf
jbe 0x59ef4b
mov rax, qword [rsp + 0x80]
mov r15, qword [rsp + 0x10]
mov qword [rsp], rax
movzx r13d, byte [r15]
movzx r14d, byte [r15 + 1]
add r15, 0x10
movzx r12d, byte [r15 - 0xe]
movzx ebp, byte [r15 - 0xd]
movzx edi, byte [r15 - 0xc]
movzx ebx, byte [r15 - 0xb]
movzx r11d, byte [r15 - 0xa]
movzx r10d, byte [r15 - 9]
add r13d, esi
movzx r9d, byte [r15 - 8]
movzx r8d, byte [r15 - 7]
add r14d, r13d
movzx ecx, byte [r15 - 6]
movzx eax, byte [r15 - 5]
add r12d, r14d
add r13d, r14d
sub qword [rsp], 0x10
add ebp, r12d
add r13d, r12d
add edi, ebp
add r13d, ebp
add ebx, edi
add r13d, edi
add r11d, ebx
add ebx, r13d
add r10d, r11d
add r11d, ebx
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 qword [rsp], 0xf
ja 0x59eda8
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x10]
mov rdx, qword [rsp + 0x80]
sub rax, 0x10
and rax, 0xfffffffffffffff0
and edx, 0xf
lea rax, [rcx + rax + 0x10]
test rdx, rdx
mov qword [rsp + 0x10], rax
lea rax, [rdx - 1]
je 0x59eece
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 0x59eeb7
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 0x59ec27
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 0x59ec27
mov eax, 1
jmp 0x59ec27
mov qword [rsp + 0x10], rax
jmp 0x59ed97
mov rax, qword [rsp + 0x80]
sub rax, 1
jmp 0x59eea6
mov r8d, r8d
jmp 0x59ea30