Function at 0x10045760
Capabilities:
Compute adler32 checksum

Disassembly:
jmp 0x10045770
mov eax, dword [esp + 4]
push ebx
mov ebx, dword [esp + 0x10]
push edi
mov edi, eax
movzx ecx, ax
shr edi, 0x10
cmp ebx, 1
jne 0x100457b9
mov eax, dword [esp + 0x10]
movzx eax, byte [eax]
add eax, ecx
cmp eax, 0xfff1
lea edx, [eax - 0xfff1]
cmovb edx, eax
lea eax, [edx + edi]
cmp eax, 0xfff1
lea ecx, [eax - 0xfff1]
pop edi
cmovb ecx, eax
shl ecx, 0x10
or ecx, edx
mov eax, ecx
pop ebx
ret
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x100457c9
lea eax, [esi + 1]
pop esi
pop edi
pop ebx
ret
cmp ebx, 0x10
jae 0x1004580c
test ebx, ebx
je 0x100457e1
movzx eax, byte [esi]
lea esi, [esi + 1]
add ecx, eax
add edi, ecx
sub ebx, 1
jne 0x100457d2
cmp ecx, 0xfff1
lea esi, [ecx - 0xfff1]
mov eax, 0x80078071
cmovb esi, ecx
mul edi
shr edx, 0xf
mov eax, edx
shl eax, 4
sub eax, edx
add eax, edi
shl eax, 0x10
or eax, esi
pop esi
pop edi
pop ebx
ret
cmp ebx, 0x15b0
jb 0x1004590a
mov eax, 0x5e6ea9af
mul ebx
push ebp
mov ebp, edx
shr ebp, 0xb
jmp 0x10045830
sub ebx, 0x15b0
mov edx, 0x15b
jmp 0x10045840
movzx eax, byte [esi]
add ecx, eax
movzx eax, byte [esi + 1]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 2]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 3]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 4]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 5]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 6]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 7]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 8]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 9]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xa]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xb]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xc]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xd]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xe]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xf]
add edi, ecx
add esi, 0x10
add ecx, eax
add edi, ecx
sub edx, 1
jne 0x10045840
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul eax, edx, 0xffff000f
add ecx, eax
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul eax, edx, 0xffff000f
add edi, eax
sub ebp, 1
jne 0x10045830
pop ebp
test ebx, ebx
je 0x100459d5
cmp ebx, 0x10
jb 0x100459a2
mov edx, ebx
shr edx, 4
nop
movzx eax, byte [esi]
sub ebx, 0x10
add ecx, eax
movzx eax, byte [esi + 1]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 2]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 3]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 4]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 5]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 6]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 7]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 8]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 9]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xa]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xb]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xc]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xd]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xe]
add edi, ecx
add ecx, eax
movzx eax, byte [esi + 0xf]
add edi, ecx
add esi, 0x10
add ecx, eax
add edi, ecx
sub edx, 1
jne 0x10045910
test ebx, ebx
je 0x100459b1
movzx eax, byte [esi]
lea esi, [esi + 1]
add ecx, eax
add edi, ecx
sub ebx, 1
jne 0x100459a2
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul eax, edx, 0xffff000f
add ecx, eax
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul edx, edx, 0xffff000f
add edi, edx
shl edi, 0x10
or edi, ecx
pop esi
mov eax, edi
pop edi
pop ebx
ret