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

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
push ebx
call fcn.00490b40
add esp, 4
test eax, eax
jne 0x491667
mov esi, dword [esp + 0x1c]
cmp esi, 5
jg 0x491667
test esi, esi
jl 0x491667
mov eax, dword [ebx + 0xc]
test eax, eax
mov ebp, dword [ebx + 0x1c]
je 0x49165e
mov eax, dword [ebx + 4]
test eax, eax
je 0x490cfd
cmp dword [ebx], 0
je 0x49165e
cmp dword [ebp + 4], 0x29a
jne 0x490d0f
cmp esi, 4
jne 0x49165e
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x490d2b
mov eax, dword [str.buffer_error]
pop edi
pop esi
mov dword [ebx + 0x18], eax
pop ebp
mov eax, 0xfffffffb
pop ebx
pop ecx
ret 8
mov ecx, dword [ebp + 0x14]
test ecx, ecx
mov eax, dword [ebp + 0x28]
mov dword [ebp + 0x28], esi
je 0x490d59
push ebx
call fcn.004916b0
mov eax, dword [ebx + 0x10]
add esp, 4
test eax, eax
jne 0x490da1
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov ecx, dword [ebx + 4]
test ecx, ecx
jne 0x490da1
xor ecx, ecx
cmp eax, 4
setle cl
lea edx, [eax + eax]
xor eax, eax
dec ecx
and ecx, 9
sub edx, ecx
cmp esi, 4
setle al
lea ecx, [esi + esi]
dec eax
and eax, 9
sub ecx, eax
cmp ecx, edx
jg 0x490da1
cmp esi, 4
je 0x490da1
mov edx, dword [str.buffer_error]
pop edi
pop esi
pop ebp
mov dword [ebx + 0x18], edx
mov eax, 0xfffffffb
pop ebx
pop ecx
ret 8
mov eax, dword [ebp + 4]
cmp eax, 0x29a
jne 0x490dc7
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x490dc7
mov eax, dword [str.buffer_error]
pop edi
pop esi
mov dword [ebx + 0x18], eax
pop ebp
mov eax, 0xfffffffb
pop ebx
pop ecx
ret 8
cmp eax, 0x2a
jne 0x490e92
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x88]
shl ecx, 0xc
sub ecx, 0x7800
cmp eax, 2
jge 0x490e0b
mov edi, dword [ebp + 0x84]
cmp edi, 2
jl 0x490e0b
cmp edi, 6
jge 0x490dfe
mov eax, 1
jmp 0x490e0d
xor eax, eax
cmp edi, 6
setne al
add eax, 2
jmp 0x490e0d
xor eax, eax
shl eax, 6
or ecx, eax
mov eax, dword [ebp + 0x6c]
test eax, eax
je 0x490e1c
or ecx, 0x20
mov eax, ecx
xor edx, edx
mov edi, 0x1f
div edi
sub ecx, edx
add ecx, edi
push ecx
push ebp
call fcn.00491680
mov eax, dword [ebp + 0x6c]
add esp, 8
test eax, eax
je 0x490e5c
mov ecx, dword [ebx + 0x30]
shr ecx, 0x10
push ecx
push ebp
call fcn.00491680
mov edx, dword [ebx + 0x30]
and edx, 0xffff
push edx
push ebp
call fcn.00491680
add esp, 0x10
push 0
push 0
push 0
call fcn.00493820
mov dword [ebx + 0x30], eax
push ebx
mov dword [ebp + 4], 0x71
call fcn.004916b0
mov eax, dword [ebp + 0x14]
add esp, 4
test eax, eax
je 0x490e92
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
cmp dword [ebp + 4], 0x39
jne 0x4910f6
push 0
push 0
push 0
call fcn.00493870
mov dword [ebx + 0x30], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov byte [eax + ecx], 0x1f
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc esi
mov dword [ebp + 0x14], esi
mov eax, esi
mov byte [eax + edx], 0x8b
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc edx
mov dword [ebp + 0x14], edx
mov eax, edx
mov byte [eax + ecx], 8
mov ecx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x1c]
inc ecx
test edi, edi
mov dword [ebp + 0x14], ecx
mov esi, ecx
jne 0x490fa8
mov edx, dword [ebp + 8]
mov byte [esi + edx], 0
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc edx
mov dword [ebp + 0x14], edx
mov eax, edx
mov byte [eax + ecx], 0
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc ecx
mov dword [ebp + 0x14], ecx
mov eax, ecx
mov byte [eax + edx], 0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc eax
mov dword [ebp + 0x14], eax
mov byte [eax + ecx], 0
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc edi
mov dword [ebp + 0x14], edi
mov eax, edi
mov byte [eax + edx], 0
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x84]
inc esi
cmp eax, 9
mov dword [ebp + 0x14], esi
mov ecx, esi
jne 0x490f48
mov eax, 2
jmp 0x490f5f
cmp dword [ebp + 0x88], 2
jge 0x490f5a
cmp eax, 2
jl 0x490f5a
xor eax, eax
jmp 0x490f5f
mov eax, 4
mov edx, dword [ebp + 8]
mov byte [ecx + edx], al
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc edi
mov dword [ebp + 0x14], edi
mov eax, edi
mov byte [eax + ecx], 0xa
mov esi, dword [ebp + 0x14]
inc esi
push ebx
mov dword [ebp + 0x14], esi
mov dword [ebp + 4], 0x71
call fcn.004916b0
mov eax, dword [ebp + 0x14]
add esp, 4
test eax, eax
je 0x4910f2
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov edx, dword [edi + 0x24]
mov eax, dword [edi + 0x2c]
neg edx
sbb dl, dl
mov ecx, dword [edi + 0x1c]
and edx, 0x10
test eax, eax
sete al
dec eax
and eax, 2
add dl, al
mov eax, dword [edi + 0x10]
neg ecx
sbb cl, cl
and ecx, 8
add dl, cl
neg eax
sbb al, al
and eax, 4
add dl, al
cmp dword [edi], 0
mov eax, dword [ebp + 8]
setne cl
add dl, cl
mov byte [esi + eax], dl
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 8]
inc eax
mov dword [ebp + 0x14], eax
mov cl, byte [ecx + 4]
mov byte [eax + edx], cl
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
inc edi
mov dword [ebp + 0x14], edi
mov ecx, dword [edx + 4]
mov edx, dword [ebp + 8]
shr ecx, 8
mov eax, edi
mov byte [eax + edx], cl
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
inc edx
mov dword [ebp + 0x14], edx
mov eax, edx
mov edx, dword [ecx + 4]
mov ecx, dword [ebp + 8]
shr edx, 0x10
mov byte [eax + ecx], dl
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x1c]
inc eax
mov dword [ebp + 0x14], eax
mov ecx, dword [edx + 4]
mov edx, dword [ebp + 8]
shr ecx, 0x18
mov byte [eax + edx], cl
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x84]
inc esi
cmp eax, 9
mov dword [ebp + 0x14], esi
mov ecx, esi
jne 0x49105a
mov eax, 2
jmp 0x491071
cmp dword [ebp + 0x88], 2
jge 0x49106c
cmp eax, 2
jl 0x49106c
xor eax, eax
jmp 0x491071
mov eax, 4
mov edx, dword [ebp + 8]
mov byte [ecx + edx], al
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp + 8]
inc edi
mov dword [ebp + 0x14], edi
mov cl, byte [ecx + 0xc]
mov eax, edi
mov byte [eax + edx], cl
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x1c]
inc esi
mov dword [ebp + 0x14], esi
mov edx, dword [eax + 0x10]
test edx, edx
mov ecx, esi
je 0x4910c9
mov al, byte [eax + 0x14]
mov edx, dword [ebp + 8]
mov byte [ecx + edx], al
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
inc edx
mov dword [ebp + 0x14], edx
mov eax, edx
mov edx, dword [ecx + 0x14]
mov ecx, dword [ebp + 8]
shr edx, 8
mov byte [eax + ecx], dl
mov eax, dword [ebp + 0x14]
inc eax
mov dword [ebp + 0x14], eax
mov ecx, eax
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x4910e4
mov eax, dword [ebp + 8]
push ecx
mov ecx, dword [ebx + 0x30]
push eax
push ecx
call fcn.00493870
mov dword [ebx + 0x30], eax
mov dword [ebp + 0x20], 0
mov dword [ebp + 4], 0x45
mov esi, dword [esp + 0x1c]
cmp dword [ebp + 4], 0x45
jne 0x49121e
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x491217
mov ecx, dword [eax + 0x14]
mov edi, dword [ebp + 0x20]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
and ecx, 0xffff
sub ecx, edi
mov edi, edx
mov dword [esp + 0x18], ecx
add ecx, edi
cmp ecx, eax
jbe 0x4911b8
sub eax, edi
mov dword [esp + 0x10], eax
mov ecx, eax
mov eax, dword [ebp + 0x1c]
mov esi, dword [eax + 0x10]
add esi, dword [ebp + 0x20]
add edi, dword [ebp + 8]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x14], eax
mov esi, dword [ecx + 0x2c]
test esi, esi
je 0x49117d
cmp eax, edx
jbe 0x49117d
mov esi, dword [ebp + 8]
sub eax, edx
push eax
add edx, esi
push edx
mov edx, dword [ebx + 0x30]
push edx
call fcn.00493870
mov dword [ebx + 0x30], eax
mov edi, dword [ebp + 0x20]
mov esi, dword [esp + 0x10]
add edi, esi
push ebx
mov dword [ebp + 0x20], edi
call fcn.004916b0
mov eax, dword [ebp + 0x14]
add esp, 4
test eax, eax
jne 0x491525
mov ecx, dword [esp + 0x18]
sub ecx, esi
mov edi, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], ecx
add ecx, edi
xor edx, edx
cmp ecx, eax
ja 0x491132
mov eax, dword [ebp + 0x1c]
mov esi, dword [eax + 0x10]
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x18]
add esi, edi
mov edi, dword [ebp + 0x14]
add edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x14]
mov ecx, eax
add edi, ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x14], edi
mov esi, dword [ecx + 0x2c]
test esi, esi
mov eax, edi
je 0x49120c
cmp eax, edx
jbe 0x49120c
mov esi, dword [ebp + 8]
sub eax, edx
push eax
add edx, esi
push edx
mov edx, dword [ebx + 0x30]
push edx
call fcn.00493870
mov dword [ebx + 0x30], eax
mov esi, dword [esp + 0x1c]
mov dword [ebp + 0x20], 0
mov dword [ebp + 4], 0x49
cmp dword [ebp + 4], 0x49
jne 0x4912d4
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x4912cd
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
cmp ecx, dword [ebp + 0xc]
jne 0x49127a
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x491264
cmp ecx, edi
jbe 0x491264
mov eax, dword [ebp + 8]
sub ecx, edi
push ecx
mov ecx, dword [ebx + 0x30]
add eax, edi
push eax
push ecx
call fcn.00493870
mov dword [ebx + 0x30], eax
push ebx
call fcn.004916b0
mov ecx, dword [ebp + 0x14]
add esp, 4
test ecx, ecx
jne 0x491525
xor edi, edi
mov eax, dword [ebp + 0x1c]
mov esi, dword [eax + 0x1c]
mov edx, dword [ebp + 0x20]
xor eax, eax
mov al, byte [esi + edx]
inc edx
mov dword [ebp + 0x20], edx
mov edx, dword [ebp + 8]
mov byte [edx + ecx], al
mov esi, dword [ebp + 0x14]
inc esi
test eax, eax
mov dword [ebp + 0x14], esi
mov ecx, esi
jne 0x491239
mov eax, dword [ebp + 0x1c]
mov edx, dword [eax + 0x2c]
test edx, edx
je 0x4912c2
cmp ecx, edi
jbe 0x4912c2
mov edx, dword [ebx + 0x30]
sub ecx, edi
push ecx
mov ecx, dword [ebp + 8]
add ecx, edi
push ecx
push edx
call fcn.00493870
mov dword [ebx + 0x30], eax
mov esi, dword [esp + 0x1c]
mov dword [ebp + 0x20], 0
mov dword [ebp + 4], 0x5b
cmp dword [ebp + 4], 0x5b
jne 0x491383
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x49137c
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x14]
cmp ecx, dword [ebp + 0xc]
jne 0x491330
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 0x2c]
test eax, eax
je 0x49131a
cmp ecx, edi
jbe 0x49131a
mov eax, dword [ebp + 8]
sub ecx, edi
push ecx
mov ecx, dword [ebx + 0x30]
add eax, edi
push eax
push ecx
call fcn.00493870
mov dword [ebx + 0x30], eax
push ebx
call fcn.004916b0
mov ecx, dword [ebp + 0x14]
add esp, 4
test ecx, ecx
jne 0x491525
xor edi, edi
mov eax, dword [ebp + 0x1c]
mov esi, dword [eax + 0x24]
mov edx, dword [ebp + 0x20]
xor eax, eax
mov al, byte [esi + edx]
inc edx
mov dword [ebp + 0x20], edx
mov edx, dword [ebp + 8]
mov byte [edx + ecx], al
mov esi, dword [ebp + 0x14]
inc esi
test eax, eax
mov dword [ebp + 0x14], esi
mov ecx, esi
jne 0x4912ef
mov eax, dword [ebp + 0x1c]
mov edx, dword [eax + 0x2c]
test edx, edx
je 0x491378
cmp ecx, edi
jbe 0x491378
mov edx, dword [ebx + 0x30]
sub ecx, edi
push ecx
mov ecx, dword [ebp + 8]
add ecx, edi
push ecx
push edx
call fcn.00493870
mov dword [ebx + 0x30], eax
mov esi, dword [esp + 0x1c]
mov dword [ebp + 4], 0x67
cmp dword [ebp + 4], 0x67
jne 0x491420
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 0x2c]
test ecx, ecx
je 0x4913f8
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
lea ecx, [eax + 2]
cmp ecx, edx
jbe 0x4913c5
push ebx
call fcn.004916b0
mov eax, dword [ebp + 0x14]
add esp, 4
test eax, eax
je 0x4913c5
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov cl, byte [ebx + 0x30]
mov edx, dword [ebp + 8]
mov byte [eax + edx], cl
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc edx
mov dword [ebp + 0x14], edx
mov eax, edx
mov edx, dword [ebx + 0x30]
shr edx, 8
mov byte [eax + ecx], dl
mov edi, dword [ebp + 0x14]
push 0
push 0
inc edi
push 0
mov dword [ebp + 0x14], edi
call fcn.00493870
mov dword [ebx + 0x30], eax
push ebx
mov dword [ebp + 4], 0x71
call fcn.004916b0
mov eax, dword [ebp + 0x14]
add esp, 4
test eax, eax
je 0x491420
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [ebx + 4]
test eax, eax
jne 0x491443
mov eax, dword [ebp + 0x74]
test eax, eax
jne 0x491443
test esi, esi
je 0x491536
cmp dword [ebp + 4], 0x29a
je 0x491536
mov eax, dword [ebp + 0x84]
test eax, eax
jne 0x491456
push esi
push ebp
call fcn.00491ac0
jmp 0x491484
mov ecx, dword [ebp + 0x88]
cmp ecx, 2
jne 0x49146a
push esi
push ebp
call fcn.00492ae0
jmp 0x491484
cmp ecx, 3
jne 0x491478
push esi
push ebp
call fcn.004927f0
jmp 0x491484
push esi
lea edx, [eax + eax*2]
push ebp
call dword [edx*4 + 0x4bfb78]
add esp, 8
cmp eax, 2
je 0x491491
cmp eax, 3
jne 0x491498
mov dword [ebp + 4], 0x29a
test eax, eax
je 0x491646
cmp eax, 2
je 0x491646
cmp eax, 1
jne 0x491536
cmp esi, eax
jne 0x4914c1
push ebp
call fcn.00493d70
add esp, 4
jmp 0x491515
cmp esi, 5
je 0x491515
push 0
push 0
push 0
push ebp
call fcn.00493c50
add esp, 0x10
cmp esi, 3
jne 0x491515
mov eax, dword [ebp + 0x4c]
mov ecx, dword [ebp + 0x44]
mov word [ecx + eax*2 - 2], 0
mov edx, dword [ebp + 0x4c]
mov edi, dword [ebp + 0x44]
lea ecx, [edx + edx - 2]
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, esi
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x74]
test eax, eax
jne 0x491515
xor eax, eax
mov dword [ebp + 0x6c], eax
mov dword [ebp + 0x5c], eax
mov dword [ebp + 0x16b4], eax
push ebx
call fcn.004916b0
mov eax, dword [ebx + 0x10]
add esp, 4
test eax, eax
jne 0x491536
pop edi
pop esi
mov dword [ebp + 0x28], 0xffffffff
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
cmp esi, 4
je 0x491545
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [ebp + 0x18]
test eax, eax
jg 0x491559
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 8
cmp eax, 2
jne 0x4915ff
mov eax, dword [ebp + 0x14]
mov dl, byte [ebx + 0x30]
mov ecx, dword [ebp + 8]
mov byte [eax + ecx], dl
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc esi
mov dword [ebp + 0x14], esi
mov ecx, dword [ebx + 0x30]
shr ecx, 8
mov eax, esi
mov byte [eax + edx], cl
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc eax
mov dword [ebp + 0x14], eax
mov ecx, dword [ebx + 0x30]
shr ecx, 0x10
mov byte [eax + edx], cl
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc esi
mov dword [ebp + 0x14], esi
mov ecx, dword [ebx + 0x30]
shr ecx, 0x18
mov eax, esi
mov byte [eax + edx], cl
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
inc edi
mov dword [ebp + 0x14], edi
mov dl, byte [ebx + 8]
mov eax, edi
mov byte [eax + ecx], dl
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc esi
mov dword [ebp + 0x14], esi
mov ecx, dword [ebx + 8]
shr ecx, 8
mov eax, esi
mov byte [eax + edx], cl
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc eax
mov dword [ebp + 0x14], eax
mov ecx, dword [ebx + 8]
shr ecx, 0x10
mov byte [eax + edx], cl
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
inc esi
mov dword [ebp + 0x14], esi
mov ecx, dword [ebx + 8]
mov eax, esi
shr ecx, 0x18
mov byte [eax + edx], cl
inc dword [ebp + 0x14]
jmp 0x49161f
mov eax, dword [ebx + 0x30]
shr eax, 0x10
push eax
push ebp
call fcn.00491680
mov ecx, dword [ebx + 0x30]
and ecx, 0xffff
push ecx
push ebp
call fcn.00491680
add esp, 0x10
push ebx
call fcn.004916b0
mov eax, dword [ebp + 0x18]
add esp, 4
test eax, eax
jle 0x491634
neg eax
mov dword [ebp + 0x18], eax
mov ecx, dword [ebp + 0x14]
pop edi
pop esi
xor eax, eax
test ecx, ecx
pop ebp
sete al
pop ebx
pop ecx
ret 8
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x491654
mov dword [ebp + 0x28], 0xffffffff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov edx, dword [str.stream_error]
mov dword [ebx + 0x18], edx
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
pop ecx
ret 8