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

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rsi
push r15
sub rsp, 0x30
mov r15d, edx
mov rsi, rcx
test rcx, rcx
je 0x1400520fa
cmp qword [rcx + 0x30], 0
je 0x1400520fa
cmp qword [rcx + 0x38], 0
je 0x1400520fa
mov rbx, qword [rcx + 0x28]
test rbx, rbx
je 0x1400520fa
cmp qword [rbx], rcx
jne 0x1400520fa
mov ecx, dword [rbx + 8]
cmp ecx, 0x2a
je 0x140051493
lea eax, [rcx - 0x39]
cmp eax, 0x38
ja 0x140051487
movabs rdx, 0x100400400011001
bt rdx, rax
jb 0x140051493
cmp ecx, 0x29a
jne 0x1400520fa
cmp qword [rsi + 0x10], 0
je 0x1400520ef
cmp dword [rsi + 8], 0
je 0x1400514ae
cmp qword [rsi], 0
je 0x1400520ef
cmp ecx, 0x29a
jne 0x1400514c0
cmp r15d, 4
jne 0x1400520ef
cmp dword [rsi + 0x18], 0
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r14
je 0x1400515c0
mov edx, dword [rbx + 0x40]
xor r13d, r13d
mov dword [rbx + 0x40], r15d
cmp dword [rbx + 0x28], r13d
je 0x140051577
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051546
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051546
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
cmp dword [rsi + 0x18], r13d
jne 0x1400515ac
mov dword [rbx + 0x40], 0xffffffff
xor eax, eax
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x50]
mov r14, qword [rsp + 0x20]
add rsp, 0x30
pop r15
pop rsi
pop rbx
ret
cmp dword [rsi + 8], r13d
jne 0x1400515ac
cmp edx, 4
mov r8d, 9
mov eax, r13d
mov ecx, r13d
cmovg eax, r8d
add edx, edx
sub edx, eax
lea eax, [r15 + r15]
cmp r15d, 4
cmovg ecx, r8d
sub eax, ecx
cmp eax, edx
jg 0x1400515ac
cmp r15d, 4
jne 0x1400515c0
mov eax, dword [rbx + 8]
cmp eax, 0x29a
jne 0x1400515d2
cmp dword [rsi + 8], r13d
je 0x140051752
lea rax, str.buffer_error
mov qword [rsi + 0x20], rax
mov eax, 0xfffffffb
jmp 0x140051555
cmp eax, 0x2a
jne 0x140051752
cmp dword [rbx + 0x2c], r13d
jne 0x1400515ed
mov dword [rbx + 8], 0x71
jmp 0x140051752
mov ecx, dword [rbx + 0x48]
shl ecx, 0xc
sub ecx, 0x7800
cmp dword [rbx + 0xb0], 2
mov r8d, ecx
jge 0x14005163b
mov eax, dword [rbx + 0xac]
cmp eax, 2
jl 0x14005163b
cmp eax, 6
jge 0x140051621
mov eax, 0x40
mov edx, 0x60
jmp 0x140051643
jne 0x14005162f
mov eax, 0x80
mov edx, 0xa0
jmp 0x140051643
mov eax, 0xc0
mov edx, 0xe0
jmp 0x140051643
mov eax, r13d
mov edx, 0x20
or ecx, eax
cmp dword [rbx + 0x94], r13d
je 0x140051653
mov ecx, edx
or ecx, r8d
mov eax, 0x8421085
mul ecx
mov rax, qword [rbx + 0x10]
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 4
inc ecx
imul r8d, ecx, 0x1f
mov ecx, dword [rbx + 0x28]
mov edx, r8d
shr edx, 8
mov byte [rcx + rax], dl
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r8b
mov eax, dword [rbx + 0x28]
inc eax
mov dword [rbx + 0x28], eax
cmp dword [rbx + 0x94], r13d
je 0x1400516eb
movzx r8d, word [rsi + 0x4e]
mov ecx, eax
mov edx, r8d
mov rax, qword [rbx + 0x10]
shr edx, 8
mov byte [rcx + rax], dl
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r8b
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx r8d, word [rsi + 0x4c]
mov ecx, r8d
shr ecx, 8
mov byte [rdx + rax], cl
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r8b
inc dword [rbx + 0x28]
mov dword [rsi + 0x4c], 1
mov dword [rbx + 8], 0x71
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051748
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051748
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
cmp dword [rbx + 0x28], r13d
jne 0x14005154c
cmp dword [rbx + 8], 0x39
jne 0x1400519f6
xor r8d, r8d
lea rdi, [rsi + 0x4c]
xor edx, edx
xor ecx, ecx
call fcn.140053c70
mov dword [rdi], eax
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], 0x1f
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], 0x8b
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], 8
mov r8d, dword [rbx + 0x28]
mov r9, qword [rbx + 0x30]
inc r8d
mov dword [rbx + 0x28], r8d
test r9, r9
jne 0x1400518a3
mov rax, qword [rbx + 0x10]
mov byte [r8 + rax], r13b
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r13b
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r13b
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r13b
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r13b
mov ecx, dword [rbx + 0x28]
mov eax, dword [rbx + 0xac]
inc ecx
mov dword [rbx + 0x28], ecx
cmp eax, 9
jne 0x140051810
mov dl, 2
jmp 0x140051824
cmp dword [rbx + 0xb0], 2
jge 0x140051822
cmp eax, 2
jl 0x140051822
xor dl, dl
jmp 0x140051824
mov dl, 4
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], 0xa
inc dword [rbx + 0x28]
mov dword [rbx + 8], 0x71
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051894
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051894
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
cmp dword [rbx + 0x28], r13d
jne 0x14005154c
jmp 0x1400519f6
mov rax, qword [r9 + 0x20]
neg rax
mov rax, qword [r9 + 0x10]
sbb dl, dl
and dl, 8
neg rax
mov eax, dword [r9 + 0x3c]
sbb cl, cl
and cl, 4
add dl, cl
neg eax
mov rax, qword [r9 + 0x30]
sbb cl, cl
and cl, 2
add dl, cl
neg rax
sbb cl, cl
and cl, 0x10
add dl, cl
cmp dword [r9], r13d
setne al
add dl, al
mov rax, qword [rbx + 0x10]
mov byte [r8 + rax], dl
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 4]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 5]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 6]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 7]
mov byte [rdx + rcx], al
mov ecx, dword [rbx + 0x28]
mov eax, dword [rbx + 0xac]
inc ecx
mov dword [rbx + 0x28], ecx
cmp eax, 9
jne 0x14005195b
mov dl, 2
jmp 0x140051973
cmp dword [rbx + 0xb0], 2
jge 0x140051971
lea rdi, [rsi + 0x4c]
cmp eax, 2
jl 0x140051971
xor dl, dl
jmp 0x140051973
mov dl, 4
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 0xc]
mov byte [rdx + rcx], al
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc ecx
mov dword [rbx + 0x28], ecx
cmp qword [rax + 0x10], r13
je 0x1400519d1
movzx eax, byte [rax + 0x18]
mov edx, ecx
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
inc edx
mov rcx, qword [rbx + 0x10]
mov dword [rbx + 0x28], edx
movzx eax, byte [rax + 0x19]
mov byte [rdx + rcx], al
mov eax, dword [rbx + 0x28]
inc eax
mov dword [rbx + 0x28], eax
mov ecx, eax
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x1400519eb
mov rdx, qword [rbx + 0x10]
mov r8d, ecx
mov ecx, dword [rdi]
call fcn.140053c70
mov dword [rdi], eax
mov dword [rbx + 0x38], r13d
mov dword [rbx + 8], 0x45
mov eax, dword [rbx + 8]
cmp eax, 0x45
jne 0x140051b3f
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x10], r13
je 0x140051b36
movzx r12d, word [rax + 0x18]
sub r12d, dword [rbx + 0x38]
mov edi, dword [rbx + 0x28]
mov r15d, dword [rbx + 0x18]
mov ecx, edi
lea eax, [rdi + r12]
cmp eax, r15d
jbe 0x140051ae9
nop
mov rax, qword [rbx + 0x30]
sub r15d, ecx
mov edx, dword [rbx + 0x38]
add rcx, qword [rbx + 0x10]
mov r8d, r15d
add rdx, qword [rax + 0x10]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x30]
mov ecx, dword [rbx + 0x18]
mov dword [rbx + 0x28], ecx
cmp dword [rax + 0x3c], r13d
je 0x140051a74
cmp ecx, edi
jbe 0x140051a74
sub ecx, edi
mov edx, edi
add rdx, qword [rbx + 0x10]
mov r8d, ecx
mov ecx, dword [rsi + 0x4c]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
add dword [rbx + 0x38], r15d
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051ac7
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051ac7
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov ecx, dword [rbx + 0x28]
test ecx, ecx
jne 0x14005154c
sub r12d, r15d
mov edi, r13d
mov r15d, dword [rbx + 0x18]
lea eax, [rcx + r12]
cmp eax, r15d
ja 0x140051a30
mov rax, qword [rbx + 0x30]
mov edx, dword [rbx + 0x38]
add rcx, qword [rbx + 0x10]
mov r8d, r12d
add rdx, qword [rax + 0x10]
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
add ecx, r12d
mov dword [rbx + 0x28], ecx
cmp dword [rax + 0x3c], r13d
je 0x140051b2d
cmp ecx, edi
jbe 0x140051b2d
sub ecx, edi
mov edx, edi
add rdx, qword [rbx + 0x10]
mov r8d, ecx
mov ecx, dword [rsi + 0x4c]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov r15d, dword [rsp + 0x58]
mov dword [rbx + 0x38], r13d
mov dword [rbx + 8], 0x49
jmp 0x140051b48
cmp eax, 0x49
jne 0x140051c50
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x20], r13
je 0x140051c47
mov r9d, dword [rbx + 0x28]
mov r8d, r9d
nop dword [rax]
cmp r8d, dword [rbx + 0x18]
jne 0x140051bed
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x140051b8e
cmp r8d, r9d
jbe 0x140051b8e
mov ecx, dword [rsi + 0x4c]
sub r8d, r9d
mov edx, r9d
add rdx, qword [rbx + 0x10]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051bdd
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051bdd
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov r8d, dword [rbx + 0x28]
test r8d, r8d
jne 0x14005154c
mov r9d, r13d
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x20]
movzx edx, byte [rcx + rax]
lea eax, [rcx + 1]
mov ecx, r8d
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
mov r8d, dword [rbx + 0x28]
inc r8d
mov dword [rbx + 0x28], r8d
test dl, dl
jne 0x140051b60
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x140051c43
cmp r8d, r9d
jbe 0x140051c43
mov ecx, dword [rsi + 0x4c]
sub r8d, r9d
mov edx, r9d
add rdx, qword [rbx + 0x10]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov dword [rbx + 0x38], r13d
mov dword [rbx + 8], 0x5b
jmp 0x140051c59
cmp eax, 0x5b
jne 0x140051d5c
mov rax, qword [rbx + 0x30]
cmp qword [rax + 0x30], r13
je 0x140051d53
mov r9d, dword [rbx + 0x28]
mov r8d, r9d
nop
cmp r8d, dword [rbx + 0x18]
jne 0x140051cfd
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x140051c9e
cmp r8d, r9d
jbe 0x140051c9e
mov ecx, dword [rsi + 0x4c]
sub r8d, r9d
mov edx, r9d
add rdx, qword [rbx + 0x10]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051ced
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051ced
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov r8d, dword [rbx + 0x28]
test r8d, r8d
jne 0x14005154c
mov r9d, r13d
mov ecx, dword [rbx + 0x38]
mov rax, qword [rbx + 0x30]
mov rax, qword [rax + 0x30]
movzx edx, byte [rcx + rax]
lea eax, [rcx + 1]
mov ecx, r8d
mov dword [rbx + 0x38], eax
mov rax, qword [rbx + 0x10]
mov byte [rcx + rax], dl
mov r8d, dword [rbx + 0x28]
inc r8d
mov dword [rbx + 0x28], r8d
test dl, dl
jne 0x140051c70
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x140051d53
cmp r8d, r9d
jbe 0x140051d53
mov ecx, dword [rsi + 0x4c]
sub r8d, r9d
mov edx, r9d
add rdx, qword [rbx + 0x10]
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov dword [rbx + 8], 0x67
jmp 0x140051d65
cmp eax, 0x67
jne 0x140051e6a
mov rax, qword [rbx + 0x30]
cmp dword [rax + 0x3c], r13d
je 0x140051e0a
mov ecx, dword [rbx + 0x28]
lea eax, [rcx + 2]
cmp eax, dword [rbx + 0x18]
jbe 0x140051dd8
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051dcd
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051dcd
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov ecx, dword [rbx + 0x28]
test ecx, ecx
jne 0x14005154c
movzx eax, byte [rsi + 0x4c]
xor r8d, r8d
mov edx, ecx
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0x4d]
mov byte [rdx + rcx], al
xor edx, edx
inc dword [rbx + 0x28]
xor ecx, ecx
call fcn.140053c70
mov dword [rsi + 0x4c], eax
mov dword [rbx + 8], 0x71
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051e60
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051e60
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
cmp dword [rbx + 0x28], r13d
jne 0x14005154c
cmp dword [rsi + 8], r13d
jne 0x140051e8f
cmp dword [rbx + 0x9c], r13d
jne 0x140051e8f
test r15d, r15d
je 0x140051553
cmp dword [rbx + 8], 0x29a
je 0x140051f6a
movsxd rcx, dword [rbx + 0xac]
mov edx, r15d
test ecx, ecx
jne 0x140051ea7
mov rcx, rbx
call fcn.140052400
jmp 0x140051edf
mov eax, dword [rbx + 0xb0]
cmp eax, 2
jne 0x140051ebc
mov rcx, rbx
call fcn.140053990
jmp 0x140051edf
cmp eax, 3
jne 0x140051ecb
mov rcx, rbx
call fcn.140053540
jmp 0x140051edf
mov rax, rcx
lea r8, fcn.140052400
add rax, rax
mov rcx, rbx
call qword [r8 + rax*8]
mov ecx, eax
lea eax, [rax - 2]
cmp eax, 1
ja 0x140051ef0
mov dword [rbx + 8], 0x29a
test ecx, 0xfffffffd
je 0x1400520e0
cmp ecx, 1
jne 0x140051f6a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140055220
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x140051f60
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x140051f60
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
cmp dword [rsi + 0x18], r13d
je 0x14005154c
cmp r15d, 4
jne 0x140051553
mov ecx, dword [rbx + 0x2c]
test ecx, ecx
jg 0x140051f85
mov eax, 1
jmp 0x140051555
cmp ecx, 2
jne 0x140052023
mov edx, dword [rbx + 0x28]
movzx eax, byte [rsi + 0x4c]
mov rcx, qword [rbx + 0x10]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0x4d]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0x4e]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0x4f]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0xc]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0xd]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0xe]
mov byte [rdx + rcx], al
mov edx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx eax, byte [rsi + 0xf]
mov byte [rdx + rcx], al
jmp 0x140052072
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
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r8b
mov edx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc edx
mov dword [rbx + 0x28], edx
movzx r8d, word [rsi + 0x4c]
mov ecx, r8d
shr ecx, 8
mov byte [rdx + rax], cl
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x10]
inc ecx
mov dword [rbx + 0x28], ecx
mov byte [rcx + rax], r8b
inc dword [rbx + 0x28]
mov rbp, qword [rsi + 0x28]
mov rcx, rbp
call fcn.140055370
mov r14d, dword [rsi + 0x18]
cmp dword [rbp + 0x28], r14d
cmovbe r14d, dword [rbp + 0x28]
test r14d, r14d
je 0x1400520c4
mov rdx, qword [rbp + 0x20]
mov rcx, qword [rsi + 0x10]
mov r8d, r14d
mov edi, r14d
call sub.VCRUNTIME140.dll_memcpy
add qword [rsi + 0x10], rdi
add qword [rbp + 0x20], rdi
add dword [rsi + 0x1c], r14d
sub dword [rsi + 0x18], r14d
sub dword [rbp + 0x28], r14d
jne 0x1400520c4
mov rax, qword [rbp + 0x10]
mov qword [rbp + 0x20], rax
mov eax, dword [rbx + 0x2c]
test eax, eax
jle 0x1400520d0
neg eax
mov dword [rbx + 0x2c], eax
cmp dword [rbx + 0x28], r13d
sete r13b
mov eax, r13d
jmp 0x140051555
cmp dword [rsi + 0x18], r13d
jne 0x140051553
jmp 0x14005154c
lea rax, str.stream_error
mov qword [rsi + 0x20], rax
mov eax, 0xfffffffe
add rsp, 0x30
pop r15
pop rsi
pop rbx
ret