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

Disassembly:
push ecx
push esi
push edi
mov edi, ecx
mov esi, dword [edi + 0x1c]
test esi, esi
je 0x52f8ab
cmp dword [edi + 0xc], 0
je 0x52f8a3
cmp dword [edi], 0
jne 0x52f159
cmp dword [edi + 4], 0
jne 0x52f8a3
cmp dword [edi + 0x10], 0
je 0x52f892
mov eax, dword [esi + 4]
mov dword [esi], edi
mov dword [esi + 0x28], 4
push ebx
push ebp
cmp eax, 0x2a
jne 0x52f415
cmp dword [esi + 0x18], 2
jne 0x52f371
mov dword [edi + 0x30], 0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
mov byte [ecx + eax], 0x1f
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 ebx, dword [esi + 0x14]
test edx, edx
jne 0x52f242
mov eax, dword [esi + 8]
mov byte [ebx + 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 + 0x84]
mov edx, dword [esi + 0x14]
cmp eax, 9
jne 0x52f20b
mov cl, 2
jmp 0x52f21f
cmp dword [esi + 0x88], 2
jge 0x52f21d
cmp eax, 2
jl 0x52f21d
xor cl, cl
jmp 0x52f21f
mov cl, 4
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], 0xb
mov eax, 0x71
inc dword [esi + 0x14]
mov dword [esi + 4], eax
jmp 0x52f415
mov ecx, dword [edx + 0x24]
mov eax, dword [edx + 0x2c]
neg ecx
sbb cl, cl
and cl, 0x10
neg eax
sbb al, al
and al, 2
add cl, al
mov eax, dword [edx + 0x1c]
neg eax
sbb al, al
and al, 8
add cl, al
mov eax, dword [edx + 0x10]
neg eax
sbb al, al
and al, 4
add cl, al
cmp dword [edx], 0
setne al
add cl, al
mov eax, dword [esi + 8]
mov byte [ebx + eax], cl
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
movzx eax, 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]
movzx eax, byte [eax + 5]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
movzx eax, 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]
movzx eax, byte [eax + 7]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x84]
mov edx, dword [esi + 0x14]
cmp eax, 9
jne 0x52f2dc
mov cl, 2
jmp 0x52f2f0
cmp dword [esi + 0x88], 2
jge 0x52f2ee
cmp eax, 2
jl 0x52f2ee
xor cl, cl
jmp 0x52f2f0
mov cl, 4
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 ebx, dword [esi + 0x14]
cmp dword [eax + 0x10], 0
je 0x52f33d
movzx eax, byte [eax + 0x14]
mov ecx, dword [esi + 8]
mov byte [ebx + ecx], al
inc dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
movzx eax, byte [eax + 0x15]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov ebx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f35d
mov edx, dword [esi + 8]
test edx, edx
jne 0x52f34e
xor eax, eax
jmp 0x52f35a
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
mov eax, 0x45
mov dword [esi + 0x20], 0
mov dword [esi + 4], eax
jmp 0x52f415
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], 2
mov ebx, ecx
jge 0x52f3b8
mov eax, dword [esi + 0x84]
cmp eax, 2
jl 0x52f3b8
cmp eax, 6
jge 0x52f3a2
mov eax, 0x40
lea edx, [eax + 0x20]
jmp 0x52f3bd
jne 0x52f3ae
mov eax, 0x80
lea edx, [eax + 0x20]
jmp 0x52f3bd
mov eax, 0xc0
lea edx, [eax + 0x20]
jmp 0x52f3bd
xor eax, eax
lea edx, [eax + 0x20]
or ecx, eax
cmp dword [esi + 0x6c], 0
je 0x52f3c9
mov ecx, edx
or ecx, ebx
mov eax, 0x8421085
mov dword [esi + 4], 0x71
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 4
inc ecx
mov edx, ecx
shl edx, 5
sub edx, ecx
mov ecx, esi
call fcn.0052f0b0
cmp dword [esi + 0x6c], 0
je 0x52f40b
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.0052f0b0
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.0052f0b0
mov dword [edi + 0x30], 1
mov eax, dword [esi + 4]
cmp eax, 0x45
jne 0x52f4e7
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], 0
je 0x52f4df
movzx eax, word [ecx + 0x14]
mov ebp, dword [esi + 0x14]
mov ebx, ebp
cmp dword [esi + 0x20], eax
jae 0x52f4a4
lea esp, [esp]
cmp ebx, dword [esi + 0xc]
jne 0x52f47c
cmp dword [ecx + 0x2c], 0
je 0x52f46b
cmp ebx, ebp
jbe 0x52f46b
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f45c
xor eax, eax
jmp 0x52f468
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.0052f0e0
mov ebx, dword [esi + 0x14]
mov ebp, ebx
cmp ebx, dword [esi + 0xc]
je 0x52f4a4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 8]
mov edx, dword [eax + 0x10]
mov eax, dword [esi + 0x20]
mov al, byte [edx + eax]
mov byte [ebx + ecx], al
mov ebx, dword [esi + 0x14]
inc dword [esi + 0x20]
inc ebx
mov dword [esi + 0x14], ebx
mov ecx, dword [esi + 0x1c]
movzx eax, word [ecx + 0x14]
cmp dword [esi + 0x20], eax
jb 0x52f440
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], 0
je 0x52f4d0
cmp ebx, ebp
jbe 0x52f4d0
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f4be
xor eax, eax
jmp 0x52f4ca
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
cmp eax, dword [ecx + 0x14]
jne 0x52f521
mov dword [esi + 0x20], 0
mov eax, 0x49
mov dword [esi + 4], eax
cmp eax, 0x49
jne 0x52f5bc
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x52f5b4
mov ebp, dword [esi + 0x14]
mov ebx, ebp
cmp ebx, dword [esi + 0xc]
jne 0x52f546
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f535
cmp ebx, ebp
jbe 0x52f535
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f526
xor eax, eax
jmp 0x52f532
mov eax, dword [esi + 4]
jmp 0x52f4e7
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.0052f0e0
mov ebx, dword [esi + 0x14]
mov ebp, ebx
cmp ebx, dword [esi + 0xc]
je 0x52f575
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x1c]
mov dl, byte [ecx + eax]
movzx eax, dl
mov dword [esp + 0x10], 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
cmp dword [esp + 0x10], 0
mov dword [esi + 0x14], ebx
jne 0x52f502
jmp 0x52f57d
mov dword [esp + 0x10], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f5a6
cmp ebx, ebp
jbe 0x52f5a6
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f597
xor eax, eax
jmp 0x52f5a3
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
cmp dword [esp + 0x10], 0
jne 0x52f5f6
mov dword [esi + 0x20], 0
mov eax, 0x5b
mov dword [esi + 4], eax
cmp eax, 0x5b
jne 0x52f68f
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x52f687
mov ebp, dword [esi + 0x14]
mov ebx, ebp
cmp ebx, dword [esi + 0xc]
jne 0x52f61b
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f60a
cmp ebx, ebp
jbe 0x52f60a
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f5fb
xor eax, eax
jmp 0x52f607
mov eax, dword [esi + 4]
jmp 0x52f5bc
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.0052f0e0
mov ebx, dword [esi + 0x14]
mov ebp, ebx
cmp ebx, dword [esi + 0xc]
je 0x52f64a
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
mov eax, dword [eax + 0x24]
mov dl, byte [ecx + eax]
movzx eax, dl
mov dword [esp + 0x10], 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
cmp dword [esp + 0x10], 0
mov dword [esi + 0x14], ebx
jne 0x52f5d7
jmp 0x52f652
mov dword [esp + 0x10], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f67b
cmp ebx, ebp
jbe 0x52f67b
mov edx, dword [esi + 8]
sub ebx, ebp
add edx, ebp
jne 0x52f66c
xor eax, eax
jmp 0x52f678
mov ecx, dword [edi + 0x30]
push ebx
call fcn.0052eae0
add esp, 4
mov dword [edi + 0x30], eax
cmp dword [esp + 0x10], 0
je 0x52f687
mov eax, dword [esi + 4]
jmp 0x52f68f
mov eax, 0x67
mov dword [esi + 4], eax
pop ebp
pop ebx
cmp eax, 0x67
jne 0x52f6eb
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x52f6e4
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0xc]
lea eax, [edx + 2]
cmp eax, ecx
jbe 0x52f6b9
mov ecx, edi
call fcn.0052f0e0
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0xc]
lea eax, [edx + 2]
cmp eax, ecx
ja 0x52f6eb
mov ecx, dword [esi + 8]
movzx eax, byte [edi + 0x30]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
movzx eax, byte [edi + 0x31]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov dword [edi + 0x30], 0
mov dword [esi + 4], 0x71
cmp dword [esi + 0x14], 0
je 0x52f702
mov ecx, edi
call fcn.0052f0e0
cmp dword [edi + 0x10], 0
je 0x52f885
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x52f716
cmp dword [edi + 4], 0
jne 0x52f892
cmp dword [edi + 4], 0
jne 0x52f72d
cmp dword [esi + 0x74], 0
jne 0x52f72d
cmp eax, 0x29a
je 0x52f7af
mov eax, dword [esi + 0x88]
cmp eax, 2
jne 0x52f741
mov ecx, esi
call fcn.00530950
jmp 0x52f767
cmp eax, 3
jne 0x52f74f
mov ecx, esi
call fcn.005306d0
jmp 0x52f767
mov eax, dword [esi + 0x84]
push 4
push esi
lea eax, [eax + eax*2]
mov eax, dword [eax*4 + 0x5e7f88]
call eax
add esp, 8
cmp eax, 2
je 0x52f771
cmp eax, 3
jne 0x52f778
mov dword [esi + 4], 0x29a
test eax, eax
je 0x52f87f
cmp eax, 2
je 0x52f87f
cmp eax, 1
jne 0x52f7af
push 0
push 0
xor edx, edx
mov ecx, esi
call fcn.00531980
add esp, 8
mov ecx, edi
call fcn.0052f0e0
cmp dword [edi + 0x10], 0
je 0x52f885
mov eax, dword [esi + 0x18]
test eax, eax
jg 0x52f7bf
pop edi
mov eax, 1
pop esi
pop ecx
ret
cmp eax, 2
jne 0x52f84a
mov edx, dword [esi + 0x14]
movzx eax, byte [edi + 0x30]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
movzx eax, byte [edi + 0x31]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
movzx eax, byte [edi + 0x32]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
movzx eax, byte [edi + 0x33]
mov ecx, dword [esi + 8]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
movzx eax, 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]
movzx eax, byte [edi + 9]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
movzx eax, byte [edi + 0xa]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 8]
movzx eax, byte [edi + 0xb]
mov byte [edx + ecx], al
inc dword [esi + 0x14]
jmp 0x52f860
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.0052f0b0
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.0052f0b0
mov ecx, edi
call fcn.0052f0e0
mov eax, dword [esi + 0x18]
test eax, eax
jle 0x52f873
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], eax
pop edi
sete al
pop esi
pop ecx
ret
cmp dword [edi + 0x10], 0
jne 0x52f88c
mov dword [esi + 0x28], 0xffffffff
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
mov eax, 0xfffffffb
pop edi
pop esi
pop ecx
ret
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
pop edi
mov eax, 0xfffffffe
pop esi
pop ecx
ret