Function at 0x406c01
Capabilities:
Compress data via zlib inflate or deflate

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor edx, edx
cmp edi, edx
je 0x4073cf
mov esi, dword [edi + 0x1c]
cmp esi, edx
je 0x4073cf
mov ecx, dword [ebp + 0xc]
cmp ecx, 5
jg 0x4073cf
cmp ecx, edx
jl 0x4073cf
cmp dword [edi + 0xc], edx
je 0x4073c7
cmp dword [edi], edx
jne 0x406c4a
cmp dword [edi + 4], edx
jne 0x4073c7
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x406c5d
cmp ecx, 4
jne 0x4073c7
cmp dword [edi + 0x10], edx
je 0x4071db
mov edx, dword [esi + 0x28]
cmp eax, 0x2a
mov dword [esi], edi
mov dword [ebp - 4], edx
mov dword [esi + 0x28], ecx
jne 0x406f11
push 2
pop edx
cmp dword [esi + 0x18], edx
jne 0x406e7a
xor ebx, ebx
push ebx
push ebx
push ebx
call fcn.0040b560
mov dword [edi + 0x30], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
add esp, 0xc
mov byte [eax + ecx], 0x1f
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 0x8b
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 8
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, ebx
jne 0x406d4d
mov eax, dword [esi + 8]
and byte [eax + ecx], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
and byte [ecx + eax], bl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x406d16
push 2
jmp 0x406d2a
cmp dword [esi + 0x88], 2
jge 0x406d28
cmp eax, 2
jl 0x406d28
xor eax, eax
jmp 0x406d2b
push 4
pop eax
mov edx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [ecx + eax], 0xb
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
jmp 0x406f11
mov edx, dword [eax + 0x24]
neg edx
sbb dl, dl
and edx, 0x10
cmp dword [eax + 0x2c], 0
sete bl
dec ebx
and ebx, 2
add dl, bl
mov ebx, dword [eax + 0x1c]
neg ebx
sbb bl, bl
and ebx, 8
add dl, bl
mov ebx, dword [eax + 0x10]
neg ebx
sbb bl, bl
and ebx, 4
add dl, bl
cmp dword [eax], 0
setne al
add dl, al
mov eax, dword [esi + 8]
mov byte [eax + ecx], dl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 4]
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 0x10
mov byte [edx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 4]
mov edx, dword [esi + 8]
shr ecx, 0x18
mov byte [edx + eax], cl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x406df0
push 2
jmp 0x406e04
cmp dword [esi + 0x88], 2
jge 0x406e02
cmp eax, 2
jl 0x406e02
xor eax, eax
jmp 0x406e05
push 4
pop eax
mov edx, dword [esi + 8]
xor ebx, ebx
mov byte [edx + ecx], al
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 0xc]
mov byte [edx + eax], cl
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp dword [eax + 0x10], ebx
je 0x406e51
mov edx, dword [esi + 8]
mov al, byte [eax + 0x14]
mov byte [edx + ecx], al
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + 0x14]
mov edx, dword [esi + 8]
shr ecx, 8
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x406e6b
push ecx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.0040b560
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x45
jmp 0x406f11
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], edx
jge 0x406eb0
mov eax, dword [esi + 0x84]
cmp eax, edx
jl 0x406eb0
cmp eax, 6
jge 0x406ea2
push 1
pop eax
jmp 0x406eb2
xor ebx, ebx
cmp eax, 6
setne bl
add ebx, edx
mov eax, ebx
jmp 0x406eb2
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], 0
je 0x406ec0
or ecx, 0x20
push 0x1f
mov eax, ecx
xor edx, edx
pop ebx
div ebx
mov dword [esi + 4], 0x71
sub ecx, edx
add ecx, ebx
push ecx
push esi
call fcn.004073d7
xor ebx, ebx
pop ecx
cmp dword [esi + 0x6c], ebx
pop ecx
je 0x406f03
mov eax, dword [edi + 0x30]
shr eax, 0x10
push eax
push esi
call fcn.004073d7
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.004073d7
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.00409a5c
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x406fe4
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], 0
je 0x406fdd
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x14]
and eax, 0xffff
cmp dword [esi + 0x20], eax
jae 0x406fa4
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x406f79
cmp dword [ecx + 0x2c], 0
je 0x406f67
cmp eax, dword [ebp + 8]
jbe 0x406f67
sub eax, dword [ebp + 8]
push eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 8]
push eax
push dword [edi + 0x30]
call fcn.0040b560
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.00407401
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x406fa4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
mov ebx, dword [esi + 8]
mov ecx, dword [ecx + 0x10]
mov cl, byte [ecx + edx]
mov byte [ebx + eax], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
inc dword [esi + 0x20]
mov edx, dword [ecx + 0x14]
mov eax, dword [esi + 0x20]
and edx, 0xffff
cmp eax, edx
jb 0x406f3b
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x406fce
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x406fce
sub eax, dword [ebp + 8]
push eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 8]
push eax
push dword [edi + 0x30]
call fcn.0040b560
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp ecx, dword [eax + 0x14]
jne 0x406fe4
and dword [esi + 0x20], 0
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x407093
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x40708c
mov edx, dword [esi + 0x14]
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe