Function at 0x4fa3de
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 0x4fab69
mov esi, dword [edi + 0x1c]
cmp esi, ebx
je 0x4fab69
mov ecx, dword [ebp + 0xc]
cmp ecx, 4
jg 0x4fab69
cmp ecx, ebx
jl 0x4fab69
cmp dword [edi + 0xc], ebx
je 0x4fab61
cmp dword [edi], ebx
jne 0x4fa428
cmp dword [edi + 4], ebx
jne 0x4fab61
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x4fa43b
cmp ecx, 4
jne 0x4fab61
cmp dword [edi + 0x10], ebx
je 0x4fa9c6
mov edx, dword [esi + 0x28]
cmp eax, 0x2a
mov dword [esi], edi
mov dword [ebp - 8], edx
mov dword [esi + 0x28], ecx
jne 0x4fa6e2
cmp dword [esi + 0x18], 2
jne 0x4fa64c
push ebx
push ebx
push ebx
call fcn.004f090c
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 0x4fa527
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 0x4fa4f0
push 2
jmp 0x4fa504
cmp dword [esi + 0x88], 2
jge 0x4fa502
cmp eax, 2
jl 0x4fa502
xor eax, eax
jmp 0x4fa505
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 0x4fa6e2
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 0x4fa5c7
push 2
jmp 0x4fa5db
cmp dword [esi + 0x88], 2
jge 0x4fa5d9
cmp eax, 2
jl 0x4fa5d9
xor eax, eax
jmp 0x4fa5dc
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 0x4fa623
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 0x4fa63d
push ecx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x45
jmp 0x4fa6e2
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], 2
jge 0x4fa684
mov eax, dword [esi + 0x84]
cmp eax, 2
jl 0x4fa684
cmp eax, 6
jge 0x4fa676
xor eax, eax
inc eax
jmp 0x4fa686
xor edx, edx
cmp eax, 6
setne dl
inc edx
inc edx
mov eax, edx
jmp 0x4fa686
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], ebx
je 0x4fa693
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.004fab71
xor ebx, ebx
pop ecx
cmp dword [esi + 0x6c], ebx
pop ecx
je 0x4fa6d4
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.004fab71
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.004fab71
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.004fe7ef
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x4fa7b3
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], ebx
je 0x4fa7ac
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x14]
and eax, 0xffff
cmp dword [esi + 0x20], eax
jae 0x4fa775
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4fa748
cmp dword [ecx + 0x2c], ebx
je 0x4fa736
cmp eax, dword [ebp + 8]
jbe 0x4fa736
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.004fab9b
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x4fa775
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 0x4fa70b
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x4fa79e
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x4fa79e
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp ecx, dword [eax + 0x14]
jne 0x4fa7b3
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x4fa871
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], ebx
je 0x4fa86a
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4fa80f
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x4fa7fd
cmp eax, dword [ebp + 8]
jbe 0x4fa7fd
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.004fab9b
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x4fa832
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 0x4fa7cf
jmp 0x4fa839
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x4fa862
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x4fa862
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x4fa871
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x4fa92c
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], ebx
je 0x4fa925
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4fa8cd
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x4fa8bb
cmp eax, dword [ebp + 8]
jbe 0x4fa8bb
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.004fab9b
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x4fa8f0
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 0x4fa88d
jmp 0x4fa8f7
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x4fa920
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x4fa920
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x4fa92c
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x4fa986
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x4fa97f
mov eax, dword [esi + 0x14]
inc eax
inc eax
cmp eax, dword [esi + 0xc]
jbe 0x4fa94b
push edi
call fcn.004fab9b
pop ecx
mov eax, dword [esi + 0x14]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0xc]
ja 0x4fa986
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.004f090c
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x71
cmp dword [esi + 0x14], ebx
je 0x4fa9a0
push edi
call fcn.004fab9b
cmp dword [edi + 0x10], ebx
pop ecx
jne 0x4fa9b4
or dword [esi + 0x28], 0xffffffff
jmp 0x4faa84
cmp dword [edi + 4], ebx
jne 0x4fa9b4
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 8]
jg 0x4fa9b7
cmp ecx, 4
je 0x4fa9b7
jmp 0x4fa9c6
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x4fa9d5
cmp dword [edi + 4], ebx
je 0x4fa9da
mov eax, dword [str.buffer_error]
push 0xfffffffffffffffb
mov dword [edi + 0x18], eax
jmp 0x4fab6b
cmp dword [edi + 4], ebx
jne 0x4fa9f2
cmp dword [esi + 0x74], ebx
jne 0x4fa9f2
cmp ecx, ebx
je 0x4faa7e
cmp eax, 0x29a
je 0x4faa7e
mov eax, dword [esi + 0x84]
push dword [ebp + 0xc]
lea eax, [eax + eax*2]
push esi
call dword [eax*4 + 0x5c9cf8]
pop ecx
cmp eax, 2
pop ecx
je 0x4faa12
cmp eax, 3
jne 0x4faa19
mov dword [esi + 4], 0x29a
cmp eax, ebx
je 0x4fab53
cmp eax, 2
je 0x4fab53
cmp eax, 1
jne 0x4faa7e
cmp dword [ebp + 0xc], eax
jne 0x4faa3d
push esi
call fcn.004ffd2e
pop ecx
jmp 0x4faa6e
push ebx
push ebx
push ebx
push esi
call fcn.004ffca0
add esp, 0x10
cmp dword [ebp + 0xc], 3
jne 0x4faa6e
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.005803a0
add esp, 0xc
push edi
call fcn.004fab9b
cmp dword [edi + 0x10], ebx
pop ecx
je 0x4fa997
cmp dword [ebp + 0xc], 4
je 0x4faa8b
xor eax, eax
jmp 0x4fab6c
mov eax, dword [esi + 0x18]
cmp eax, ebx
jg 0x4faa9a
xor eax, eax
inc eax
jmp 0x4fab6c
cmp eax, 2
jne 0x4fab19
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 0x4fab36
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.004fab71
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.004fab71
add esp, 0x10
push edi
call fcn.004fab9b
mov eax, dword [esi + 0x18]
pop ecx
cmp eax, ebx
jle 0x4fab49
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], ebx
sete al
jmp 0x4fab6c
cmp dword [edi + 0x10], ebx
jne 0x4faa84
jmp 0x4fa997
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret