Function at 0x14003cb40
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 0x14003d2aa
test rdx, rdx
je 0x14003d2aa
mov rsi, qword [rcx]
test rsi, rsi
je 0x14003cb9c
mov eax, 0xffffffff
lock xadd dword [rsi + 8], eax
cmp eax, 1
jne 0x14003cb9c
mov rcx, rsi
call fcn.14003b080
mov rax, qword [0x1400c0338]
mov rcx, rsi
test rax, rax
je 0x14003cb96
call rax
jmp 0x14003cb9c
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 0x14003cbc4
test al, 8
jne 0x14003cbc4
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 0x14003cc33
bt edx, 0x1d
jae 0x14003cc33
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x14003ccb8
mov byte [rbx + 0x317], 3
jmp 0x14003cc37
cmp al, 3
jne 0x14003cc51
mov al, 3
bt edx, 0x1b
jae 0x14003cc51
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x14003ccb8
mov byte [rbx + 0x317], 2
jmp 0x14003cc55
cmp al, 2
jne 0x14003cc77
mov al, 2
bt edx, 0x1a
jae 0x14003cc77
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x14003ccb8
and word [rbx + 0x4e6], r11w
mov byte [rbx + 0x317], bpl
jmp 0x14003cc7c
cmp al, bpl
jne 0x14003cca6
movzx eax, bpl
bt edx, 0xd
jae 0x14003ccb0
mov rax, qword [rdi]
cmp byte [rax + 3], 0
je 0x14003ccb8
mov eax, 0xffe7
mov byte [rbx + 0x317], 0
and word [rbx + 0x4e6], ax
xor al, al
jmp 0x14003ccaa
test al, al
jne 0x14003ccb0
bt edx, 0xc
jb 0x14003ccb8
cmp al, byte [rbx + 0x4f9]
jae 0x14003ccca
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 0x14003cd2b
cmp byte [rax + 2], 3
je 0x14003cd51
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 + 0x4f9], 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 + 0x500], ax
movzx eax, word [rdi + 0xaa]
mov word [rbx + 0x502], ax
movzx eax, word [rdi + 0xac]
mov word [rbx + 0x506], ax
movzx eax, word [rdi + 0xae]
mov word [rbx + 0x508], ax
movzx eax, byte [rdi + 0xa0]
mov byte [rbx + 0x50a], 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 [rdi + 0x78]
mov byte [rbx + 0x258], al
movzx eax, byte [rbx + 0x259]
movzx ecx, al
xor cl, byte [rdi + 0x79]
and cl, bpl
xor cl, al
mov byte [rbx + 0x259], cl
movzx eax, cl
xor al, byte [rdi + 0x79]
and al, 2
xor al, cl
mov byte [rbx + 0x259], al
mov eax, dword [rdi + 0x7c]
mov dword [rbx + 0x25c], eax
mov eax, dword [rdi + 0x80]
mov dword [rbx + 0x260], eax
test r9, r9
je 0x14003d211
mov rax, qword [rdi + 0x90]
test rax, rax
jne 0x14003d17f
xor edx, edx
mov r8d, 0x158
mov rcx, r9
call sub.VCRUNTIME140.dll_memset
jmp 0x14003d211
mov ecx, 2
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 0x14003d184
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 0x14003d22f
mov rcx, rbx
call fcn.14003c9f0
mov ebp, eax
mov edx, dword [rdi + 0xb0]
test edx, edx
je 0x14003d245
mov rcx, rbx
call fcn.14002fd30
test eax, eax
je 0x14003d2aa
movzx eax, byte [rdi + 0x1c0]
mov byte [rbx + 0x560], al
lea rax, [0x140095d80]
cmp qword [rbx + 0xc0], rax
je 0x14003d270
mov rax, qword [rdi + 0x100]
mov qword [rbx + 0xc0], rax
lea rax, [0x140095ef0]
cmp qword [rbx + 0xc8], rax
je 0x14003d28e
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