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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor edi, edi
mov r14d, edx
mov rsi, rcx
test rcx, rcx
je 0x18004c913
mov rbx, qword [rcx + 0x28]
test rbx, rbx
je 0x18004c913
cmp edx, 5
ja 0x18004c913
cmp qword [rcx + 0x10], rdi
je 0x18004c908
cmp qword [rcx], rdi
jne 0x18004c06f
cmp dword [rcx + 8], edi
jne 0x18004c908
cmp dword [rbx + 8], 0x29a
mov ebp, 4
jne 0x18004c086
cmp r14d, ebp
jne 0x18004c908
cmp dword [rcx + 0x18], edi
jne 0x18004c0a0
mov rax, qword [0x180060cd8]
mov qword [rcx + 0x20], rax
mov eax, 0xfffffffb
jmp 0x18004c918
cmp dword [rbx + 8], 0x2a
mov r13d, 2
mov r15d, dword [rbx + 0x40]
mov qword [rbx], rsi
mov dword [rbx + 0x40], r14d
lea r12d, [r13 - 1]
jne 0x18004c3da
cmp dword [rbx + 0x2c], r13d
jne 0x18004c2e9
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], 0x1f
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], 0x8b
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], 8
add dword [rbx + 0x28], r12d
mov r8, qword [rbx + 0x30]
test r8, r8
jne 0x18004c1a8
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dil
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dil
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dil
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dil
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dil
add dword [rbx + 0x28], r12d
mov eax, dword [rbx + 0xac]
cmp eax, 9
jne 0x18004c16d
mov edx, r13d
jmp 0x18004c17f
cmp dword [rbx + 0xb0], r13d
jge 0x18004c17d
mov edx, edi
cmp eax, r13d
jge 0x18004c17f
mov edx, ebp
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], 0xb
add dword [rbx + 0x28], r12d
mov dword [rbx + 8], 0x71
jmp 0x18004c3da
mov rax, qword [r8 + 0x30]
neg rax
mov eax, dword [r8 + 0x3c]
sbb dl, dl
and dl, 0x10
neg eax
mov rax, qword [r8 + 0x20]
sbb cl, cl
and cl, r13b
add dl, cl
neg rax
mov rax, qword [r8 + 0x10]
sbb cl, cl
and cl, 8
add dl, cl
neg rax
sbb cl, cl
and cl, bpl
add dl, cl
mov ecx, dword [rbx + 0x28]
cmp dword [r8], edi
setne al
add dl, al
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 4]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 5]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 6]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov rax, qword [rbx + 0x30]
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 7]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov eax, dword [rbx + 0xac]
cmp eax, 9
jne 0x18004c257
mov edx, r13d
jmp 0x18004c269
cmp dword [rbx + 0xb0], r13d
jge 0x18004c267
mov edx, edi
cmp eax, r13d
jge 0x18004c269
mov edx, ebp
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov rax, qword [rbx + 0x30]
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 0xc]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov rax, qword [rbx + 0x30]
mov r8d, dword [rbx + 0x28]
cmp qword [rax + 0x10], rdi
je 0x18004c2c2
mov al, byte [rax + 0x18]
mov rcx, qword [rbx + 0x10]
mov byte [r8 + rcx], al
add dword [rbx + 0x28], r12d
mov rax, qword [rbx + 0x30]
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
mov al, byte [rax + 0x19]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov r8d, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c2da
mov rdx, qword [rbx + 0x10]
mov ecx, dword [rsi + 0x4c]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov dword [rbx + 0x38], edi
mov dword [rbx + 8], 0x45
jmp 0x18004c3da
mov ecx, dword [rbx + 0x48]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [rbx + 0xb0], r13d
jge 0x18004c320
mov edx, dword [rbx + 0xac]
cmp edx, r13d
jl 0x18004c320
cmp edx, 6
jge 0x18004c313
mov eax, r12d
jmp 0x18004c322
cmp edx, 6
mov eax, edi
setne al
add eax, r13d
jmp 0x18004c322
mov eax, edi
shl eax, 6
or ecx, eax
cmp dword [rbx + 0x94], edi
je 0x18004c332
or ecx, 0x20
mov eax, 0x8421085
mov dword [rbx + 8], 0x71
mul ecx
mov rax, qword [rbx + 0x10]
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 4
add ecx, r12d
imul r8d, ecx, 0x1f
mov ecx, dword [rbx + 0x28]
mov edx, r8d
shr edx, 8
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], r8b
add dword [rbx + 0x28], r12d
cmp dword [rbx + 0x94], edi
je 0x18004c3cb
movzx r8d, word [rsi + 0x4e]
mov ecx, dword [rbx + 0x28]
mov edx, r8d
mov rax, qword [rbx + 0x10]
shr edx, 8
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], r8b
add dword [rbx + 0x28], r12d
movzx r8d, word [rsi + 0x4c]
mov edx, dword [rbx + 0x28]
mov ecx, r8d
mov rax, qword [rbx + 0x10]
shr ecx, 8
mov byte [rdx + rax], cl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], r8b
add dword [rbx + 0x28], r12d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call fcn.18004a674
mov dword [rsi + 0x4c], eax
cmp dword [rbx + 8], 0x45
mov ebp, 0x49
jne 0x18004c4ae
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x10], rdi
je 0x18004c4ab
movzx eax, word [rax + 0x18]
mov r10d, dword [rbx + 0x28]
cmp dword [rbx + 0x38], eax
jae 0x18004c475
mov ecx, dword [rbx + 0x28]
cmp ecx, dword [rbx + 0x18]
jne 0x18004c445
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c432
cmp ecx, r10d
jbe 0x18004c432
sub ecx, r10d
mov edx, r10d
add rdx, qword [rbx + 0x10]
mov r8d, ecx
mov ecx, dword [rsi + 0x4c]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.18004d47c
mov ecx, dword [rbx + 0x28]
mov r10d, ecx
cmp ecx, dword [rbx + 0x18]
je 0x18004c475
mov rax, qword [rbx + 0x30]
mov r9d, dword [rbx + 0x38]
mov r8d, ecx
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rax + 0x10]
mov al, byte [r9 + rdx]
mov byte [r8 + rcx], al
add dword [rbx + 0x28], r12d
add dword [rbx + 0x38], r12d
mov rax, qword [rbx + 0x30]
movzx ecx, word [rax + 0x18]
cmp dword [rbx + 0x38], ecx
jb 0x18004c404
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c49c
mov r8d, dword [rbx + 0x28]
cmp r8d, r10d
jbe 0x18004c49c
mov ecx, dword [rsi + 0x4c]
sub r8d, r10d
mov edx, r10d
add rdx, qword [rbx + 0x10]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov rax, qword [rbx + 0x30]
mov ecx, dword [rax + 0x18]
cmp dword [rbx + 0x38], ecx
jne 0x18004c4ae
mov dword [rbx + 0x38], edi
mov dword [rbx + 8], ebp
cmp dword [rbx + 8], ebp
jne 0x18004c568
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x20], rdi
je 0x18004c561
mov edx, dword [rbx + 0x28]
mov r8d, dword [rbx + 0x28]
cmp r8d, dword [rbx + 0x18]
jne 0x18004c509
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c4f4
cmp r8d, edx
jbe 0x18004c4f4
mov ecx, dword [rsi + 0x4c]
sub r8d, edx
mov edx, edx
add rdx, qword [rbx + 0x10]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.18004d47c
mov r8d, dword [rbx + 0x28]
mov edx, r8d
cmp r8d, dword [rbx + 0x18]
je 0x18004c533
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x20]
movzx ebp, byte [rax + rcx]
lea eax, [rcx + 1]
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov ecx, r8d
mov byte [rcx + rax], bpl
add dword [rbx + 0x28], r12d
test ebp, ebp
je 0x18004c536
jmp 0x18004c4c8
mov ebp, r12d
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c55a
mov r8d, dword [rbx + 0x28]
cmp r8d, edx
jbe 0x18004c55a
mov ecx, dword [rsi + 0x4c]
sub r8d, edx
add rdx, qword [rbx + 0x10]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
test ebp, ebp
jne 0x18004c568
mov dword [rbx + 0x38], edi
mov dword [rbx + 8], 0x5b
cmp dword [rbx + 8], 0x5b
jne 0x18004c620
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x30], rdi
je 0x18004c619
mov edx, dword [rbx + 0x28]
mov r8d, dword [rbx + 0x28]
cmp r8d, dword [rbx + 0x18]
jne 0x18004c5c4
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c5af
cmp r8d, edx
jbe 0x18004c5af
mov ecx, dword [rsi + 0x4c]
sub r8d, edx
mov edx, edx
add rdx, qword [rbx + 0x10]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.18004d47c
mov r8d, dword [rbx + 0x28]
mov edx, r8d
cmp r8d, dword [rbx + 0x18]
je 0x18004c5ee
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x30]
movzx ebp, byte [rax + rcx]
lea eax, [rcx + 1]
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov ecx, r8d
mov byte [rcx + rax], bpl
add dword [rbx + 0x28], r12d
test ebp, ebp
je 0x18004c5f1
jmp 0x18004c583
mov ebp, r12d
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c615
mov r8d, dword [rbx + 0x28]
cmp r8d, edx
jbe 0x18004c615
mov ecx, dword [rsi + 0x4c]
sub r8d, edx
add rdx, qword [rbx + 0x10]
call fcn.18004a954
mov dword [rsi + 0x4c], eax
test ebp, ebp
jne 0x18004c620
mov dword [rbx + 8], 0x67
cmp dword [rbx + 8], 0x67
jne 0x18004c684
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x18004c67d
mov eax, dword [rbx + 0x28]
add eax, r13d
cmp eax, dword [rbx + 0x18]
jbe 0x18004c642
mov rcx, rsi
call fcn.18004d47c
mov ecx, dword [rbx + 0x28]
lea eax, [rcx + 2]
cmp eax, dword [rbx + 0x18]
ja 0x18004c684
mov al, byte [rsi + 0x4c]
mov edx, ecx
mov rcx, qword [rbx + 0x10]
xor r8d, r8d
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
mov al, byte [rsi + 0x4d]
mov byte [rdx + rcx], al
xor edx, edx
add dword [rbx + 0x28], r12d
xor ecx, ecx
call fcn.18004a954
mov dword [rsi + 0x4c], eax
mov dword [rbx + 8], 0x71
cmp dword [rbx + 0x28], edi
je 0x18004c6a1
mov rcx, rsi
call fcn.18004d47c
cmp dword [rsi + 0x18], edi
jne 0x18004c6e6
or dword [rbx + 0x40], 0xffffffff
xor eax, eax
jmp 0x18004c918
cmp dword [rsi + 8], edi
jne 0x18004c6e6
cmp r15d, 4
lea edx, [r15 + r15]
mov r8d, 9
mov eax, edi
cmovg eax, r8d
mov ecx, edi
sub edx, eax
lea eax, [r14 + r14]
cmp r14d, 4
cmovg ecx, r8d
sub eax, ecx
cmp eax, edx
jg 0x18004c6e6
cmp r14d, 4
je 0x18004c6e6
mov rax, qword [0x180060cd8]
mov qword [rsi + 0x20], rax
jmp 0x18004c096
mov ebp, 0x29a
cmp dword [rbx + 8], ebp
jne 0x18004c6f7
cmp dword [rsi + 8], edi
je 0x18004c6fc
jmp 0x18004c6d6
cmp dword [rsi + 8], edi
jne 0x18004c716
cmp dword [rbx + 0x9c], edi
jne 0x18004c716
test r14d, r14d
je 0x18004c7e4
cmp dword [rbx + 8], ebp
je 0x18004c7e4
mov eax, dword [rbx + 0xb0]
mov edx, r14d
mov rcx, rbx
cmp eax, r13d
jne 0x18004c72e
call fcn.18004cd68
jmp 0x18004c74f
cmp eax, 3
jne 0x18004c73a
call fcn.18004cf1c
jmp 0x18004c74f
movsxd rax, dword [rbx + 0xac]
lea r8, [0x180060e08]
add rax, rax
call qword [r8 + rax*8]
mov ecx, eax
lea eax, [rax - 2]
cmp eax, r12d
ja 0x18004c75c
mov dword [rbx + 8], ebp
test ecx, 0xfffffffd
je 0x18004c8fa
cmp ecx, r12d
jne 0x18004c7e4
cmp r14d, r12d
jne 0x18004c77c
mov rcx, rbx
call fcn.18004d7d8
jmp 0x18004c7d3
cmp r14d, 5
je 0x18004c7d3
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.18004db9c
cmp r14d, 3
jne 0x18004c7d3
mov ecx, dword [rbx + 0x74]
mov rax, qword [rbx + 0x68]
sub ecx, r12d
mov word [rax + rcx*2], di
mov edx, dword [rbx + 0x74]
mov rcx, qword [rbx + 0x68]
lea edx, [rdx*2 - 2]
call fcn.18004aca0
cmp dword [rbx + 0x9c], edi
jne 0x18004c7d3
mov dword [rbx + 0x94], edi
mov dword [rbx + 0x84], edi
mov dword [rbx + 0x170c], edi
mov rcx, rsi
call fcn.18004d47c
cmp dword [rsi + 0x18], edi
je 0x18004c696
cmp r14d, 4
jne 0x18004c69a
cmp dword [rbx + 0x2c], edi
jg 0x18004c7fb
mov eax, r12d
jmp 0x18004c918
cmp dword [rbx + 0x2c], r13d
jne 0x18004c88b
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0x4c]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0x4d]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0x4e]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0x4f]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0xc]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0xd]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov al, byte [rsi + 0xe]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
add dword [rbx + 0x28], r12d
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
mov al, byte [rsi + 0xf]
mov byte [rdx + rcx], al
jmp 0x18004c8d7
movzx r8d, word [rsi + 0x4e]
mov ecx, dword [rbx + 0x28]
mov edx, r8d
mov rax, qword [rbx + 0x10]
shr edx, 8
mov byte [rcx + rax], dl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], r8b
add dword [rbx + 0x28], r12d
movzx r8d, word [rsi + 0x4c]
mov edx, dword [rbx + 0x28]
mov ecx, r8d
mov rax, qword [rbx + 0x10]
shr ecx, 8
mov byte [rdx + rax], cl
add dword [rbx + 0x28], r12d
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], r8b
add dword [rbx + 0x28], r12d
mov rcx, rsi
call fcn.18004d47c
mov eax, dword [rbx + 0x2c]
test eax, eax
jle 0x18004c8ef
neg eax
mov dword [rbx + 0x2c], eax
cmp dword [rbx + 0x28], edi
sete dil
mov eax, edi
jmp 0x18004c918
cmp dword [rsi + 0x18], edi
jne 0x18004c69a
jmp 0x18004c696
mov rax, qword [0x180060cc0]
mov qword [rcx + 0x20], rax
mov eax, 0xfffffffe
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret