Function at 0x140039d50
Capabilities:
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x78
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x30], 0x8004
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
cmp qword [rsp + 0x90], 0
jne 0x140039db9
jmp 0x140039f7e
cmp qword [rsp + 0xa8], 0
jne 0x140039dce
jmp 0x140039f7e
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140039e04
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
jmp 0x140039f7e
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x140039e3b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
jmp 0x140039f7e
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x58]
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x60]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x140039e8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
jmp 0x140039f7e
mov eax, dword [rsp + 0x98]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x90]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
xor r9d, r9d
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x140039ed5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
jmp 0x140039f7e
mov dword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
xor r8d, r8d
mov edx, 4
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x140039f07
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
jmp 0x140039f7e
cmp qword [rsp + 0xa0], 0
jne 0x140039f26
mov rax, qword [rsp + 0xa8]
mov ecx, dword [rsp + 0x48]
mov dword [rax], ecx
jmp 0x140039f7e
mov rax, qword [rsp + 0xa8]
mov ecx, dword [rsp + 0x48]
cmp dword [rax], ecx
jae 0x140039f48
mov rax, qword [rsp + 0xa8]
mov ecx, dword [rsp + 0x48]
mov dword [rax], ecx
jmp 0x140039f7e
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0xa8]
mov r8, qword [rsp + 0xa0]
mov edx, 2
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x140039f7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
cmp qword [rsp + 0x50], 0
je 0x140039f9c
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x50]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rsp + 0x40], 0
je 0x140039faf
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp qword [rsp + 0x38], 0
je 0x140039fc4
xor edx, edx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [rsp + 0x4c]
add rsp, 0x78
pop rdi
pop rsi
ret