Function at 0x1400879c0
Capabilities:
Encrypt data using chaskey

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
sub rsp, 0x20
mov rdi, rdx
mov rbx, rcx
test rcx, rcx
je 0x140088136
test rdx, rdx
je 0x140088136
mov rsi, qword [rcx]
test rsi, rsi
je 0x140087a1c
mov eax, 0xffffffff
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x140087a1c
mov rcx, rsi
call fcn.140085b10
mov rax, qword [0x1407065f8]
mov rcx, rsi
test rax, rax
je 0x140087a16
call rax
jmp 0x140087a1c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lock inc dword [rdi + 8]
movzx eax, word [rbx + 0x312]
mov ebp, 1
mov qword [rbx], rdi
test al, 6
jne 0x140087a44
test al, 8
jne 0x140087a44
mov rax, qword [rdi]
movzx ecx, word [rax]
mov word [rbx + 0x316], cx
movzx eax, word [rbx + 0x4e4]
mov r11d, 0xffef
mov edx, dword [rdi + 0xb0]
movzx ecx, ax
mov dword [rbx + 0x4e0], edx
xor cx, word [rdi + 0xa6]
and cx, bp
xor cx, ax
mov word [rbx + 0x4e4], cx
movzx eax, cx
xor ax, word [rdi + 0xa6]
and ax, 2
xor ax, cx
mov word [rbx + 0x4e4], ax
movzx eax, byte [rbx + 0x317]
cmp al, 4
jne 0x140087ab3
bt edx, 0x1d
jae 0x140087ab3
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x140087b3c
mov byte [rbx + 0x317], 3
jmp 0x140087ab7
cmp al, 3
jne 0x140087ad5
mov al, 3
bt edx, 0x1b
jae 0x140087ad5
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x140087b3c
mov byte [rbx + 0x317], 2
mov al, 2
mov ecx, edx
jmp 0x140087adb
mov ecx, edx
cmp al, 2
jne 0x140087afb
bt edx, 0x1a
jae 0x140087afb
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x140087b3c
and word [rbx + 0x4e6], r11w
mov byte [rbx + 0x317], bpl
jmp 0x140087b00
cmp al, bpl
jne 0x140087b2a
movzx eax, bpl
bt ecx, 0xd
jae 0x140087b34
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x140087b3c
mov eax, 0xffe7
mov byte [rbx + 0x317], 0
and word [rbx + 0x4e6], ax
xor al, al
jmp 0x140087b2e
test al, al
jne 0x140087b34
bt ecx, 0xc
jb 0x140087b3c
cmp al, byte [rbx + 0x4f7]
jae 0x140087b4e
mov eax, 0xfffffeba
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
movzx eax, word [rdi + 0x140]
mov word [rbx + 0x5e0], ax
mov eax, dword [rdi + 0x13c]
mov dword [rbx + 0x5b8], eax
mov eax, dword [rdi + 0x144]
mov dword [rbx + 0x5e4], eax
mov rax, qword [rdi + 0xf0]
mov qword [rbx + 0x530], rax
mov eax, dword [rdi + 0x138]
mov dword [rbx + 0x2fc], eax
mov rax, qword [rdi + 0x118]
mov qword [rbx + 0xa8], rax
mov rax, qword [rdi]
mov qword [rsp + 0x40], r14
test rsi, rsi
je 0x140087baf
cmp byte [rax + 2], 3
je 0x140087bd5
movzx eax, byte [rax + 2]
mov edx, 0xfcff
and al, 3
movzx ecx, al
movzx eax, word [rbx + 0x4e4]
and ax, dx
shl cx, 8
or cx, ax
mov word [rbx + 0x4e4], cx
mov rax, qword [rdi]
mov edx, 0x7fff
mov r14d, 0xbfff
movzx ecx, byte [rax + 3]
movzx eax, word [rbx + 0x4e4]
and cl, bpl
and ax, r14w
movzx r9d, cl
shl r9w, 0xe
or r9w, ax
mov word [rbx + 0x4e4], r9w
movzx eax, byte [rdi + 0xa4]
mov byte [rbx + 0x4f7], al
movzx eax, byte [rdi + 0xa2]
shr al, 2
movzx ecx, al
movzx eax, word [rbx + 0x4e6]
and ax, dx
shl cx, 0xf
or cx, ax
mov word [rbx + 0x4e6], cx
mov ecx, 0xfffd
movzx eax, byte [rdi + 0xa2]
shr al, 4
and al, bpl
movzx edx, al
movzx eax, word [rbx + 0x4e8]
add dx, dx
and ax, cx
or dx, ax
mov word [rbx + 0x4e8], dx
movzx eax, byte [rdi + 0xa2]
shr al, 5
and al, bpl
movzx ecx, al
mov eax, 0xfffb
and dx, ax
shl cx, 2
or cx, dx
mov word [rbx + 0x4e8], cx
movzx eax, byte [rdi + 0xa2]
shr al, 3
and al, bpl
movzx edx, al
mov eax, 0xfffe
and cx, ax
or dx, cx
mov word [rbx + 0x4e8], dx
movzx eax, byte [rdi + 0xa3]
and al, bpl
movzx r8d, al
mov eax, 0xfff7
and dx, ax
shl r8w, 3
or r8w, dx
mov word [rbx + 0x4e8], r8w
and r8w, r11w
movzx eax, byte [rdi + 0xa2]
shr al, 6
and al, bpl
movzx ecx, al
shl cx, 4
or cx, r8w
mov r8d, 0xffdf
mov word [rbx + 0x4e8], cx
and cx, r8w
movzx eax, byte [rdi + 0xa2]
shr al, 7
movzx r10d, al
shl r10w, 5
or r10w, cx
mov word [rbx + 0x4e8], r10w
movzx eax, word [rdi + 0xa8]
mov word [rbx + 0x4fe], ax
movzx eax, word [rdi + 0xaa]
mov word [rbx + 0x500], ax
movzx eax, word [rdi + 0xac]
mov word [rbx + 0x504], ax
movzx eax, word [rdi + 0xae]
mov word [rbx + 0x506], ax
movzx eax, byte [rdi + 0xa0]
mov byte [rbx + 0x508], al
and r9w, r11w
movzx eax, byte [rdi + 0xa1]
mov esi, 0xfbff
shr al, 4
mov r11d, 0xf7ff
and al, bpl
movzx ecx, al
shl cx, 4
or cx, r9w
mov r9d, 0xdfff
mov word [rbx + 0x4e4], cx
and cx, r8w
movzx eax, byte [rdi + 0xa1]
shr al, 5
and al, bpl
movzx edx, al
shl dx, 5
or dx, cx
mov word [rbx + 0x4e4], dx
movzx eax, byte [rdi + 0xa1]
shr al, 6
and al, bpl
movzx ecx, al
mov eax, 0xffbf
and dx, ax
shl cx, 6
or cx, dx
mov word [rbx + 0x4e4], cx
movzx eax, byte [rdi + 0xa1]
shr al, 7
movzx edx, al
mov eax, 0xff7f
and cx, ax
shl dx, 7
or dx, cx
mov word [rbx + 0x4e4], dx
and dx, si
movzx eax, byte [rdi + 0xa1]
and al, bpl
movzx r8d, al
shl r8w, 0xa
or r8w, dx
mov word [rbx + 0x4e4], r8w
and r8w, r11w
movzx eax, byte [rdi + 0xa1]
shr al, 1
and al, bpl
movzx ecx, al
shl cx, 0xb
or cx, r8w
mov word [rbx + 0x4e4], cx
movzx eax, byte [rdi + 0xa1]
shr al, 2
and al, bpl
movzx r8d, al
mov eax, 0xefff
and cx, ax
shl r8w, 0xc
or r8w, cx
mov word [rbx + 0x4e4], r8w
and r8w, r9w
movzx eax, byte [rdi + 0xa1]
shr al, 3
and al, bpl
movzx edx, al
shl dx, 0xd
or dx, r8w
mov word [rbx + 0x4e4], dx
movzx eax, byte [rdi + 0xa2]
and al, 3
movzx ecx, al
mov eax, 0xfff3
and dx, ax
shl cx, 2
or cx, dx
mov word [rbx + 0x4e4], cx
movzx eax, byte [rdi + 0xa3]
shr al, 1
and al, bpl
movzx ecx, al
shl cx, 0xa
and r10w, si
or cx, r10w
mov word [rbx + 0x4e8], cx
and cx, r11w
movzx eax, byte [rdi + 0xa3]
shr al, 3
and al, bpl
movzx edx, al
shl dx, 0xb
or dx, cx
mov word [rbx + 0x4e8], dx
and dx, r9w
movzx eax, byte [rdi + 0xa3]
mov r9, qword [rbx + 8]
shr al, 4
and al, bpl
movzx ecx, al
shl cx, 0xd
or cx, dx
mov word [rbx + 0x4e8], cx
movzx eax, byte [rdi + 0xa5]
shr al, 4
and al, bpl
movzx ecx, al
movzx eax, word [rbx + 0x4ea]
and ax, r14w
shl cx, 0xe
mov r14, qword [rsp + 0x40]
or cx, ax
mov word [rbx + 0x4ea], cx
movups xmm0, xmmword [rdi + 0x10]
movups xmmword [rbx + 0x200], xmm0
movups xmm0, xmmword [rdi + 0x20]
movups xmmword [rbx + 0x210], xmm0
mov rax, qword [rdi + 0x30]
mov qword [rbx + 0x248], rax
mov rax, qword [rdi + 0x38]
mov qword [rbx + 0x268], rax
mov eax, dword [rdi + 0x68]
mov dword [rbx + 0x270], eax
mov rax, qword [rdi + 0x70]
mov qword [rbx + 0x250], rax
movzx eax, byte [rbx + 0x258]
movzx ecx, al
xor cl, byte [rdi + 0x78]
and cl, 0x3f
xor cl, al
mov byte [rbx + 0x258], cl
movzx edx, cl
xor dl, byte [rdi + 0x78]
and dl, 0x40
xor dl, cl
mov byte [rbx + 0x258], dl
xor dl, byte [rdi + 0x78]
and dl, 0x7f
xor dl, byte [rdi + 0x78]
mov byte [rbx + 0x258], dl
mov eax, dword [rdi + 0x7c]
mov dword [rbx + 0x25c], eax
mov eax, dword [rdi + 0x80]
mov dword [rbx + 0x260], eax
test r9, r9
je 0x14008809d
mov rax, qword [rdi + 0x90]
test rax, rax
jne 0x140088009
xor edx, edx
mov r8d, 0x158
mov rcx, r9
call sub.VCRUNTIME140.dll_memset
jmp 0x14008809d
mov ecx, 2
nop
lea r9, [r9 + 0x80]
movups xmm0, xmmword [rax]
lea rax, [rax + 0x80]
movups xmmword [r9 - 0x80], xmm0
movups xmm1, xmmword [rax - 0x70]
movups xmmword [r9 - 0x70], xmm1
movups xmm0, xmmword [rax - 0x60]
movups xmmword [r9 - 0x60], xmm0
movups xmm1, xmmword [rax - 0x50]
movups xmmword [r9 - 0x50], xmm1
movups xmm0, xmmword [rax - 0x40]
movups xmmword [r9 - 0x40], xmm0
movups xmm1, xmmword [rax - 0x30]
movups xmmword [r9 - 0x30], xmm1
movups xmm0, xmmword [rax - 0x20]
movups xmmword [r9 - 0x20], xmm0
movups xmm1, xmmword [rax - 0x10]
movups xmmword [r9 - 0x10], xmm1
sub rcx, rbp
jne 0x140088010
movups xmm0, xmmword [rax]
movups xmmword [r9], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [r9 + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [r9 + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [r9 + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [r9 + 0x40], xmm0
mov rcx, qword [rax + 0x50]
mov qword [r9 + 0x50], rcx
movzx eax, word [rbx + 0x4e4]
mov ecx, 0x300
and ax, cx
cmp ax, cx
je 0x1400880bb
mov rcx, rbx
call fcn.140087870
mov ebp, eax
mov edx, dword [rdi + 0xb0]
test edx, edx
je 0x1400880d1
mov rcx, rbx
call fcn.14007ae60
test eax, eax
je 0x140088136
movzx eax, byte [rdi + 0x1c0]
mov byte [rbx + 0x560], al
lea rax, [0x1400e1360]
cmp qword [rbx + 0xc0], rax
je 0x1400880fc
mov rax, qword [rdi + 0x100]
mov qword [rbx + 0xc0], rax
lea rax, [0x1400e14d0]
cmp qword [rbx + 0xc8], rax
je 0x14008811a
mov rax, qword [rdi + 0x108]
mov qword [rbx + 0xc8], rax
movzx eax, byte [rdi + 0xa0]
mov byte [rbx + 0x30c], al
mov eax, ebp
mov rbx, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret
mov rbx, qword [rsp + 0x48]
mov eax, 0xffffff53
add rsp, 0x20
pop rdi
pop rsi
pop rbp
ret