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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
je 0x54c147
mov esi, dword [edi + 0x1c]
cmp esi, ebx
je 0x54c147
mov ecx, dword [ebp + 0xc]
cmp ecx, 4
jg 0x54c147
cmp ecx, ebx
jl 0x54c147
cmp dword [edi + 0xc], ebx
je 0x54c13f
cmp dword [edi], ebx
jne 0x54ba06
cmp dword [edi + 4], ebx
jne 0x54c13f
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x54ba19
cmp ecx, 4
jne 0x54c13f
cmp dword [edi + 0x10], ebx
je 0x54bfa4
mov edx, dword [esi + 0x28]
cmp eax, 0x2a
mov dword [esi], edi
mov dword [ebp - 8], edx
mov dword [esi + 0x28], ecx
jne 0x54bcc0
cmp dword [esi + 0x18], 2
jne 0x54bc2a
push ebx
push ebx
push ebx
call fcn.00541e9e
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 [eax + ecx], 0x8b
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 8
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, ebx
jne 0x54bb05
mov eax, dword [esi + 8]
mov byte [ecx + eax], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], bl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x54bace
push 2
jmp 0x54bae2
cmp dword [esi + 0x88], 2
jge 0x54bae0
cmp eax, 2
jl 0x54bae0
xor eax, eax
jmp 0x54bae3
push 4
pop eax
mov edx, dword [esi + 8]
mov byte [ecx + edx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov byte [eax + ecx], 0xb
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
jmp 0x54bcc0
cmp dword [eax + 0x24], ebx
sete dl
dec dl
and edx, 0x10
cmp dword [eax + 0x2c], ebx
sete bl
dec bl
and ebx, 2
add dl, bl
cmp dword [eax + 0x1c], 0
sete bl
dec bl
and ebx, 8
add dl, bl
cmp dword [eax + 0x10], 0
sete bl
dec bl
and ebx, 4
add dl, bl
xor ebx, ebx
cmp dword [eax], ebx
setne al
add dl, al
mov eax, dword [esi + 8]
mov byte [ecx + eax], 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 [eax + edx], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 5]
mov byte [eax + edx], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 6]
mov byte [eax + edx], cl
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 7]
mov byte [eax + edx], cl
mov eax, dword [esi + 0x84]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp eax, 9
jne 0x54bba5
push 2
jmp 0x54bbb9
cmp dword [esi + 0x88], 2
jge 0x54bbb7
cmp eax, 2
jl 0x54bbb7
xor eax, eax
jmp 0x54bbba
push 4
pop eax
mov edx, dword [esi + 8]
mov byte [ecx + edx], 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 [eax + edx], cl
mov eax, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
cmp dword [eax + 0x10], ebx
je 0x54bc01
mov edx, dword [esi + 8]
mov al, byte [eax + 0x14]
mov byte [ecx + edx], al
mov ecx, dword [esi + 0x1c]
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov cl, byte [ecx + 0x15]
mov byte [eax + edx], cl
inc dword [esi + 0x14]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x54bc1b
push ecx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x45
jmp 0x54bcc0
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], 2
jge 0x54bc62
mov eax, dword [esi + 0x84]
cmp eax, 2
jl 0x54bc62
cmp eax, 6
jge 0x54bc54
xor eax, eax
inc eax
jmp 0x54bc64
xor edx, edx
cmp eax, 6
setne dl
inc edx
inc edx
mov eax, edx
jmp 0x54bc64
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], ebx
je 0x54bc71
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.0054c14f
xor ebx, ebx
pop ecx
cmp dword [esi + 0x6c], ebx
pop ecx
je 0x54bcb2
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.0054c14f
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.0054c14f
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.0054fdd8
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x54bd91
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], ebx
je 0x54bd8a
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x14]
and eax, 0xffff
cmp dword [esi + 0x20], eax
jae 0x54bd53
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x54bd26
cmp dword [ecx + 0x2c], ebx
je 0x54bd14
cmp eax, dword [ebp + 8]
jbe 0x54bd14
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0054c179
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x54bd53
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 [eax + ebx], 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
xor ebx, ebx
cmp eax, edx
jb 0x54bce9
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x54bd7c
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x54bd7c
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp ecx, dword [eax + 0x14]
jne 0x54bd91
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x54be4f
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], ebx
je 0x54be48
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x54bded
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x54bddb
cmp eax, dword [ebp + 8]
jbe 0x54bddb
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0054c179
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x54be10
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov edx, dword [edx + 0x1c]
movzx edx, byte [edx + ecx]
inc ecx
mov dword [ebp - 4], edx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
cmp edx, ebx
jne 0x54bdad
jmp 0x54be17
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x54be40
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x54be40
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x54be4f
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x54bf0a
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], ebx
je 0x54bf03
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x54beab
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x54be99
cmp eax, dword [ebp + 8]
jbe 0x54be99
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0054c179
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x54bece
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov edx, dword [edx + 0x24]
movzx edx, byte [edx + ecx]
inc ecx
mov dword [ebp - 4], edx
mov dword [esi + 0x20], ecx
mov ecx, dword [esi + 8]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
cmp edx, ebx
jne 0x54be6b
jmp 0x54bed5
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x54befe
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x54befe
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.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x54bf0a
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x54bf64
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x54bf5d
mov eax, dword [esi + 0x14]
inc eax
inc eax
cmp eax, dword [esi + 0xc]
jbe 0x54bf29
push edi
call fcn.0054c179
pop ecx
mov eax, dword [esi + 0x14]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0xc]
ja 0x54bf64
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x30]
push ebx
push ebx
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x31]
push ebx
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
call fcn.00541e9e
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x71
cmp dword [esi + 0x14], ebx
je 0x54bf7e
push edi
call fcn.0054c179
cmp dword [edi + 0x10], ebx
pop ecx
jne 0x54bf92
or dword [esi + 0x28], 0xffffffff
jmp 0x54c062
cmp dword [edi + 4], ebx
jne 0x54bf92
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 8]
jg 0x54bf95
cmp ecx, 4
je 0x54bf95
jmp 0x54bfa4
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x54bfb3
cmp dword [edi + 4], ebx
je 0x54bfb8
mov eax, dword [str.buffer_error]
push 0xfffffffffffffffb
mov dword [edi + 0x18], eax
jmp 0x54c149
cmp dword [edi + 4], ebx
jne 0x54bfd0
cmp dword [esi + 0x74], ebx
jne 0x54bfd0
cmp ecx, ebx
je 0x54c05c
cmp eax, 0x29a
je 0x54c05c
mov eax, dword [esi + 0x84]
push dword [ebp + 0xc]
lea eax, [eax + eax*2]
push esi
call dword [eax*4 + 0x6272c8]
pop ecx
cmp eax, 2
pop ecx
je 0x54bff0
cmp eax, 3
jne 0x54bff7
mov dword [esi + 4], 0x29a
cmp eax, ebx
je 0x54c131
cmp eax, 2
je 0x54c131
cmp eax, 1
jne 0x54c05c
cmp dword [ebp + 0xc], eax
jne 0x54c01b
push esi
call fcn.0055130c
pop ecx
jmp 0x54c04c
push ebx
push ebx
push ebx
push esi
call fcn.0055127e
add esp, 0x10
cmp dword [ebp + 0xc], 3
jne 0x54c04c
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x44]
mov word [ecx + eax*2 - 2], bx
mov eax, dword [esi + 0x4c]
lea eax, [eax + eax - 2]
push eax
push ebx
push dword [esi + 0x44]
call fcn.005d2100
add esp, 0xc
push edi
call fcn.0054c179
cmp dword [edi + 0x10], ebx
pop ecx
je 0x54bf75
cmp dword [ebp + 0xc], 4
je 0x54c069
xor eax, eax
jmp 0x54c14a
mov eax, dword [esi + 0x18]
cmp eax, ebx
jg 0x54c078
xor eax, eax
inc eax
jmp 0x54c14a
cmp eax, 2
jne 0x54c0f7
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
mov dl, byte [edi + 0x30]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x31]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x32]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0x33]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 8]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 9]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0xa]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 8]
mov dl, byte [edi + 0xb]
mov byte [eax + ecx], dl
inc dword [esi + 0x14]
jmp 0x54c114
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.0054c14f
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.0054c14f
add esp, 0x10
push edi
call fcn.0054c179
mov eax, dword [esi + 0x18]
pop ecx
cmp eax, ebx
jle 0x54c127
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], ebx
sete al
jmp 0x54c14a
cmp dword [edi + 0x10], ebx
jne 0x54c062
jmp 0x54bf75
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret