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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.006ba331
pop ecx
test eax, eax
jne 0x6b9ee7
mov ebx, dword [ebp + 0xc]
cmp ebx, 5
ja 0x6b9ee7
mov esi, dword [edi + 0x1c]
cmp dword [edi + 0xc], eax
je 0x6b9edf
cmp dword [edi + 4], eax
je 0x6b96c6
cmp dword [edi], eax
je 0x6b9edf
mov ecx, dword [esi + 4]
cmp ecx, 0x29a
jne 0x6b96da
cmp ebx, 4
jne 0x6b9edf
cmp dword [edi + 0x10], eax
je 0x6b973a
mov edx, dword [esi + 0x28]
mov dword [esi + 0x28], ebx
mov dword [ebp - 4], 9
cmp dword [esi + 0x14], eax
je 0x6b9708
push edi
call fcn.006ba929
xor ebx, ebx
pop ecx
cmp dword [edi + 0x10], ebx
je 0x6b9ed7
mov eax, dword [esi + 4]
jmp 0x6b974e
cmp dword [edi + 4], 0
mov eax, ecx
jne 0x6b974c
xor eax, eax
mov dword [ebp - 0xc], ecx
cmp edx, 4
cmovg eax, dword [ebp - 4]
add edx, edx
sub edx, eax
xor ecx, ecx
cmp ebx, 4
lea eax, [ebx + ebx]
cmovg ecx, dword [ebp - 4]
sub eax, ecx
cmp eax, edx
jg 0x6b9749
mov eax, dword [esi + 4]
cmp ebx, 4
je 0x6b974c
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffb
jmp 0x6b9ee9
mov eax, dword [ebp - 0xc]
xor ebx, ebx
mov ecx, 0x29a
cmp eax, ecx
jne 0x6b975e
mov eax, ecx
cmp dword [edi + 4], ebx
jne 0x6b973a
mov dword [ebp - 0xc], 0x1f
cmp eax, 0x2a
jne 0x6b9826
cmp dword [esi + 0x18], ebx
jne 0x6b977f
mov dword [esi + 4], 0x71
jmp 0x6b9826
mov eax, dword [esi + 0x30]
shl eax, 0xc
sub eax, 0x7800
cmp dword [esi + 0x88], 2
jge 0x6b97c0
mov ecx, dword [esi + 0x84]
cmp ecx, 2
jl 0x6b97c0
cmp ecx, 6
jge 0x6b97aa
push 0x40
pop edx
push 0x60
jmp 0x6b97c4
jne 0x6b97b6
mov edx, 0x80
lea ecx, [edx + 0x20]
jmp 0x6b97c5
mov edx, 0xc0
lea ecx, [edx + 0x20]
jmp 0x6b97c5
mov edx, ebx
push 0x20
pop ecx
cmp dword [esi + 0x6c], ebx
push 0x1f
cmove ecx, edx
xor edx, edx
or ecx, eax
mov eax, ecx
div dword [ebp - 0xc]
pop eax
sub ecx, edx
add ecx, eax
push ecx
push esi
call fcn.006bab58
pop ecx
pop ecx
cmp dword [esi + 0x6c], ebx
je 0x6b9802
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.006bab58
movzx eax, word [edi + 0x30]
push eax
push esi
call fcn.006bab58
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.006bac4e
mov dword [edi + 0x30], eax
push edi
mov dword [esi + 4], 0x71
call fcn.006ba929
add esp, 0x10
cmp dword [esi + 0x14], ebx
jne 0x6b9ed7
mov eax, dword [esi + 4]
cmp eax, 0x39
jne 0x6b9a2f
push ebx
push ebx
push ebx
call fcn.006bae98
mov dword [edi + 0x30], eax
add esp, 0xc
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
push 0x1f
pop edx
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], 0x8b
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], 8
mov edx, dword [esi + 0x14]
mov ebx, dword [esi + 0x1c]
inc edx
mov dword [esi + 0x14], edx
test ebx, ebx
jne 0x6b990b
mov eax, dword [esi + 8]
mov byte [edx + eax], bl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], bl
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x84]
inc edx
mov dword [esi + 0x14], edx
cmp eax, dword [ebp - 4]
jne 0x6b98c4
mov cl, 2
jmp 0x6b98d6
cmp dword [esi + 0x88], 2
jge 0x6b98d4
mov cl, bl
cmp eax, 2
jge 0x6b98d6
mov cl, 4
mov eax, dword [esi + 8]
push edi
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], 0xa
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
call fcn.006ba929
pop ecx
cmp dword [esi + 0x14], ebx
jne 0x6b9ed7
mov eax, dword [esi + 4]
jmp 0x6b9a31
cmp dword [ebx + 0x24], 0
sete cl
dec cl
and cl, 0x10
cmp dword [ebx + 0x2c], 0
sete al
dec al
and al, 2
add cl, al
cmp dword [ebx + 0x1c], 0
sete al
dec al
and al, 8
add cl, al
cmp dword [ebx + 0x10], 0
sete al
dec al
and al, 4
add cl, al
cmp dword [ebx], 0
setne al
add cl, al
mov eax, dword [esi + 8]
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
mov al, byte [eax + 4]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
mov al, byte [eax + 5]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [eax + 6]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [eax + 7]
mov byte [edx + ecx], al
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x84]
inc edx
mov dword [esi + 0x14], edx
cmp eax, dword [ebp - 4]
jne 0x6b99aa
mov cl, 2
jmp 0x6b99c0
cmp dword [esi + 0x88], 2
jge 0x6b99be
cmp eax, 2
jl 0x6b99be
xor ebx, ebx
mov cl, bl
jmp 0x6b99c2
mov cl, 4
xor ebx, ebx
mov eax, dword [esi + 8]
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [eax + 0xc]
mov byte [edx + ecx], al
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
inc edx
mov dword [esi + 0x14], edx
cmp dword [eax + 0x10], ebx
je 0x6b9a0d
mov al, byte [eax + 0x14]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [eax + 0x15]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x6b9a24
push edx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
push 0x45
pop eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], eax
jmp 0x6b9a31
xor ebx, ebx
cmp eax, 0x45
jne 0x6b9b30
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x10], ebx
je 0x6b9b26
movzx edx, word [eax + 0x14]
sub edx, dword [esi + 0x20]
mov ebx, dword [esi + 0x14]
mov ecx, dword [esi + 0xc]
mov dword [ebp - 4], edx
lea eax, [ebx + edx]
cmp eax, ecx
jbe 0x6b9ad9
mov eax, ebx
mov dword [ebp - 0xc], ebx
sub ecx, eax
mov eax, dword [esi + 0x1c]
push ecx
mov dword [ebp - 8], ecx
mov eax, dword [eax + 0x10]
add eax, dword [esi + 0x20]
push eax
mov eax, dword [esi + 8]
add eax, dword [ebp - 0xc]
push eax
call fcn.007390e0
mov eax, dword [esi + 0x1c]
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], ecx
cmp dword [eax + 0x2c], 0
je 0x6b9aab
cmp ecx, ebx
jbe 0x6b9aab
mov eax, dword [esi + 8]
sub ecx, ebx
push ecx
add eax, ebx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 8]
add dword [esi + 0x20], eax
push edi
call fcn.006ba929
cmp dword [esi + 0x14], 0
pop ecx
jne 0x6b9ed7
mov edx, dword [ebp - 4]
xor eax, eax
sub edx, dword [ebp - 8]
xor ebx, ebx
mov ecx, dword [esi + 0xc]
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], eax
cmp edx, ecx
ja 0x6b9a62
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push edx
mov eax, dword [eax + 0x10]
add eax, ecx
push eax
mov eax, dword [esi + 8]
add eax, ebx
push eax
call fcn.007390e0
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [esi + 0x1c]
add ecx, dword [esi + 0x14]
mov dword [esi + 0x14], ecx
cmp dword [eax + 0x2c], 0
je 0x6b9b21
cmp ecx, ebx
jbe 0x6b9b21
mov eax, dword [esi + 8]
sub ecx, ebx
push ecx
add eax, ebx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
xor ebx, ebx
mov dword [esi + 0x20], ebx
push 0x49
mov dword [esi + 4], 0x49
pop eax
cmp eax, 0x49
jne 0x6b9beb
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], ebx
je 0x6b9be1
mov ecx, dword [esi + 0x14]
mov ebx, ecx
mov dword [ebp - 4], ecx
cmp ebx, dword [esi + 0xc]
jne 0x6b9b8d
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x6b9b76
cmp ebx, ecx
jbe 0x6b9b76
mov eax, dword [esi + 8]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.006ba929
cmp dword [esi + 0x14], 0
pop ecx
jne 0x6b9ed7
and dword [ebp - 4], 0
xor ebx, ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x1c]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 8]
mov byte [ebx + eax], dl
mov ebx, dword [esi + 0x14]
inc ebx
mov dword [esi + 0x14], ebx
test dl, dl
je 0x6b9bb5
mov ecx, dword [ebp - 4]
jmp 0x6b9b4d
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x6b9bdc
mov ecx, dword [ebp - 4]
cmp ebx, ecx
jbe 0x6b9bdc
mov eax, dword [esi + 8]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
xor ebx, ebx
mov dword [esi + 0x20], ebx
push 0x5b
mov dword [esi + 4], 0x5b
pop eax
cmp eax, 0x5b
jne 0x6b9ca3
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], ebx
je 0x6b9c99
mov ecx, dword [esi + 0x14]
mov ebx, ecx
mov dword [ebp - 4], ecx
cmp ebx, dword [esi + 0xc]
jne 0x6b9c48
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x6b9c31
cmp ebx, ecx
jbe 0x6b9c31
mov eax, dword [esi + 8]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.006ba929
cmp dword [esi + 0x14], 0
pop ecx
jne 0x6b9ed7
and dword [ebp - 4], 0
xor ebx, ebx
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x24]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 8]
mov byte [ebx + eax], dl
mov ebx, dword [esi + 0x14]
inc ebx
mov dword [esi + 0x14], ebx
test dl, dl
je 0x6b9c70
mov ecx, dword [ebp - 4]
jmp 0x6b9c08
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x6b9c97
mov ecx, dword [ebp - 4]
cmp ebx, ecx
jbe 0x6b9c97
mov eax, dword [esi + 8]
sub ebx, ecx
push ebx
add eax, ecx
push eax
push dword [edi + 0x30]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
xor ebx, ebx
push 0x67
mov dword [esi + 4], 0x67
pop eax
cmp eax, 0x67
jne 0x6b9d0d
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x6b9cf6
mov edx, dword [esi + 0x14]
lea eax, [edx + 2]
cmp eax, dword [esi + 0xc]
jbe 0x6b9ccd
push edi
call fcn.006ba929
mov edx, dword [esi + 0x14]
pop ecx
test edx, edx
jne 0x6b9ed7
mov ecx, dword [esi + 8]
mov al, byte [edi + 0x30]
push ebx
push ebx
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 0x31]
push ebx
mov byte [edx + ecx], al
inc dword [esi + 0x14]
call fcn.006bae98
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
mov dword [esi + 4], 0x71
call fcn.006ba929
pop ecx
cmp dword [esi + 0x14], ebx
jne 0x6b9ed7
cmp dword [edi + 4], ebx
jne 0x6b9d31
cmp dword [esi + 0x74], ebx
mov ebx, dword [ebp + 0xc]
jne 0x6b9d34
test ebx, ebx
je 0x6b9e04
cmp dword [esi + 4], 0x29a
je 0x6b9e04
jmp 0x6b9d34
mov ebx, dword [ebp + 0xc]
mov ecx, dword [esi + 0x84]
push ebx
push esi
test ecx, ecx
jne 0x6b9d47
call fcn.006b8b78
jmp 0x6b9d6e
mov eax, dword [esi + 0x88]
cmp eax, 2
jne 0x6b9d59
call fcn.006ba388
jmp 0x6b9d6e
cmp eax, 3
jne 0x6b9d65
call fcn.006ba4ed
jmp 0x6b9d6e
imul eax, ecx, 0xc
call dword [eax + 0x879af8]
pop ecx
pop ecx
cmp eax, 2
je 0x6b9d7a
cmp eax, 3
jne 0x6b9d81
mov dword [esi + 4], 0x29a
test eax, eax
je 0x6b9ed1
cmp eax, 2
je 0x6b9ed1
cmp eax, 1
jne 0x6b9e04
cmp ebx, eax
jne 0x6b9da4
push esi
call fcn.006bb95f
pop ecx
jmp 0x6b9df3
cmp ebx, 5
je 0x6b9df3
xor eax, eax
push eax
push eax
push eax
push esi
call fcn.006bbcb5
add esp, 0x10
cmp ebx, 3
jne 0x6b9df3
mov eax, dword [esi + 0x44]
xor edx, edx
mov ecx, dword [esi + 0x4c]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0x4c]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x44]
call fcn.00739c90
xor eax, eax
add esp, 0xc
cmp dword [esi + 0x74], eax
jne 0x6b9df3
mov dword [esi + 0x6c], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x16b4], eax
push edi
call fcn.006ba929
cmp dword [edi + 0x10], 0
pop ecx
je 0x6b9ed7
cmp ebx, 4
jne 0x6b9edb
cmp dword [esi + 0x18], 0
jg 0x6b9e1b
xor eax, eax
inc eax
jmp 0x6b9eea
cmp dword [esi + 0x18], 2
jne 0x6b9e9b
mov edx, dword [esi + 0x14]
mov al, byte [edi + 0x30]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov al, byte [edi + 0x31]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov al, byte [edi + 0x32]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov al, byte [edi + 0x33]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov al, byte [edi + 8]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 9]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 0xa]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 0xb]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
jmp 0x6b9eb4
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.006bab58
movzx eax, word [edi + 0x30]
push eax
push esi
call fcn.006bab58
add esp, 0x10
push edi
call fcn.006ba929
mov eax, dword [esi + 0x18]
pop ecx
test eax, eax
jle 0x6b9ec7
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], eax
sete al
jmp 0x6b9eea
cmp dword [edi + 0x10], 0
jne 0x6b9edb
or dword [esi + 0x28], 0xffffffff
xor eax, eax
jmp 0x6b9eea
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret