Function at 0x10039350
Capabilities:
Compute adler32 checksum

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, edx
mov ebx, ecx
movzx esi, byte [edi]
movzx eax, byte [edi + 1]
shl esi, 8
add esi, eax
movzx eax, byte [edi + 2]
shl esi, 8
add esi, eax
movzx eax, byte [edi + 3]
shl esi, 8
add esi, eax
cmp esi, 0x57bc0000
jne 0x10039595
movzx ecx, byte [edi + 4]
movzx eax, byte [edi + 5]
shl ecx, 8
add ecx, eax
movzx eax, byte [edi + 6]
shl ecx, 8
add ecx, eax
movzx eax, byte [edi + 7]
shl ecx, 8
add ecx, eax
jne 0x10039595
movzx ecx, byte [edi + 8]
movzx eax, byte [edi + 9]
shl ecx, 8
add ecx, eax
mov dword [0x100c6da4], edi
movzx eax, byte [edi + 0xa]
shl ecx, 8
add ecx, eax
mov dword [0x100c6dac], ebx
movzx eax, byte [edi + 0xb]
add edi, 0x10
shl ecx, 8
add ecx, eax
mov dword [0x100c6e64], ebx
mov dword [esp + 0x20], ecx
lea esi, [ecx + ebx]
mov ecx, edi
mov dword [0x100c6da8], esi
call fcn.10039170
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, edi
je 0x10039425
nop dword [eax]
cmp dword [0x100c6e64], esi
ja 0x10039595
mov ecx, ebp
mov esi, ebp
call fcn.10039170
mov ebp, eax
mov dword [esp + 0x1c], eax
cmp ebp, esi
mov esi, dword [0x100c6da8]
jne 0x10039400
cmp byte [ebp], 5
jne 0x10039595
cmp byte [ebp + 1], 0xfa
jne 0x10039595
cmp dword [0x100c6e64], esi
jne 0x10039595
mov esi, dword [esp + 0x20]
mov eax, 0x5e6ea9af
mul esi
xor edi, edi
mov dword [esp + 0x18], esi
shr edx, 0xb
mov ecx, 1
imul eax, edx, 0x15b0
mov edx, esi
sub edx, eax
mov dword [esp + 0x10], edx
test esi, esi
je 0x10039561
xor esi, esi
cmp edx, 7
jbe 0x100394ce
mov ebp, 7
sub ebp, ebx
movzx eax, byte [ebx]
add esi, 8
add ecx, eax
movzx eax, byte [ebx + 1]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 2]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 3]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 4]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 5]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 6]
add edi, ecx
add ecx, eax
movzx eax, byte [ebx + 7]
add ebx, 8
add edi, ecx
add ecx, eax
add edi, ecx
lea eax, [ebx + ebp]
cmp eax, edx
jb 0x10039482
xor ebp, ebp
cmp esi, edx
jae 0x10039522
mov eax, edx
sub eax, esi
cmp eax, 2
jb 0x10039513
sub edx, esi
sub edx, 2
shr edx, 1
inc edx
lea eax, [esi + edx*2]
mov esi, ebp
mov dword [esp + 0x24], eax
nop
movzx eax, byte [ebx]
add ecx, eax
movzx eax, byte [ebx + 1]
add ebp, ecx
add ebx, 2
add ecx, eax
add esi, ecx
sub edx, 1
jne 0x100394f0
mov eax, dword [esp + 0x24]
cmp eax, dword [esp + 0x10]
jae 0x1003951d
jmp 0x10039515
mov esi, ebp
movzx eax, byte [ebx]
add ecx, eax
add edi, ecx
inc ebx
lea eax, [esi + ebp]
add edi, eax
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
mov edx, dword [esp + 0x10]
add edi, eax
sub dword [esp + 0x18], edx
mov edx, 0x15b0
mov dword [esp + 0x10], edx
jne 0x10039474
mov ebp, dword [esp + 0x1c]
movzx esi, byte [ebp + 2]
movzx eax, byte [ebp + 3]
movzx edx, byte [ebp + 5]
shl esi, 8
add esi, eax
shl edi, 0x10
movzx eax, byte [ebp + 4]
add edi, ecx
shl esi, 8
add esi, eax
shl esi, 8
add esi, edx
cmp edi, esi
jne 0x10039595
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret