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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push edi
mov edi, ecx
test edi, edi
je 0x4b416a
cmp dword [edi + 0x20], 0
je 0x4b416a
cmp dword [edi + 0x24], 0
je 0x4b416a
mov esi, dword [edi + 0x1c]
test esi, esi
je 0x4b416a
cmp dword [esi], edi
jne 0x4b416a
mov eax, dword [esi + 4]
cmp eax, 0x2a
je 0x4b39aa
cmp eax, 0x39
je 0x4b39aa
cmp eax, 0x45
je 0x4b39aa
cmp eax, 0x49
je 0x4b39aa
cmp eax, 0x5b
je 0x4b39aa
cmp eax, 0x67
je 0x4b39aa
cmp eax, 0x71
je 0x4b39aa
cmp eax, 0x29a
jne 0x4b416a
cmp dword [edi + 0xc], 0
je 0x4b4162
cmp dword [edi + 4], 0
je 0x4b39c3
cmp dword [edi], 0
je 0x4b4162
cmp dword [edi + 0x10], 0
jne 0x4b39dc
mov eax, dword [str.buffer_error]
mov dword [edi + 0x18], eax
mov eax, 0xfffffffb
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x14], 0
mov dword [esi + 0x28], 4
je 0x4b3a03
call fcn.004b38f0
cmp dword [edi + 0x10], 0
jne 0x4b3a03
pop edi
mov dword [esi + 0x28], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x4b3a13
cmp dword [edi + 4], 0
jne 0x4b39c9
cmp eax, 0x2a
jne 0x4b3ac2
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], 2
jge 0x4b3a55
mov edx, dword [esi + 0x84]
cmp edx, 2
jl 0x4b3a55
cmp edx, 6
jge 0x4b3a48
mov eax, 1
jmp 0x4b3a57
xor eax, eax
cmp edx, 6
setne al
add eax, 2
jmp 0x4b3a57
xor eax, eax
shl eax, 6
or eax, ecx
mov ecx, eax
or ecx, 0x20
cmp dword [esi + 0x6c], 0
cmove ecx, eax
mov eax, 0x8421085
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.004b38c0
cmp dword [esi + 0x6c], 0
je 0x4b3aa3
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.004b38c0
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.004b38c0
mov dword [edi + 0x30], 1
mov ecx, edi
mov dword [esi + 4], 0x71
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b39f4
cmp dword [esi + 4], 0x39
push ebx
jne 0x4b3cd5
mov dword [edi + 0x30], 0
mov eax, dword [esi + 0x14]
mov ecx, 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 0x4b3baa
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 0x4b3b55
lea ecx, [eax - 7]
jmp 0x4b3b6c
cmp dword [esi + 0x88], 2
jge 0x4b3b67
cmp eax, 2
jl 0x4b3b67
xor ecx, ecx
jmp 0x4b3b6c
mov ecx, 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], 0xa
mov ecx, edi
inc dword [esi + 0x14]
mov dword [esi + 4], 0x71
call fcn.004b38f0
cmp dword [esi + 0x14], 0
je 0x4b3cd5
mov dword [esi + 0x28], 0xffffffff
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
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 0x4b3c45
lea ecx, [eax - 7]
jmp 0x4b3c5c
cmp dword [esi + 0x88], 2
jge 0x4b3c57
cmp eax, 2
jl 0x4b3c57
xor ecx, ecx
jmp 0x4b3c5c
mov ecx, 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 edx, dword [esi + 0x14]
cmp dword [eax + 0x10], 0
je 0x4b3ca6
mov ecx, dword [esi + 8]
movzx eax, 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]
movzx eax, 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 0x4b3cc7
mov eax, dword [esi + 8]
test eax, eax
je 0x4b3cc4
mov ecx, dword [edi + 0x30]
push edx
mov edx, eax
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], 0
mov dword [esi + 4], 0x45
cmp dword [esi + 4], 0x45
jne 0x4b3dec
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x10], 0
je 0x4b3de5
movzx ecx, word [eax + 0x14]
mov ebx, dword [esi + 0x14]
mov edx, ebx
sub ecx, dword [esi + 0x20]
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ecx
lea eax, [edx + ecx]
cmp eax, dword [esi + 0xc]
jbe 0x4b3d92
nop word [eax + eax]
mov eax, dword [esi + 0x1c]
mov ebx, dword [esi + 0xc]
sub ebx, edx
push ebx
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.00588a40
mov eax, dword [esi + 0x1c]
add esp, 0xc
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], ecx
cmp dword [eax + 0x2c], 0
je 0x4b3d61
mov eax, dword [ebp - 4]
cmp ecx, eax
jbe 0x4b3d61
mov edx, dword [esi + 8]
sub ecx, eax
add edx, eax
jne 0x4b3d52
xor eax, eax
jmp 0x4b3d5e
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
add dword [esi + 0x20], ebx
mov ecx, edi
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b3b9a
mov ecx, dword [ebp - 8]
mov edx, dword [esi + 0x14]
sub ecx, ebx
mov dword [ebp - 4], 0
mov dword [ebp - 8], ecx
lea eax, [edx + ecx]
cmp eax, dword [esi + 0xc]
ja 0x4b3d10
mov ebx, dword [ebp - 4]
mov eax, dword [esi + 0x1c]
push ecx
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.00588a40
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 0x4b3dde
cmp ecx, ebx
jbe 0x4b3dde
mov edx, dword [esi + 8]
sub ecx, ebx
add edx, ebx
jne 0x4b3dcf
xor eax, eax
jmp 0x4b3ddb
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], 0
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x4b3ea9
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], 0
je 0x4b3ea2
mov ebx, dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4b3e4d
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b3e3a
mov eax, dword [esi + 0x14]
cmp eax, ebx
jbe 0x4b3e3a
mov edx, dword [esi + 8]
sub eax, ebx
add edx, ebx
jne 0x4b3e2b
xor eax, eax
jmp 0x4b3e37
mov ecx, dword [edi + 0x30]
push eax
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b3b9a
xor ebx, ebx
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
jne 0x4b3e06
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], edx
je 0x4b3e9b
cmp ecx, ebx
jbe 0x4b3e9b
mov edx, dword [esi + 8]
sub ecx, ebx
add edx, ebx
jne 0x4b3e8c
xor eax, eax
jmp 0x4b3e98
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], 0
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x4b3f5f
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], 0
je 0x4b3f58
mov ebx, dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x4b3f0a
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b3ef7
mov eax, dword [esi + 0x14]
cmp eax, ebx
jbe 0x4b3ef7
mov edx, dword [esi + 8]
sub eax, ebx
add edx, ebx
jne 0x4b3ee8
xor eax, eax
jmp 0x4b3ef4
mov ecx, dword [edi + 0x30]
push eax
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov ecx, edi
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b3b9a
xor ebx, ebx
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
jne 0x4b3ec3
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], edx
je 0x4b3f58
cmp ecx, ebx
jbe 0x4b3f58
mov edx, dword [esi + 8]
sub ecx, ebx
add edx, ebx
jne 0x4b3f49
xor eax, eax
jmp 0x4b3f55
push ecx
mov ecx, dword [edi + 0x30]
call fcn.004b6350
add esp, 4
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x4b3fc9
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], 0
je 0x4b3fb1
mov eax, dword [esi + 0x14]
add eax, 2
cmp eax, dword [esi + 0xc]
jbe 0x4b3f8a
mov ecx, edi
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b3b9a
mov ecx, dword [esi + 0x14]
mov edx, 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 ecx, edi
mov dword [esi + 4], 0x71
call fcn.004b38f0
cmp dword [esi + 0x14], 0
jne 0x4b3b9a
cmp dword [edi + 4], 0
jne 0x4b3fe2
cmp dword [esi + 0x74], 0
jne 0x4b3fe2
cmp dword [esi + 4], 0x29a
je 0x4b4072
mov eax, dword [esi + 0x84]
test eax, eax
jne 0x4b3ff6
push 4
push esi
call fcn.004b4720
jmp 0x4b4027
mov ecx, dword [esi + 0x88]
cmp ecx, 2
jne 0x4b400a
mov ecx, esi
call fcn.004b56b0
jmp 0x4b402a
cmp ecx, 3
jne 0x4b4018
mov ecx, esi
call fcn.004b5400
jmp 0x4b402a
lea eax, [eax + eax*2]
mov eax, dword [eax*4 + 0x5eed18]
push 4
push esi
call eax
add esp, 8
cmp eax, 2
je 0x4b4034
cmp eax, 3
jne 0x4b403b
mov dword [esi + 4], 0x29a
test eax, eax
je 0x4b4148
cmp eax, 2
je 0x4b4148
cmp eax, 1
jne 0x4b4072
push 0
push 0
xor edx, edx
mov ecx, esi
call fcn.004b7570
add esp, 8
mov ecx, edi
call fcn.004b38f0
cmp dword [edi + 0x10], 0
je 0x4b3b9a
mov eax, dword [esi + 0x18]
test eax, eax
jg 0x4b4085
pop ebx
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x4b4110
mov ecx, dword [esi + 0x14]
movzx eax, byte [edi + 0x30]
mov edx, 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 0x4b4126
movzx edx, word [edi + 0x32]
mov ecx, esi
call fcn.004b38c0
movzx edx, word [edi + 0x30]
mov ecx, esi
call fcn.004b38c0
mov ecx, edi
call fcn.004b38f0
mov eax, dword [esi + 0x18]
test eax, eax
jle 0x4b4139
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], eax
pop ebx
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x10], 0
jne 0x4b3ba1
pop ebx
pop edi
mov dword [esi + 0x28], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [str.stream_error]
mov dword [edi + 0x18], eax
pop edi
mov eax, 0xfffffffe
pop esi
mov esp, ebp
pop ebp
ret