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

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
mov ebp, edx
mov ebx, ecx
push edi
mov dword [esp + 0x10], ebp
call fcn.004a4cc0
test eax, eax
jne 0x4a5869
mov edi, dword [ebx + 0x1c]
cmp dword [ebx + 0xc], eax
je 0x4a5861
cmp dword [ebx + 4], eax
je 0x4a50d4
cmp dword [ebx], eax
je 0x4a5861
mov esi, dword [edi + 4]
cmp esi, 0x29a
jne 0x4a50e8
cmp ebp, 4
jne 0x4a5861
cmp dword [ebx + 0x10], eax
je 0x4a5855
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x28], ebp
mov dword [esp + 0x14], 9
cmp dword [edi + 0x14], eax
je 0x4a511a
mov ecx, ebx
call fcn.004a4bd0
cmp dword [ebx + 0x10], 0
je 0x4a584d
mov edx, dword [edi + 4]
jmp 0x4a5143
mov edx, esi
cmp dword [ebx + 4], eax
jne 0x4a5143
xor eax, eax
cmp ecx, 4
cmovg eax, dword [esp + 0x14]
add ecx, ecx
sub ecx, eax
lea eax, [ebp*2]
cmp eax, ecx
jg 0x4a5143
cmp ebp, 4
jne 0x4a5855
cmp edx, 0x29a
jne 0x4a5155
cmp dword [ebx + 4], 0
jne 0x4a5855
cmp edx, 0x2a
jne 0x4a5205
mov ecx, dword [edi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [edi + 0x88], 2
mov esi, ecx
jge 0x4a51a2
mov eax, dword [edi + 0x84]
cmp eax, 2
jl 0x4a51a2
cmp eax, 6
jge 0x4a518c
push 0x40
pop eax
push 0x60
jmp 0x4a51a6
jne 0x4a5198
mov eax, 0x80
lea edx, [eax + 0x20]
jmp 0x4a51a7
mov eax, 0xc0
lea edx, [eax + 0x20]
jmp 0x4a51a7
xor eax, eax
push 0x20
pop edx
or ecx, eax
cmp dword [edi + 0x6c], 0
je 0x4a51b3
mov ecx, esi
or ecx, edx
push 0x1f
mov eax, ecx
xor edx, edx
pop esi
div esi
push esi
sub ecx, edx
pop eax
lea edx, [eax + ecx]
mov ecx, edi
call fcn.004a4c20
cmp dword [edi + 0x6c], 0
je 0x4a51e6
movzx edx, word [ebx + 0x32]
mov ecx, edi
call fcn.004a4c20
movzx edx, word [ebx + 0x30]
mov ecx, edi
call fcn.004a4c20
mov dword [ebx + 0x30], 1
mov ecx, ebx
mov dword [edi + 4], 0x71
call fcn.004a4bd0
cmp dword [edi + 0x14], 0
jne 0x4a584d
mov eax, dword [edi + 4]
push 0x45
pop ebp
cmp eax, 0x39
jne 0x4a540c
and dword [ebx + 0x30], 0
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 8]
push 0x1f
pop edx
mov byte [ecx + eax], dl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], 0x8b
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], 8
inc dword [edi + 0x14]
mov edx, dword [edi + 0x1c]
mov esi, dword [edi + 0x14]
test edx, edx
jne 0x4a52e6
mov eax, dword [edi + 8]
push 9
mov byte [esi + eax], dl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], dl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], dl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], dl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], dl
inc dword [edi + 0x14]
mov eax, dword [edi + 0x84]
mov edx, dword [edi + 0x14]
pop ecx
cmp eax, ecx
jne 0x4a529c
mov cl, 2
jmp 0x4a52b0
cmp dword [edi + 0x88], 2
jge 0x4a52ae
cmp eax, 2
jl 0x4a52ae
xor cl, cl
jmp 0x4a52b0
mov cl, 4
mov eax, dword [edi + 8]
mov byte [edx + eax], cl
inc dword [edi + 0x14]
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
mov byte [ecx + eax], 0xa
mov ecx, ebx
inc dword [edi + 0x14]
mov dword [edi + 4], 0x71
call fcn.004a4bd0
cmp dword [edi + 0x14], 0
jne 0x4a584d
mov eax, dword [edi + 4]
jmp 0x4a540c
cmp dword [edx + 0x24], 0
push 9
sete cl
dec cl
and cl, 0x10
cmp dword [edx + 0x2c], 0
sete al
dec al
and al, 2
add cl, al
cmp dword [edx + 0x1c], 0
sete al
dec al
and al, 8
add cl, al
cmp dword [edx + 0x10], 0
sete al
dec al
and al, 4
add cl, al
cmp dword [edx], 0
setne al
add cl, al
mov eax, dword [edi + 8]
mov byte [esi + eax], cl
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 8]
mov al, byte [eax + 4]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 8]
mov al, byte [eax + 5]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [eax + 6]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [eax + 7]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov eax, dword [edi + 0x84]
mov edx, dword [edi + 0x14]
pop ecx
cmp eax, ecx
jne 0x4a5386
mov cl, 2
jmp 0x4a539a
cmp dword [edi + 0x88], 2
jge 0x4a5398
cmp eax, 2
jl 0x4a5398
xor cl, cl
jmp 0x4a539a
mov cl, 4
mov eax, dword [edi + 8]
mov byte [edx + eax], cl
inc dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [eax + 0xc]
mov byte [edx + ecx], al
mov eax, dword [edi + 0x1c]
inc dword [edi + 0x14]
mov esi, dword [edi + 0x14]
cmp dword [eax + 0x10], 0
je 0x4a53e5
mov al, byte [eax + 0x14]
mov ecx, dword [edi + 8]
mov byte [esi + ecx], al
inc dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [eax + 0x15]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov esi, dword [edi + 0x14]
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a5403
mov edx, dword [edi + 8]
test edx, edx
jne 0x4a53f6
xor eax, eax
jmp 0x4a5400
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
and dword [edi + 0x20], 0
mov eax, ebp
mov dword [edi + 4], ebp
cmp eax, ebp
jne 0x4a54f9
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x10], 0
je 0x4a54ef
movzx edx, word [eax + 0x14]
mov esi, dword [edi + 0x14]
mov ecx, esi
sub edx, dword [edi + 0x20]
lea eax, [esi + edx]
mov ebp, dword [edi + 0xc]
cmp eax, ebp
mov eax, dword [edi + 0x1c]
mov dword [esp + 0x14], edx
mov eax, dword [eax + 0x10]
jbe 0x4a54a5
add eax, dword [edi + 0x20]
sub ebp, ecx
push ebp
push eax
mov eax, dword [edi + 8]
add eax, ecx
push eax
call fcn.004171b0
mov eax, dword [edi + 0x1c]
add esp, 0xc
mov ecx, dword [edi + 0xc]
mov dword [edi + 0x14], ecx
cmp dword [eax + 0x2c], 0
je 0x4a5483
cmp ecx, esi
jbe 0x4a5483
mov edx, dword [edi + 8]
sub ecx, esi
add edx, esi
jne 0x4a5476
xor eax, eax
jmp 0x4a5480
push ecx
mov ecx, dword [ebx + 0x30]
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
add dword [edi + 0x20], ebp
mov ecx, ebx
call fcn.004a4bd0
mov ecx, dword [edi + 0x14]
test ecx, ecx
jne 0x4a584d
mov edx, dword [esp + 0x14]
xor esi, esi
sub edx, ebp
lea eax, [ecx + edx]
jmp 0x4a5430
mov ebp, dword [edi + 0x20]
add eax, ebp
push edx
push eax
mov eax, dword [edi + 8]
add eax, ecx
push eax
call fcn.004171b0
mov eax, dword [esp + 0x20]
add esp, 0xc
add dword [edi + 0x14], eax
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x14]
cmp dword [eax + 0x2c], 0
je 0x4a54eb
cmp ecx, esi
jbe 0x4a54eb
mov edx, dword [edi + 8]
sub ecx, esi
add edx, esi
jne 0x4a54de
xor eax, eax
jmp 0x4a54e8
push ecx
mov ecx, dword [ebx + 0x30]
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
and dword [edi + 0x20], 0
push 0x49
mov dword [edi + 4], 0x49
pop eax
cmp eax, 0x49
jne 0x4a55ac
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x4a55a2
mov ebp, dword [edi + 0x14]
mov esi, ebp
cmp esi, dword [edi + 0xc]
jne 0x4a5554
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a5540
cmp esi, ebp
jbe 0x4a5540
mov edx, dword [edi + 8]
sub esi, ebp
add edx, ebp
jne 0x4a5533
xor eax, eax
jmp 0x4a553d
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
mov ecx, ebx
call fcn.004a4bd0
mov esi, dword [edi + 0x14]
test esi, esi
jne 0x4a584d
xor ebp, ebp
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x20]
mov eax, dword [eax + 0x1c]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 8]
mov byte [esi + eax], dl
mov esi, dword [edi + 0x14]
inc esi
mov dword [edi + 0x14], esi
test dl, dl
jne 0x4a5514
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a559e
cmp esi, ebp
jbe 0x4a559e
mov edx, dword [edi + 8]
sub esi, ebp
add edx, ebp
jne 0x4a5591
xor eax, eax
jmp 0x4a559b
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
and dword [edi + 0x20], 0
push 0x5b
mov dword [edi + 4], 0x5b
pop eax
cmp eax, 0x5b
jne 0x4a565b
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x4a5651
mov ebp, dword [edi + 0x14]
mov esi, ebp
cmp esi, dword [edi + 0xc]
jne 0x4a5607
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a55f3
cmp esi, ebp
jbe 0x4a55f3
mov edx, dword [edi + 8]
sub esi, ebp
add edx, ebp
jne 0x4a55e6
xor eax, eax
jmp 0x4a55f0
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
mov ecx, ebx
call fcn.004a4bd0
mov esi, dword [edi + 0x14]
test esi, esi
jne 0x4a584d
xor ebp, ebp
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x20]
mov eax, dword [eax + 0x24]
mov dl, byte [ecx + eax]
lea eax, [ecx + 1]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 8]
mov byte [esi + eax], dl
mov esi, dword [edi + 0x14]
inc esi
mov dword [edi + 0x14], esi
test dl, dl
jne 0x4a55c7
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a5651
cmp esi, ebp
jbe 0x4a5651
mov edx, dword [edi + 8]
sub esi, ebp
add edx, ebp
jne 0x4a5644
xor eax, eax
jmp 0x4a564e
mov ecx, dword [ebx + 0x30]
push esi
call fcn.004a36e5
pop ecx
mov dword [ebx + 0x30], eax
push 0x67
mov dword [edi + 4], 0x67
pop eax
cmp eax, 0x67
jne 0x4a56bd
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4a56a5
mov edx, dword [edi + 0x14]
lea eax, [edx + 2]
cmp eax, dword [edi + 0xc]
jbe 0x4a5686
mov ecx, ebx
call fcn.004a4bd0
mov edx, dword [edi + 0x14]
test edx, edx
jne 0x4a584d
mov ecx, dword [edi + 8]
mov al, byte [ebx + 0x30]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [ebx + 0x31]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
and dword [ebx + 0x30], 0
mov ecx, ebx
mov dword [edi + 4], 0x71
call fcn.004a4bd0
cmp dword [edi + 0x14], 0
jne 0x4a584d
cmp dword [ebx + 4], 0
mov esi, dword [esp + 0x10]
jne 0x4a56e2
cmp dword [edi + 0x74], 0
jne 0x4a56e2
test esi, esi
je 0x4a577d
cmp dword [edi + 4], 0x29a
je 0x4a577d
mov ecx, dword [edi + 0x84]
test ecx, ecx
jne 0x4a56f5
push esi
push edi
call fcn.004a4440
jmp 0x4a5734
mov eax, dword [edi + 0x88]
cmp eax, 2
jne 0x4a570b
mov edx, esi
mov ecx, edi
call fcn.004a3990
jmp 0x4a5736
cmp eax, 3
jne 0x4a571b
mov edx, esi
mov ecx, edi
call fcn.004a3ae0
jmp 0x4a5736
imul eax, ecx, 0xc
push esi
push edi
mov esi, dword [eax + 0x4cf650]
mov ecx, esi
call dword [0x4b25a8]
call esi
mov esi, dword [esp + 0x18]
pop ecx
pop ecx
cmp eax, 2
je 0x4a5740
cmp eax, 3
jne 0x4a5747
mov dword [edi + 4], 0x29a
test eax, eax
je 0x4a5847
cmp eax, 2
je 0x4a5847
cmp eax, 1
jne 0x4a577d
push 0
push 0
xor edx, edx
mov ecx, edi
call fcn.004a7972
pop ecx
pop ecx
mov ecx, ebx
call fcn.004a4bd0
cmp dword [ebx + 0x10], 0
je 0x4a584d
cmp esi, 4
jne 0x4a5851
cmp dword [edi + 0x18], 0
jg 0x4a5794
xor eax, eax
inc eax
jmp 0x4a586c
cmp dword [edi + 0x18], 2
jne 0x4a5814
mov ecx, dword [edi + 0x14]
mov al, byte [ebx + 0x30]
mov edx, dword [edi + 8]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov al, byte [ebx + 0x31]
mov ecx, dword [edi + 8]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov al, byte [ebx + 0x32]
mov ecx, dword [edi + 8]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov al, byte [ebx + 0x33]
mov ecx, dword [edi + 8]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov al, byte [ebx + 8]
mov ecx, dword [edi + 8]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [ebx + 9]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [ebx + 0xa]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 8]
mov al, byte [ebx + 0xb]
mov byte [edx + ecx], al
inc dword [edi + 0x14]
jmp 0x4a582a
movzx edx, word [ebx + 0x32]
mov ecx, edi
call fcn.004a4c20
movzx edx, word [ebx + 0x30]
mov ecx, edi
call fcn.004a4c20
mov ecx, ebx
call fcn.004a4bd0
mov eax, dword [edi + 0x18]
test eax, eax
jle 0x4a583d
neg eax
mov dword [edi + 0x18], eax
xor eax, eax
cmp dword [edi + 0x14], eax
sete al
jmp 0x4a586c
cmp dword [ebx + 0x10], 0
jne 0x4a5851
or dword [edi + 0x28], 0xffffffff
xor eax, eax
jmp 0x4a586c
mov eax, dword [str.buffer_error]
mov dword [ebx + 0x18], eax
push 0xfffffffffffffffb
jmp 0x4a586b
mov eax, dword [str.stream_error]
mov dword [ebx + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret