Function at 0x140006740
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10150]
mov eax, 0x10250
call fcn.1400086d0
sub rsp, rax
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x102a0], rbx
mov rax, qword [0x140010008]
xor rax, rsp
mov qword [rbp + 0x10140], rax
mov rdi, rdx
mov rbx, rcx
xor esi, esi
mov dword [rsp + 0x48], esi
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], rsi
mov word [rsp + 0x60], si
mov rcx, rdx
call fcn.140001cb0
test al, al
jne 0x14000685f
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jb 0x1400067ca
mov rax, qword [rbx]
jmp 0x1400067cd
mov rax, rbx
mov word [rax], si
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.140005af0
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x140006f07
inc rdx
mov rcx, qword [rsp + 0x60]
movabs rax, 0x7fffffffffffffff
cmp rdx, rax
jbe 0x14000680b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rax, [rdx + rdx]
cmp rax, 0x1000
jb 0x140006855
test byte [rsp + 0x60], 0x1f
je 0x140006825
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140006835
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x140006845
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x140006852
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, rax
call fcn.1400073b0
jmp 0x140006f07
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x8000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x14000693e
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jb 0x1400068ae
mov rax, qword [rbx]
jmp 0x1400068b1
mov rax, rbx
mov word [rax], si
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.140005af0
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x140006f07
inc rdx
mov rcx, qword [rsp + 0x60]
movabs rax, 0x7fffffffffffffff
cmp rdx, rax
jbe 0x1400068ef
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
lea rax, [rdx + rdx]
cmp rax, 0x1000
jb 0x140006855
test byte [rsp + 0x60], 0x1f
je 0x14000690d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x14000691d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
sub rcx, rax
cmp rcx, 8
jae 0x14000692d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
cmp rcx, 0x27
jbe 0x140006852
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov qword [rbp - 0x80], rsi
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 0x18
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x14000698f
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jb 0x140006984
mov rax, qword [rbx]
jmp 0x140006987
mov rax, rbx
mov word [rax], si
jmp 0x140006eef
mov qword [rbp - 0x70], rsi
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x800c
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov rcx, r15
test eax, eax
jne 0x1400069cc
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x14000696c
mov dword [rsp + 0x58], esi
xor eax, eax
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x58]
lea r8d, [rax + 0x40]
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
test eax, eax
je 0x1400069b8
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp - 0x24]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x140006a2a
mov rcx, r15
jmp 0x1400069b8
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x20]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x58]
mov r8d, 0x108
lea rdx, [rbp - 0x20]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r15
test eax, eax
je 0x1400069b8
movsxd rax, dword [rbp - 0x24]
lea r12, [rax + 0x58]
lea r13, [rax + 0xa8]
mov r14d, dword [rbp + 0x88]
mov esi, dword [rbp + 0x8c]
mov dword [rsp + 0x44], esi
xor edi, edi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, r15
cmp eax, 0xffffffff
jne 0x140006ace
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
xor ecx, ecx
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rcx
cmp qword [rbx + 0x18], 8
jb 0x140006ee9
mov rax, qword [rbx]
jmp 0x140006eec
mov byte [rsp + 0x40], dil
mov byte [rsp + 0x41], dil
test esi, esi
setle byte [rsp + 0x42]
xor eax, eax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
mov r8d, 0x10000
lea rdx, [rbp + 0x140]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test eax, eax
je 0x140006eb0
nop dword [rax + rax]
mov r8d, dword [rsp + 0x58]
test r8d, r8d
je 0x140006c37
add edi, r8d
cmp byte [rsp + 0x40], 0
jne 0x140006b66
movsxd rcx, edi
cmp rcx, r12
jle 0x140006b66
mov byte [rsp + 0x40], 1
mov eax, r12d
sub eax, edi
add r8d, eax
mov dword [rsp + 0x58], r8d
lea edi, [r12 + 4]
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140006c37
mov r8d, dword [rsp + 0x58]
cmp byte [rsp + 0x41], 0
jne 0x140006baa
movsxd rax, edi
cmp rax, r13
jle 0x140006baa
mov byte [rsp + 0x41], 1
mov eax, r13d
sub eax, edi
add r8d, eax
mov dword [rsp + 0x58], r8d
lea edi, [r13 + 8]
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140006c37
mov r8d, dword [rsp + 0x58]
cmp byte [rsp + 0x42], 0
jne 0x140006bea
cmp edi, r14d
jle 0x140006bea
mov byte [rsp + 0x42], 1
mov eax, r14d
sub eax, edi
add r8d, eax
mov dword [rsp + 0x58], r8d
mov edi, dword [rsp + 0x44]
add edi, r14d
xor r9d, r9d
xor r8d, r8d
mov edx, edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140006c37
mov r8d, dword [rsp + 0x58]
xor r9d, r9d
lea rdx, [rbp + 0x140]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x140006eb0
xor eax, eax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x58]
mov r8d, 0x10000
lea rdx, [rbp + 0x140]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test eax, eax
jne 0x140006b10
jmp 0x140006eb0
test esi, esi
je 0x140006eb0
mov dword [rbp - 0x78], 0x20
movups xmm0, xmmword [str.0123456789ABCDEF]
movups xmmword [rbp + 0xf0], xmm0
movups xmm1, xmmword [0x14000c488]
movups xmmword [rbp + 0x100], xmm1
movzx eax, word [0x14000c498]
mov word [rbp + 0x110], ax
xor r13d, r13d
mov dword [rsp + 0x20], r13d
lea r9, [rbp - 0x78]
lea r8, [rbp + 0x118]
lea edx, [r13 + 2]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x140006e70
mov esi, r13d
cmp dword [rbp - 0x78], r13d
jbe 0x140006e70
movabs rdx, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x70]
nop word [rax + rax]
mov eax, esi
lea r14, [rbp + 0x118]
add r14, rax
movzx eax, byte [r14]
shr rax, 4
movzx r12d, word [rbp + rax*2 + 0xf0]
mov rax, rcx
not rax
cmp rax, 1
jbe 0x140006e62
lea rdi, [rcx + 1]
cmp rdi, rdx
ja 0x140006e54
cmp qword [rsp + 0x78], rdi
jae 0x140006d1d
mov r8, rcx
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.140005d90
movabs rdx, 0x7ffffffffffffffe
jmp 0x140006d3c
test rdi, rdi
jne 0x140006d46
mov qword [rsp + 0x70], r13
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax], r13w
mov rcx, qword [rsp + 0x70]
test rdi, rdi
je 0x140006d7c
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax + rcx*2], r12w
mov qword [rsp + 0x70], rdi
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax + rdi*2], r13w
mov rcx, qword [rsp + 0x70]
movzx eax, byte [r14]
and eax, 0xf
movzx r14d, word [rbp + rax*2 + 0xf0]
mov rax, rcx
not rax
cmp rax, 1
jbe 0x140006e46
lea rdi, [rcx + 1]
cmp rdi, rdx
ja 0x140006e38
cmp qword [rsp + 0x78], rdi
jae 0x140006dcc
mov r8, rcx
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.140005d90
movabs rdx, 0x7ffffffffffffffe
jmp 0x140006deb
test rdi, rdi
jne 0x140006df5
mov qword [rsp + 0x70], r13
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax], r13w
mov rcx, qword [rsp + 0x70]
test rdi, rdi
je 0x140006e2b
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax + rcx*2], r14w
mov qword [rsp + 0x70], rdi
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov word [rax + rdi*2], r13w
mov rcx, qword [rsp + 0x70]
inc esi
cmp esi, dword [rbp - 0x78]
jb 0x140006cc0
jmp 0x140006e70
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r13
cmp qword [rbx + 0x18], 8
jb 0x140006ea7
mov rax, qword [rbx]
jmp 0x140006eaa
mov rax, rbx
mov word [rax], r13w
jmp 0x140006eef
xor edx, edx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rcx
cmp qword [rbx + 0x18], 8
jb 0x140006ee9
mov rax, qword [rbx]
jmp 0x140006eec
mov rax, rbx
mov word [rax], cx
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.140005af0
nop
lea rcx, [rsp + 0x60]
call fcn.140005600
mov rax, rbx
mov rcx, qword [rbp + 0x10140]
xor rcx, rsp
call fcn.140007350
mov rbx, qword [rsp + 0x102a0]
add rsp, 0x10250
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret