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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
xor edi, edi
mov r14d, edx
mov rsi, rcx
test rcx, rcx
je 0x1400670c9
mov rbx, qword [rcx + 0x28]
test rbx, rbx
je 0x1400670c9
cmp qword [rcx + 0x10], rdi
je 0x1400670be
cmp qword [rcx], rdi
jne 0x14006684b
cmp dword [rcx + 8], edi
jne 0x1400670be
cmp dword [rbx + 8], 0x29a
jne 0x14006685e
cmp r14d, 4
jne 0x1400670be
cmp dword [rcx + 0x18], edi
je 0x1400670ac
cmp dword [rbx + 8], 0x2a
mov r12d, 1
mov r15d, dword [rbx + 0x40]
mov qword [rbx], rsi
mov dword [rbx + 0x40], r14d
lea r10d, [r12 + 0x70]
jne 0x140066ba2
cmp dword [rbx + 0x2c], 2
jne 0x140066aaa
mov dword [rcx + 0x4c], edi
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]
mov r9d, dword [rbx + 0x28]
test r8, r8
jne 0x140066961
mov rax, qword [rbx + 0x10]
mov byte [r9 + 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 0x140066929
mov dl, 2
jmp 0x14006693c
cmp dword [rbx + 0xb0], 2
jge 0x14006693a
mov dl, dil
cmp eax, 2
jge 0x14006693c
mov dl, 4
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], reloc.WS2_32.dll_inet_addr
mov eax, r10d
add dword [rbx + 0x28], r12d
jmp 0x140066aa2
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, 2
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, 4
add dl, cl
cmp dword [r8], edi
setne al
add dl, al
mov rax, qword [rbx + 0x10]
mov byte [r9 + 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 0x140066a0d
mov dl, 2
jmp 0x140066a20
cmp dword [rbx + 0xb0], 2
jge 0x140066a1e
mov dl, dil
cmp eax, 2
jge 0x140066a20
mov dl, 4
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 0x140066a7d
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 0x140066a9a
mov rdx, qword [rbx + 0x10]
test rdx, rdx
jne 0x140066a8f
mov eax, edi
jmp 0x140066a97
mov ecx, dword [rsi + 0x4c]
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
mov dword [rbx + 0x38], edi
mov eax, 0x45
mov dword [rbx + 8], eax
jmp 0x140066ba2
mov ecx, dword [rbx + 0x48]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [rbx + 0xb0], 2
mov r8d, ecx
jge 0x140066af2
mov eax, dword [rbx + 0xac]
cmp eax, 2
jl 0x140066af2
cmp eax, 6
jge 0x140066adc
mov eax, reloc.OLEAUT32.dll_VarI4FromDisp
lea edx, [rax + 0x20]
jmp 0x140066af9
jne 0x140066ae8
mov eax, 0x80
lea edx, [rax + 0x20]
jmp 0x140066af9
mov eax, 0xc0
lea edx, [rax + 0x20]
jmp 0x140066af9
mov eax, edi
mov edx, 0x20
or ecx, eax
cmp dword [rbx + 0x94], edi
je 0x140066b08
mov ecx, r8d
or ecx, edx
mov eax, 0x8421085
mov dword [rbx + 8], r10d
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 0x140066b9e
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 dword [rsi + 0x4c], r12d
mov eax, dword [rbx + 8]
cmp eax, 0x45
jne 0x140066c80
mov rdx, qword [rbx + 0x30]
cmp qword [rdx + 0x10], rdi
je 0x140066cc6
mov r10d, dword [rbx + 0x28]
mov ecx, r10d
jmp 0x140066c30
cmp ecx, dword [rbx + 0x18]
jne 0x140066c05
cmp dword [rdx + 0x3c], edi
je 0x140066bf2
cmp ecx, r10d
jbe 0x140066bf2
sub ecx, r10d
mov edx, r10d
add rdx, qword [rbx + 0x10]
jne 0x140066be4
mov eax, edi
jmp 0x140066bef
mov r8d, ecx
mov ecx, dword [rsi + 0x4c]
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.140066790
mov ecx, dword [rbx + 0x28]
mov r10d, ecx
cmp ecx, dword [rbx + 0x18]
je 0x140066c39
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
mov ecx, dword [rbx + 0x28]
inc ecx
add dword [rbx + 0x38], r12d
mov dword [rbx + 0x28], ecx
mov rdx, qword [rbx + 0x30]
movzx eax, word [rdx + 0x18]
cmp dword [rbx + 0x38], eax
jb 0x140066bc5
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066c69
cmp ecx, r10d
jbe 0x140066c69
sub ecx, r10d
mov edx, r10d
add rdx, qword [rbx + 0x10]
jne 0x140066c57
mov eax, edi
jmp 0x140066c62
mov r8d, ecx
mov ecx, dword [rsi + 0x4c]
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
mov rax, qword [rbx + 0x30]
mov eax, dword [rax + 0x18]
cmp dword [rbx + 0x38], eax
jne 0x140066cc1
mov dword [rbx + 0x38], edi
mov eax, 0x49
mov dword [rbx + 8], 0x49
cmp eax, 0x49
jne 0x140066d66
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x20], rdi
je 0x140066dac
mov r8d, dword [rbx + 0x28]
mov edx, r8d
cmp edx, dword [rbx + 0x18]
jne 0x140066cf3
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066ce0
cmp edx, r8d
jbe 0x140066ce0
sub edx, r8d
mov eax, r8d
add rax, qword [rbx + 0x10]
jne 0x140066ccf
mov eax, edi
jmp 0x140066cdd
mov eax, dword [rbx + 8]
jmp 0x140066c80
mov dword [rbx + 8], 0x49
jmp 0x140066c89
mov ecx, dword [rsi + 0x4c]
mov r8d, edx
mov rdx, rax
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.140066790
mov edx, dword [rbx + 0x28]
mov r8d, edx
cmp edx, dword [rbx + 0x18]
je 0x140066d23
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x20]
movzx ebp, byte [rcx + rax]
lea eax, [rcx + 1]
mov ecx, edx
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], bpl
mov edx, dword [rbx + 0x28]
inc edx
mov dword [rbx + 0x28], edx
test ebp, ebp
je 0x140066d26
jmp 0x140066c9e
mov ebp, r12d
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066d55
cmp edx, r8d
jbe 0x140066d55
sub edx, r8d
mov eax, r8d
add rax, qword [rbx + 0x10]
jne 0x140066d44
mov eax, edi
jmp 0x140066d52
mov ecx, dword [rsi + 0x4c]
mov r8d, edx
mov rdx, rax
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
test ebp, ebp
jne 0x140066da7
mov dword [rbx + 0x38], edi
lea eax, [rbp + 0x5b]
mov dword [rbx + 8], VarDateFromDisp
cmp eax, 0x5b
jne 0x140066e49
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x30], rdi
je 0x140066ec0
mov r8d, dword [rbx + 0x28]
mov edx, r8d
cmp edx, dword [rbx + 0x18]
jne 0x140066dd9
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066dc6
cmp edx, r8d
jbe 0x140066dc6
sub edx, r8d
mov eax, r8d
add rax, qword [rbx + 0x10]
jne 0x140066db5
mov eax, edi
jmp 0x140066dc3
mov eax, dword [rbx + 8]
jmp 0x140066d66
mov dword [rbx + 8], VarDateFromDisp
jmp 0x140066d6f
mov ecx, dword [rsi + 0x4c]
mov r8d, edx
mov rdx, rax
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
mov rcx, rsi
call fcn.140066790
mov edx, dword [rbx + 0x28]
mov r8d, edx
cmp edx, dword [rbx + 0x18]
je 0x140066e09
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x30]
movzx ebp, byte [rcx + rax]
lea eax, [rcx + 1]
mov ecx, edx
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], bpl
mov edx, dword [rbx + 0x28]
inc edx
mov dword [rbx + 0x28], edx
test ebp, ebp
je 0x140066e0c
jmp 0x140066d84
mov ebp, r12d
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066e3b
cmp edx, r8d
jbe 0x140066e3b
sub edx, r8d
mov eax, r8d
add rax, qword [rbx + 0x10]
jne 0x140066e2a
mov eax, edi
jmp 0x140066e38
mov ecx, dword [rsi + 0x4c]
mov r8d, edx
mov rdx, rax
call fcn.1400657e4
mov dword [rsi + 0x4c], eax
test ebp, ebp
jne 0x140066ebb
mov dword [rbx + 8], 0x67
lea eax, [rbp + 0x67]
cmp eax, 0x67
jne 0x140066ea4
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], edi
je 0x140066e9d
mov ecx, dword [rbx + 0x28]
mov edx, dword [rbx + 0x18]
lea eax, [rcx + 2]
cmp eax, edx
jbe 0x140066e72
mov rcx, rsi
call fcn.140066790
mov ecx, dword [rbx + 0x28]
mov edx, dword [rbx + 0x18]
lea eax, [rcx + 2]
cmp eax, edx
ja 0x140066ea4
mov al, byte [rsi + 0x4c]
mov edx, ecx
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 dword [rsi + 0x4c], edi
mov dword [rbx + 8], WSACleanup
cmp dword [rbx + 0x28], edi
je 0x140066ec9
mov rcx, rsi
call fcn.140066790
cmp dword [rsi + 0x18], edi
jne 0x140066edd
jmp 0x1400670a4
mov eax, dword [rbx + 8]
jmp 0x140066e49
mov dword [rbx + 8], 0x67
jmp 0x140066e4e
cmp dword [rsi + 8], edi
jne 0x140066edd
cmp r14d, r15d
jg 0x140066edd
cmp r14d, 4
jne 0x1400670ac
mov ebp, 0x29a
cmp dword [rbx + 8], ebp
jne 0x140066ef0
cmp dword [rsi + 8], edi
jne 0x1400670ac
cmp dword [rsi + 8], edi
jne 0x140066f0b
cmp dword [rbx + 0x9c], edi
jne 0x140066f0b
test r14d, r14d
je 0x1400670a8
cmp dword [rbx + 8], ebp
je 0x140066f89
mov eax, dword [rbx + 0xb0]
mov edx, r14d
mov rcx, rbx
cmp eax, 2
jne 0x140066f23
call fcn.140068540
jmp 0x140066f44
cmp eax, 3
jne 0x140066f2f
call fcn.14006827c
jmp 0x140066f44
movsxd rax, dword [rbx + 0xac]
lea r8, [0x1400d6868]
add rax, rax
call qword [r8 + rax*8]
mov ecx, eax
lea eax, [rax - 2]
cmp eax, r12d
ja 0x140066f51
mov dword [rbx + 8], ebp
test ecx, 0xfffffffd
je 0x14006709f
cmp ecx, r12d
jne 0x140066f89
cmp r14d, 5
je 0x140066f78
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.14006a42c
mov rcx, rsi
call fcn.140066790
cmp dword [rsi + 0x18], edi
je 0x1400670a4
cmp r14d, 4
jne 0x1400670a8
cmp dword [rbx + 0x2c], edi
jg 0x140066fa0
mov eax, r12d
jmp 0x1400670ce
cmp dword [rbx + 0x2c], 2
jne 0x140067030
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 0x14006707c
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.140066790
mov ecx, dword [rbx + 0x2c]
test ecx, ecx
jle 0x140067094
neg ecx
mov dword [rbx + 0x2c], ecx
cmp dword [rbx + 0x28], edi
sete dil
mov eax, edi
jmp 0x1400670ce
cmp dword [rsi + 0x18], edi
jne 0x1400670a8
or dword [rbx + 0x40], 0xffffffff
xor eax, eax
jmp 0x1400670ce
lea rax, str.buffer_error
mov qword [rsi + 0x20], rax
mov eax, 0xfffffffb
jmp 0x1400670ce
lea rax, str.stream_error
mov qword [rcx + 0x20], rax
mov eax, 0xfffffffe
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret