Function at 0x140055cd8
Capabilities:
Encrypt data using chaskey

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r14
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x140163470]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rsi, rcx
mov rbx, rdx
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x100
xor r14b, r14b
call fcn.1400ebf40
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0x23]
call fcn.1400ebf40
xor eax, eax
mov edi, 0xfc
mov qword [rsp + 0x38], rax
lea r12d, [rax + 0xa]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x60]
lea rdx, [rsp + 0x38]
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov al, byte [rsi + 0x41]
mov rcx, rsi
shl al, 5
mov word [rsp + 0x58], 0xa01
mov dword [rsp + 0x50], edi
mov byte [rsp + 0x39], al
mov rax, qword [rsi]
mov dword [rsp + 0x54], r12d
mov byte [rsp + 0x38], 0x5a
mov byte [rsp + 0x3a], 0x2a
mov byte [rsp + 0x40], dil
call qword [rax + 0x18]
cmp al, 1
jne 0x140055d8f
mov dil, byte [rsp + 0x67]
add dil, 8
jmp 0x140055e02
lea rcx, [rsp + 0x60]
xor edx, edx
mov r8d, 0x100
call fcn.1400ebf40
xor eax, eax
lea rdx, [rsp + 0x38]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
mov al, byte [rsi + 0x41]
xor r8d, r8d
shl al, 5
mov rcx, rsi
mov word [rsp + 0x58], 0x601
mov byte [rsp + 0x39], al
mov rax, qword [rsi]
mov dword [rsp + 0x50], edi
mov dword [rsp + 0x54], r12d
mov byte [rsp + 0x38], 0x1a
mov byte [rsp + 0x3a], 0x2a
mov byte [rsp + 0x3c], dil
call qword [rax + 0x18]
cmp al, 1
jne 0x140055f15
mov dil, byte [rsp + 0x63]
add dil, 4
and dword [rbx + 5], 0xffffffc0
movzx r11d, dil
mov r14b, 1
movzx r10d, byte [rsp + r11 + 0x66]
movzx eax, byte [rsp + r11 + 0x65]
movzx edx, byte [rsp + r11 + 0x63]
movzx ecx, byte [rsp + r11 + 0x64]
movzx r9d, byte [rsp + r11 + 0x62]
mov r8d, r10d
shl r8d, 8
and r9d, 0x3f
shr r10b, 5
or r8d, eax
mov eax, edx
and edx, 0x30
and eax, 7
shl r8d, 8
mov byte [rbx + 4], r10b
or r8d, ecx
shl r8d, 5
or r8d, eax
movzx eax, byte [rsp + r11 + 0x67]
and eax, 0x3f
add r8d, r8d
or dword [rbx + 5], eax
or r8d, edx
shl r8d, 5
or r8d, r9d
mov r9d, 0x100
add r8d, r8d
or r8d, 1
mov dword [rbx], r8d
movzx r8d, dil
lea eax, [r8 + 8]
movsxd rcx, eax
movzx edx, byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + rcx + 0x61]
imul dx, r9w
add dx, ax
lea eax, [r8 + 0xc]
mov word [rbx + 0xb], dx
movsxd rcx, eax
movzx edx, byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + rcx + 0x61]
imul dx, r9w
add dx, ax
lea eax, [r8 + 0xe]
movsxd rcx, eax
mov word [rbx + 9], dx
movzx edx, byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + rcx + 0x61]
imul dx, r9w
add dx, ax
lea eax, [r8 + 0x12]
movsxd rcx, eax
mov word [rbx + 0xf], dx
movzx eax, byte [rsp + rcx + 0x60]
movzx edx, byte [rsp + rcx + 0x61]
imul ax, r9w
add dx, ax
lea eax, [r8 + 0x14]
mov word [rbx + 0xd], dx
movsxd rcx, eax
movzx edx, byte [rsp + rcx + 0x60]
movzx eax, byte [rsp + rcx + 0x61]
imul dx, r9w
add dx, ax
mov word [rbx + 0x11], dx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r12d, 8
mov r8d, 0x1003a
mov rcx, rax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor edx, edx
xor r8d, r8d
mov rdi, rax
mov qword [rsp + 0x30], rax
mov eax, 0xfffa
mov r9, rdi
mov rcx, rsi
mov word [rsp + 0x20], ax
call fcn.140056374
movzx ecx, byte [rdi + 1]
movzx eax, byte [rdi + 2]
shl eax, 8
shl ecx, 0x10
lea r9, [rdi + 8]
add ecx, eax
movzx eax, byte [rdi]
shl eax, 0x18
add ecx, eax
movzx eax, byte [rdi + 3]
add ecx, eax
mov eax, 0xfff6
cmp ecx, eax
cmova ecx, eax
cmp ecx, 4
jb 0x140056339
lea r10d, [rcx - 4]
cmp r10d, 4
jl 0x140056339
mov r11b, byte [rsp + 0x32]
lea esi, [r12 - 6]
mov edi, 0x100
mov cl, byte [r9 + 2]
movzx r8d, byte [r9]
movzx eax, byte [r9 + 1]
imul r8w, di
add r8w, ax
mov al, cl
mov dl, cl
and dl, sil
shl al, 2
and cl, 0x3c
or dl, al
mov al, r11b
shl dl, 5
and al, 3
or dl, cl
movzx ecx, r8w
mov r8d, pe_nt_image_headers64
mov r11b, dl
mov dl, byte [r9 + 3]
or r11b, al
cmp ecx, r8d
jg 0x14005625c
je 0x140056253
cmp ecx, 0x3b
jg 0x14005611e
je 0x140056108
sub ecx, 0x1f
je 0x1400560de
sub ecx, 0xb
je 0x1400560c2
dec ecx
je 0x1400560ac
sub ecx, 4
je 0x140056058
sub ecx, 4
je 0x14005604e
cmp ecx, 7
jne 0x140056314
or dword [rbx + 0x13], 0x40
movzx eax, byte [r9 + 4]
shl eax, 0x16
xor eax, dword [rbx + 0x13]
and eax, 0x400000
jmp 0x1400560d6
bts dword [rbx + 0x13], 0x1e
jmp 0x140056314
movzx eax, byte [r9 + 4]
shl eax, 0x10
xor eax, dword [rbx + 0x13]
and eax, 0x20000
xor dword [rbx + 0x13], eax
movzx ecx, byte [r9 + 4]
shl ecx, 0xd
xor ecx, dword [rbx + 0x13]
and ecx, 0x10000
xor ecx, dword [rbx + 0x13]
mov dword [rbx + 0x13], ecx
movzx eax, byte [r9 + 4]
shl eax, 0x11
xor eax, ecx
and eax, 0x40000
xor eax, ecx
mov dword [rbx + 0x13], eax
movzx eax, byte [r9 + 4]
shl eax, 7
xor eax, dword [rbx]
and eax, 0x400
xor dword [rbx], eax
jmp 0x140056314
or dword [rbx + 0x13], r12d
movzx eax, byte [r9 + 4]
shl eax, 0x13
xor eax, dword [rbx + 0x13]
and eax, 0x80000
jmp 0x1400560d6
or dword [rbx + 0x13], 0x20
movzx eax, byte [r9 + 4]
shl eax, 0x15
xor eax, dword [rbx + 0x13]
and eax, 0x200000
xor dword [rbx + 0x13], eax
jmp 0x140056314
or dword [rbx + 0x13], esi
movzx ecx, byte [r9 + 6]
xor ecx, dword [rbx + 0x13]
and ecx, 1
xor ecx, dword [rbx + 0x13]
mov dword [rbx + 0x13], ecx
movzx eax, byte [r9 + 6]
add eax, eax
xor eax, ecx
and eax, 4
xor eax, ecx
mov dword [rbx + 0x13], eax
jmp 0x140056314
or dword [rbx + 0x13], 0x10
movzx eax, byte [r9 + 4]
shl eax, 0x14
xor eax, dword [rbx + 0x13]
and eax, 0x100000
jmp 0x1400560d6
sub ecx, 0x40
je 0x140056202
dec ecx
je 0x1400561ca
dec ecx
je 0x1400561c0
sub ecx, 0xe
je 0x140056182
dec ecx
jne 0x140056314
movzx eax, byte [r9 + 4]
shl eax, 0x17
xor eax, dword [rbx + 0x13]
and eax, 0x800000
xor dword [rbx + 0x13], eax
movzx ecx, byte [r9 + 5]
shl ecx, 0x18
xor ecx, dword [rbx + 0x13]
and ecx, 0x1000000
xor ecx, dword [rbx + 0x13]
mov dword [rbx + 0x13], ecx
movzx eax, byte [r9 + 6]
shl eax, 0x1b
xor eax, ecx
and eax, 0x8000000
jmp 0x1400560fe
bts dword [rbx + 0x13], 0xc
movzx eax, byte [r9 + 4]
shl eax, 7
xor eax, dword [rbx + 0x13]
and eax, r8d
xor eax, dword [rbx + 0x13]
mov dword [rbx + 0x13], eax
movzx ecx, byte [r9 + 5]
shl ecx, 8
xor ecx, eax
and ecx, edi
xor ecx, eax
mov dword [rbx + 0x13], ecx
movzx eax, byte [r9 + 6]
shl eax, 0xb
xor eax, ecx
and eax, 0x800
jmp 0x1400560fe
bts dword [rbx + 0x13], 0x1f
jmp 0x140056314
mov rax, r12
xor r8d, r8d
cmp byte [rax + r9], r8b
je 0x1400561db
bts dword [rbx + 0x13], 0x1d
inc rax
cmp rax, 0xf
jle 0x1400561d0
mov eax, InitCommonControls
cmp byte [rax + r9], r8b
je 0x1400561f4
bts dword [rbx + 0x13], 0x1c
inc rax
cmp rax, 0x17
jle 0x1400561e9
jmp 0x140056314
mov rax, r12
xor r8b, r8b
cmp byte [rax + r9], r8b
je 0x140056213
bts dword [rbx + 0x13], 0xd
inc rax
cmp rax, 0xf
jle 0x140056208
mov eax, InitCommonControls
cmp byte [rax + r9], r8b
je 0x14005622c
bts dword [rbx + 0x13], 0xe
inc rax
cmp rax, 0x17
jle 0x140056221
mov eax, 0x18
cmp byte [rax + r9], r8b
je 0x140056245
bts dword [rbx + 0x13], 0xf
inc rax
cmp rax, 0x1f
jle 0x14005623a
jmp 0x140056314
or dword [rbx + 0x17], 1
jmp 0x140056314
mov eax, 0x107
cmp ecx, eax
jg 0x1400562a8
je 0x1400562a2
sub ecx, edi
je 0x14005629d
dec ecx
je 0x140056297
dec ecx
je 0x140056291
sub ecx, esi
je 0x140056288
cmp ecx, esi
jne 0x140056314
or dword [rbx + 0x17], 0x20
jmp 0x140056314
or dword [rbx + 0x17], 0x10
jmp 0x140056314
or dword [rbx + 0x17], r12d
jmp 0x140056314
or dword [rbx + 0x17], 4
jmp 0x140056314
or dword [rbx + 0x17], esi
jmp 0x140056314
or dword [rbx + 0x17], 0x40
jmp 0x140056314
sub ecx, 0x10a
je 0x140056310
dec ecx
je 0x14005630b
sub ecx, esi
je 0x1400562d3
sub ecx, 6
je 0x1400562cc
cmp ecx, 0xfe20
jne 0x140056314
bts dword [rbx + 0x17], 0xd
jmp 0x140056314
bts dword [rbx + 0x17], 0xb
jmp 0x140056314
and dword [rbx + 0x17], 0xfffff9ff
movzx eax, r11b
shr eax, 7
shl eax, 9
add eax, 0x200
and eax, 0x600
or dword [rbx + 0x17], eax
movzx eax, byte [r9 + 4]
and eax, 1
mov dword [rbx + 0x1f], eax
movzx eax, byte [r9 + 4]
shr eax, 1
and eax, 1
mov dword [rbx + 0x1b], eax
jmp 0x140056314
or dword [rbx + 0x17], edi
jmp 0x140056314
or dword [rbx + 0x17], r8d
movzx edx, dl
lea eax, [rdx + 4]
movsxd rcx, eax
add r9, rcx
mov ecx, 0xfffffffc
sub ecx, edx
add r10d, ecx
cmp r10d, 4
jge 0x140055fa7
mov rdi, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, r14b
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1400e8bc0
mov rbx, qword [rsp + 0x1b0]
add rsp, 0x170
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret