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

Disassembly:
push ebx
mov ebx, esp
push ecx
push ecx
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov dword [ebp - 4], edx
mov edi, ecx
call fcn.004b5dde
test eax, eax
jne 0x4b67cb
cmp edx, 5
ja 0x4b67cb
mov esi, dword [edi + 0x1c]
cmp dword [edi + 0xc], eax
je 0x4b67c3
cmp dword [edi + 4], eax
je 0x4b5f54
cmp dword [edi], eax
je 0x4b67c3
cmp dword [esi + 4], 0x29a
jne 0x4b5f66
cmp edx, 4
jne 0x4b67c3
cmp dword [edi + 0x10], eax
jne 0x4b5f7a
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffb
jmp 0x4b67cd
mov ecx, dword [esi + 0x28]
push 9
mov dword [esi + 0x28], edx
pop edx
mov dword [ebp - 0x10], edx
cmp dword [esi + 0x14], eax
je 0x4b5fa3
mov ecx, edi
call fcn.004b5ebf
cmp dword [edi + 0x10], 0
jne 0x4b5fcf
or dword [esi + 0x28], 0xffffffff
xor eax, eax
jmp 0x4b67ce
cmp dword [edi + 4], eax
jne 0x4b5fcf
xor eax, eax
cmp ecx, 4
cmovg eax, edx
lea edx, [ecx + ecx]
sub edx, eax
xor ecx, ecx
mov eax, dword [ebp - 4]
cmp eax, 4
cmovg ecx, dword [ebp - 0x10]
add eax, eax
sub eax, ecx
cmp eax, edx
jg 0x4b5fcf
cmp dword [ebp - 4], 4
jne 0x4b5f6b
cmp dword [esi + 4], 0x29a
jne 0x4b5fde
cmp dword [edi + 4], 0
jne 0x4b5f6b
cmp dword [esi + 4], 0x2a
push 0x1f
pop edx
mov dword [ebp - 0x10], edx
jne 0x4b6090
mov ecx, dword [esi + 0x84]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0xdc], 2
jge 0x4b6023
mov edx, dword [esi + 0xd8]
cmp edx, 2
jl 0x4b6023
xor eax, eax
cmp edx, 6
jge 0x4b601b
inc eax
jmp 0x4b6025
setne al
add eax, 2
jmp 0x4b6025
xor eax, eax
shl eax, 6
or eax, ecx
mov ecx, eax
or ecx, 0x20
cmp dword [esi + 0xc0], 0
push 0x1f
cmove ecx, eax
xor edx, edx
mov eax, ecx
div dword [ebp - 0x10]
pop eax
sub ecx, edx
lea edx, [eax + ecx]
mov ecx, esi
call fcn.004b5e9b
cmp dword [esi + 0xc0], 0
je 0x4b606e
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.004b5e9b
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.004b5e9b
mov dword [edi + 0x30], 1
mov ecx, edi
mov dword [esi + 4], 0x71
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
push 0x1f
pop edx
cmp dword [esi + 4], 0x39
jne 0x4b62c4
cmp dword [0x51eee8], 0
je 0x4b60c7
movups xmm1, xmmword [esi + 0x70]
mov eax, 0x9db42487
movd xmm0, eax
movups xmmword [esi + 0x30], xmm0
xorps xmm0, xmm0
movups xmmword [esi + 0x40], xmm0
movups xmmword [esi + 0x50], xmm0
movups xmmword [esi + 0x60], xmm0
movups xmmword [esi + 0x70], xmm1
mov eax, dword [esi]
and dword [eax + 0x30], 0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
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
inc dword [esi + 0x14]
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
test edx, edx
jne 0x4b6196
mov eax, dword [esi + 8]
push 9
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0xd8]
mov edx, dword [esi + 0x14]
pop ecx
cmp eax, ecx
jne 0x4b614e
push 2
jmp 0x4b6162
cmp dword [esi + 0xdc], 2
jge 0x4b6160
cmp eax, 2
jl 0x4b6160
xor ecx, ecx
jmp 0x4b6163
push 4
pop ecx
mov eax, dword [esi + 8]
mov byte [edx + eax], cl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], 0xa
mov ecx, edi
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
je 0x4b62c4
jmp 0x4b5f98
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
mov edx, dword [esi + 0x14]
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
inc dword [esi + 0x14]
mov eax, dword [esi + 0xd8]
mov edx, dword [esi + 0x14]
pop ecx
cmp eax, ecx
jne 0x4b6239
push 2
jmp 0x4b624d
cmp dword [esi + 0xdc], 2
jge 0x4b624b
cmp eax, 2
jl 0x4b624b
xor ecx, ecx
jmp 0x4b624e
push 4
pop ecx
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 eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
cmp dword [eax + 0x10], 0
je 0x4b6296
mov ecx, dword [esi + 8]
mov al, byte [eax + 0x14]
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], 0
je 0x4b62b9
cmp dword [esi + 8], 0
jne 0x4b62a9
xor eax, eax
jmp 0x4b62b6
mov ecx, dword [edi + 0x30]
push edx
mov edx, dword [esi + 8]
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
and dword [esi + 0x20], 0
mov dword [esi + 4], 0x45
cmp dword [esi + 4], 0x45
jne 0x4b63c5
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], 0
je 0x4b63be
movzx ecx, word [ecx + 0x14]
mov eax, dword [esi + 0x14]
sub ecx, dword [esi + 0x20]
jmp 0x4b6359
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 0x14]
push eax
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + 0x10]
add eax, dword [esi + 0x20]
push eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x14]
push eax
call fcn.004cd490
mov eax, dword [esi + 0x1c]
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], ecx
cmp dword [eax + 0x2c], 0
je 0x4b633a
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jbe 0x4b633a
mov edx, dword [esi + 8]
sub ecx, eax
add edx, eax
jne 0x4b632d
xor eax, eax
jmp 0x4b6337
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0x10]
mov ecx, edi
add dword [esi + 0x20], eax
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
mov ecx, dword [ebp - 8]
xor eax, eax
sub ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x14]
add eax, ecx
mov dword [ebp - 8], ecx
cmp eax, dword [esi + 0xc]
ja 0x4b62e7
mov eax, dword [esi + 0x1c]
push ecx
mov eax, dword [eax + 0x10]
add eax, dword [esi + 0x20]
push eax
mov eax, dword [esi + 0x14]
add eax, dword [esi + 8]
push eax
call fcn.004cd490
mov eax, dword [ebp - 8]
add esp, 0xc
add dword [esi + 0x14], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
cmp dword [eax + 0x2c], 0
je 0x4b63ba
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jbe 0x4b63ba
mov edx, dword [esi + 8]
sub ecx, eax
add edx, eax
jne 0x4b63ad
xor eax, eax
jmp 0x4b63b7
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
and dword [esi + 0x20], 0
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x4b6489
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x4b6482
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0xc], ecx
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4b6429
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b6414
mov eax, dword [esi + 0x14]
cmp eax, ecx
jbe 0x4b6414
mov edx, dword [esi + 8]
sub eax, ecx
add edx, ecx
jne 0x4b6407
xor eax, eax
jmp 0x4b6411
mov ecx, dword [edi + 0x30]
push eax
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
and dword [ebp - 0xc], 0
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x1c]
movzx edx, byte [eax + ecx]
lea eax, [ecx + 1]
mov ecx, dword [esi + 8]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x14]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
test edx, edx
je 0x4b6454
mov ecx, dword [ebp - 0xc]
jmp 0x4b63e2
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b647e
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jbe 0x4b647e
mov edx, dword [esi + 8]
sub ecx, eax
add edx, eax
jne 0x4b6471
xor eax, eax
jmp 0x4b647b
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
and dword [esi + 0x20], 0
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x4b6549
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x4b6542
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0xc], ecx
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4b64ed
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b64d8
mov eax, dword [esi + 0x14]
cmp eax, ecx
jbe 0x4b64d8
mov edx, dword [esi + 8]
sub eax, ecx
add edx, ecx
jne 0x4b64cb
xor eax, eax
jmp 0x4b64d5
mov ecx, dword [edi + 0x30]
push eax
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
and dword [ebp - 0xc], 0
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x24]
movzx edx, byte [eax + ecx]
lea eax, [ecx + 1]
mov ecx, dword [esi + 8]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x14]
mov byte [ecx + eax], dl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
test edx, edx
je 0x4b6518
mov ecx, dword [ebp - 0xc]
jmp 0x4b64a6
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b6542
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jbe 0x4b6542
mov edx, dword [esi + 8]
sub ecx, eax
add edx, eax
jne 0x4b6535
xor eax, eax
jmp 0x4b653f
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004873b5
pop ecx
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x4b65ae
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b6596
mov eax, dword [esi + 0x14]
add eax, 2
cmp eax, dword [esi + 0xc]
jbe 0x4b6574
mov ecx, edi
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 0x30]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov al, byte [edi + 0x31]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
and dword [edi + 0x30], 0
mov ecx, edi
mov dword [esi + 4], 0x71
call fcn.004b5ebf
cmp dword [esi + 0x14], 0
jne 0x4b5f98
cmp dword [edi + 4], 0
mov ecx, dword [ebp - 4]
jne 0x4b65d5
cmp dword [esi + 0xc8], 0
jne 0x4b65d5
test ecx, ecx
je 0x4b66d1
cmp dword [esi + 4], 0x29a
je 0x4b66d1
mov edx, dword [esi + 0xd8]
test edx, edx
jne 0x4b65e8
push ecx
push esi
call fcn.004b6d40
jmp 0x4b6619
mov eax, dword [esi + 0xdc]
cmp eax, 2
jne 0x4b65fe
mov edx, ecx
mov ecx, esi
call fcn.004b7dc4
jmp 0x4b661b
cmp eax, 3
jne 0x4b660e
mov edx, ecx
mov ecx, esi
call fcn.004b7af1
jmp 0x4b661b
imul eax, edx, 0xc
push ecx
push esi
call dword [eax + 0x4fef38]
pop ecx
pop ecx
cmp eax, 2
je 0x4b6625
cmp eax, 3
jne 0x4b662c
mov dword [esi + 4], 0x29a
test eax, eax
je 0x4b67b4
cmp eax, 2
je 0x4b67b4
cmp eax, 1
jne 0x4b66ce
mov eax, dword [ebp - 4]
cmp eax, 1
jne 0x4b6657
mov ecx, esi
call fcn.004b90cb
jmp 0x4b66bd
cmp eax, 5
je 0x4b66bd
push 0
push 0
xor edx, edx
mov ecx, esi
call fcn.004b8fe7
cmp dword [ebp - 4], 3
pop ecx
pop ecx
jne 0x4b66bd
mov eax, dword [esi + 0x98]
xor edx, edx
mov ecx, dword [esi + 0xa0]
mov word [eax + ecx*2 - 2], dx
mov eax, dword [esi + 0xa0]
lea eax, [eax*2 - 2]
push eax
push edx
push dword [esi + 0x98]
call fcn.004cda10
xor eax, eax
add esp, 0xc
cmp dword [esi + 0xc8], eax
jne 0x4b66bd
mov dword [esi + 0xc0], eax
mov dword [esi + 0xb0], eax
mov dword [esi + 0x1708], eax
mov ecx, edi
call fcn.004b5ebf
cmp dword [edi + 0x10], 0
je 0x4b5f98
mov ecx, dword [ebp - 4]
cmp ecx, 4
jne 0x4b5f9c
cmp dword [esi + 0x18], 0
jg 0x4b66e8
xor eax, eax
inc eax
jmp 0x4b67ce
cmp dword [esi + 0x18], 2
jne 0x4b6781
cmp dword [0x51eee8], 0
je 0x4b6707
mov ecx, esi
call fcn.00487b7a
mov ecx, dword [esi]
mov dword [ecx + 0x30], eax
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 0x4b6797
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.004b5e9b
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.004b5e9b
mov ecx, edi
call fcn.004b5ebf
mov eax, dword [esi + 0x18]
test eax, eax
jle 0x4b67aa
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], eax
sete al
jmp 0x4b67ce
cmp dword [edi + 0x10], 0
jne 0x4b5f9c
jmp 0x4b5f98
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret