Function at 0x564f30
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x564f5e
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x564f47
mov dword [eax], ebx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x564f54
mov dword [eax], 0
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
mov dword [ebx + 0x78], ecx
mov dword [ebx + 0x7c], edx
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebx + 0x70], esi
mov dword [ebx + 0x84], esi
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebx + 0x74], edi
test ecx, ecx
je 0x564f86
mov eax, dword [ecx]
jmp 0x564f88
xor eax, eax
mov dword [ebx + 0x88], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebx + 0x8c], 0
mov dword [ebx + 0x80], eax
test edi, edi
jne 0x564fac
mov dword [ebp - 0x14], edi
test edx, edx
je 0x564fb3
mov dword [ebp - 0x14], 1
xor eax, eax
cmp dword [ebx], eax
setne al
cmp eax, dword [ebp - 0x14]
je 0x56521d
cmp dword [ebx + 0x6c], 0
jne 0x56521d
cmp dword [ebx + 0x68], 0
mov eax, dword [ebp + 0x1c]
je 0x564fdf
cmp eax, 4
jne 0x56521d
test ecx, ecx
je 0x564ff0
cmp dword [ecx], 0
je 0x564ff0
test esi, esi
je 0x56521d
test edx, edx
je 0x565001
cmp dword [edx], 0
je 0x565001
test edi, edi
je 0x56521d
xor ecx, ecx
cmp eax, 4
sete cl
mov eax, ecx
mov dword [ebp - 0x18], ecx
or dword [ebx + 0x68], eax
cmp dword [ebx + 0x5c], 0
jne 0x56520a
cmp dword [ebx + 0x60], 0
jne 0x56520a
push ebx
call fcn.00565650
add esp, 4
test eax, eax
je 0x5651c5
test dword [ebx + 8], 0x3000
je 0x56519b
test esi, esi
je 0x56519b
mov edx, dword [ebx + 0x84]
mov eax, 0x5e6ea9af
mov edi, dword [ebx + 0x18]
sub edx, esi
mov dword [ebp - 0xc], edx
mul edx
movzx ecx, di
shr edx, 0xb
imul eax, edx, 0x15b0
mov edx, dword [ebp - 0xc]
shr edi, 0x10
mov dword [ebp - 0x14], edi
sub edx, eax
cmp dword [ebp - 0xc], 0
mov dword [ebp - 4], edx
je 0x565192
mov ebx, edx
xor edx, edx
mov dword [ebp - 8], edx
cmp ebx, 7
jbe 0x5650f4
mov eax, 7
sub eax, esi
mov dword [ebp - 0x14], eax
lea ebx, [ebx]
movzx eax, byte [esi]
add edx, 8
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 esi, 8
add ecx, eax
mov eax, dword [ebp - 0x14]
add eax, esi
add edi, ecx
cmp eax, ebx
jb 0x5650a0
mov dword [ebp - 8], edx
mov dword [ebp - 0x14], edi
mov eax, dword [ebp - 4]
xor ebx, ebx
mov dword [ebp - 0x10], ebx
cmp edx, eax
jae 0x565154
sub eax, edx
cmp eax, 2
jb 0x565140
mov eax, dword [ebp - 8]
mov edi, ebx
mov edx, dword [ebp - 4]
sub edx, eax
sub edx, 2
shr edx, 1
inc edx
lea eax, [eax + edx*2]
mov dword [ebp - 8], eax
lea ecx, [ecx]
movzx eax, byte [esi]
add ecx, eax
movzx eax, byte [esi + 1]
add ebx, ecx
add esi, 2
add ecx, eax
add edi, ecx
sub edx, 1
jne 0x565120
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x14]
cmp edx, dword [ebp - 4]
jae 0x56514d
movzx eax, byte [esi]
add ecx, eax
add edi, ecx
inc esi
mov eax, dword [ebp - 0x10]
add eax, ebx
add edi, eax
mov eax, 0x80078071
mov ebx, dword [ebp - 4]
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 dword [ebp - 0xc], ebx
mov ebx, 0x15b0
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], ebx
jne 0x565086
mov ebx, dword [ebp + 8]
shl edi, 0x10
lea eax, [edi + ecx]
mov dword [ebx + 0x18], eax
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x56520a
cmp dword [ebx + 0x20], 0
jne 0x56520a
cmp dword [ebx + 0x88], 0
jne 0x56520a
cmp dword [ebx + 0x5c], 0
jne 0x56520a
push esi
push ebx
call fcn.00565e40
add esp, 8
test eax, eax
jns 0x5651cf
mov eax, dword [ebx + 0x6c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0x60], eax
cmp esi, 3
jne 0x56520a
push 0x10000
lea eax, [ebx + 0x29272]
push 0
push eax
call sym.BZDPatcher.exe_SDL_memset
push 0x10000
lea eax, [ebx + 0x19272]
push 0
push eax
call sym.BZDPatcher.exe_SDL_memset
add esp, 0x18
mov dword [ebx + 0x24], 0
push ebx
call fcn.00566390
add esp, 4
mov dword [ebx + 0x6c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x565227
mov dword [ecx], 0
test edx, edx
je 0x565231
mov dword [edx], 0
pop edi
pop esi
mov dword [ebx + 0x6c], 0xfffffffe
mov eax, 0xfffffffe
pop ebx
mov esp, ebp
pop ebp
ret