Function at 0x180025598
Capabilities:
Hash data via bcrypt

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r13d, r13d
mov r15, rdx
mov qword [rbp - 0x10], r13
mov r12, rcx
mov qword [rbp - 8], r13
mov r14d, r13d
mov dword [rbp + 0x58], r13d
mov esi, r13d
mov dword [rbp + 0x40], r13d
test rcx, rcx
je 0x180025785
test rdx, rdx
je 0x180025785
lea esi, [r13 + 8]
mov r9d, esi
lea r8, str.Microsoft_Primitive_Provider
lea rdx, str.SHA256
lea rcx, [rbp - 0x10]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x1800257a3
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x50]
lea edi, [rsi - 4]
mov dword [rsp + 0x28], r13d
mov r9d, edi
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x58]
lea rdx, [0x180053af8]
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x1800257a3
cmp dword [rbp + 0x50], edi
jne 0x1800257a3
mov ebx, dword [rbp + 0x58]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8d, ebx
mov edx, esi
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov r14, rax
test rax, rax
jne 0x180025681
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x1800257a3
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x50]
mov dword [rsp + 0x28], r13d
lea r8, [rbp + 0x40]
mov r9d, edi
mov qword [rsp + 0x20], rax
lea rdx, str.HashDigestLength
mov dword [rbp + 0x50], edi
call qword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x1800257a3
cmp dword [rbp + 0x50], edi
jne 0x1800257a3
mov ebx, dword [rbp + 0x40]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8d, ebx
mov edx, esi
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov rsi, rax
test rax, rax
je 0x180025674
mov r9d, dword [rbp + 0x58]
lea rdx, [rbp - 8]
mov rcx, qword [rbp - 0x10]
mov r8, r14
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.bcrypt.dll_BCryptCreateHash]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x18002578a
or rax, 0xffffffffffffffff
inc rax
cmp word [r12 + rax*2], r13w
jne 0x18002571a
mov rcx, qword [rbp - 8]
lea r8d, [rax + rax]
xor r9d, r9d
mov rdx, r12
call qword [sym.imp.bcrypt.dll_BCryptHashData]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x18002578a
mov r8d, dword [rbp + 0x40]
xor r9d, r9d
mov rcx, qword [rbp - 8]
mov rdx, rsi
call qword [sym.imp.bcrypt.dll_BCryptFinishHash]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov ebx, eax
test eax, eax
jne 0x18002578a
xor eax, eax
mov dword [r15], eax
cmp dword [rbp + 0x40], edi
ja 0x180025775
mov edi, dword [rbp + 0x40]
mov r8, rdi
mov rdx, rsi
mov rcx, r15
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
jmp 0x18002578a
mov ebx, 0x57
test rsi, rsi
je 0x1800257a3
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x1800257ba
call qword [sym.imp.bcrypt.dll_BCryptDestroyHash]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
test r14, r14
je 0x1800257d3
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1800257ec
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov ecx, eax
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov eax, ebx
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret