Function at 0x58196f
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 0x5820fa
mov esi, dword [edi + 0x1c]
cmp esi, ebx
je 0x5820fa
mov ecx, dword [ebp + 0xc]
cmp ecx, 4
jg 0x5820fa
cmp ecx, ebx
jl 0x5820fa
cmp dword [edi + 0xc], ebx
je 0x5820f2
cmp dword [edi], ebx
jne 0x5819b9
cmp dword [edi + 4], ebx
jne 0x5820f2
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x5819cc
cmp ecx, 4
jne 0x5820f2
cmp dword [edi + 0x10], ebx
je 0x581f57
mov edx, dword [esi + 0x28]
cmp eax, 0x2a
mov dword [esi], edi
mov dword [ebp - 8], edx
mov dword [esi + 0x28], ecx
jne 0x581c73
cmp dword [esi + 0x18], 2
jne 0x581bdd
push ebx
push ebx
push ebx
call fcn.00577e44
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 0x581ab8
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 0x581a81
push 2
jmp 0x581a95
cmp dword [esi + 0x88], 2
jge 0x581a93
cmp eax, 2
jl 0x581a93
xor eax, eax
jmp 0x581a96
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 0x581c73
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 0x581b58
push 2
jmp 0x581b6c
cmp dword [esi + 0x88], 2
jge 0x581b6a
cmp eax, 2
jl 0x581b6a
xor eax, eax
jmp 0x581b6d
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 0x581bb4
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 0x581bce
push ecx
push dword [esi + 8]
push dword [edi + 0x30]
call fcn.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x45
jmp 0x581c73
mov ecx, dword [esi + 0x30]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [esi + 0x88], 2
jge 0x581c15
mov eax, dword [esi + 0x84]
cmp eax, 2
jl 0x581c15
cmp eax, 6
jge 0x581c07
xor eax, eax
inc eax
jmp 0x581c17
xor edx, edx
cmp eax, 6
setne dl
inc edx
inc edx
mov eax, edx
jmp 0x581c17
xor eax, eax
shl eax, 6
or ecx, eax
cmp dword [esi + 0x6c], ebx
je 0x581c24
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.00582102
xor ebx, ebx
pop ecx
cmp dword [esi + 0x6c], ebx
pop ecx
je 0x581c65
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.00582102
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.00582102
add esp, 0x10
push ebx
push ebx
push ebx
call fcn.00585d80
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [esi + 4], 0x45
jne 0x581d44
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x10], ebx
je 0x581d3d
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [ecx + 0x14]
and eax, 0xffff
cmp dword [esi + 0x20], eax
jae 0x581d06
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x581cd9
cmp dword [ecx + 0x2c], ebx
je 0x581cc7
cmp eax, dword [ebp + 8]
jbe 0x581cc7
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0058212c
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x581d06
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 0x581c9c
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x581d2f
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x581d2f
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
cmp ecx, dword [eax + 0x14]
jne 0x581d44
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x49
cmp dword [esi + 4], 0x49
jne 0x581e02
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x1c], ebx
je 0x581dfb
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x581da0
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x581d8e
cmp eax, dword [ebp + 8]
jbe 0x581d8e
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0058212c
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x581dc3
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 0x581d60
jmp 0x581dca
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x581df3
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x581df3
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x581e02
mov dword [esi + 0x20], ebx
mov dword [esi + 4], 0x5b
cmp dword [esi + 4], 0x5b
jne 0x581ebd
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x24], ebx
je 0x581eb6
mov eax, dword [esi + 0x14]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0xc]
jne 0x581e5e
mov ecx, dword [esi + 0x1c]
cmp dword [ecx + 0x2c], ebx
je 0x581e4c
cmp eax, dword [ebp + 8]
jbe 0x581e4c
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
push edi
call fcn.0058212c
mov eax, dword [esi + 0x14]
pop ecx
cmp eax, dword [esi + 0xc]
mov dword [ebp + 8], eax
je 0x581e81
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 0x581e1e
jmp 0x581e88
mov dword [ebp - 4], 1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x581eb1
mov eax, dword [esi + 0x14]
cmp eax, dword [ebp + 8]
jbe 0x581eb1
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
cmp dword [ebp - 4], ebx
jne 0x581ebd
mov dword [esi + 4], 0x67
cmp dword [esi + 4], 0x67
jne 0x581f17
mov eax, dword [esi + 0x1c]
cmp dword [eax + 0x2c], ebx
je 0x581f10
mov eax, dword [esi + 0x14]
inc eax
inc eax
cmp eax, dword [esi + 0xc]
jbe 0x581edc
push edi
call fcn.0058212c
pop ecx
mov eax, dword [esi + 0x14]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0xc]
ja 0x581f17
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.00577e44
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [esi + 4], 0x71
cmp dword [esi + 0x14], ebx
je 0x581f31
push edi
call fcn.0058212c
cmp dword [edi + 0x10], ebx
pop ecx
jne 0x581f45
or dword [esi + 0x28], 0xffffffff
jmp 0x582015
cmp dword [edi + 4], ebx
jne 0x581f45
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 8]
jg 0x581f48
cmp ecx, 4
je 0x581f48
jmp 0x581f57
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 4]
cmp eax, 0x29a
jne 0x581f66
cmp dword [edi + 4], ebx
je 0x581f6b
mov eax, dword [0x5f6be4]
push 0xfffffffffffffffb
mov dword [edi + 0x18], eax
jmp 0x5820fc
cmp dword [edi + 4], ebx
jne 0x581f83
cmp dword [esi + 0x74], ebx
jne 0x581f83
cmp ecx, ebx
je 0x58200f
cmp eax, 0x29a
je 0x58200f
mov eax, dword [esi + 0x84]
push dword [ebp + 0xc]
lea eax, [eax + eax*2]
push esi
call dword [eax*4 + 0x5f6b50]
pop ecx
cmp eax, 2
pop ecx
je 0x581fa3
cmp eax, 3
jne 0x581faa
mov dword [esi + 4], 0x29a
cmp eax, ebx
je 0x5820e4
cmp eax, 2
je 0x5820e4
cmp eax, 1
jne 0x58200f
cmp dword [ebp + 0xc], eax
jne 0x581fce
push esi
call fcn.005872bf
pop ecx
jmp 0x581fff
push ebx
push ebx
push ebx
push esi
call fcn.00587231
add esp, 0x10
cmp dword [ebp + 0xc], 3
jne 0x581fff
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 0x607d80
add esp, 0xc
push edi
call fcn.0058212c
cmp dword [edi + 0x10], ebx
pop ecx
je 0x581f28
cmp dword [ebp + 0xc], 4
je 0x58201c
xor eax, eax
jmp 0x5820fd
mov eax, dword [esi + 0x18]
cmp eax, ebx
jg 0x58202b
xor eax, eax
inc eax
jmp 0x5820fd
cmp eax, 2
jne 0x5820aa
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 0x5820c7
movzx eax, word [edi + 0x32]
push eax
push esi
call fcn.00582102
mov eax, dword [edi + 0x30]
and eax, 0xffff
push eax
push esi
call fcn.00582102
add esp, 0x10
push edi
call fcn.0058212c
mov eax, dword [esi + 0x18]
pop ecx
cmp eax, ebx
jle 0x5820da
neg eax
mov dword [esi + 0x18], eax
xor eax, eax
cmp dword [esi + 0x14], ebx
sete al
jmp 0x5820fd
cmp dword [edi + 0x10], ebx
jne 0x582015
jmp 0x581f28
mov eax, dword [0x5f6bd8]
mov dword [edi + 0x18], eax
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret