Function at 0x40f170
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4188e8
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0xf
mov byte [ebp - 0x54], 0
mov dword [ebp - 4], 0
mov edi, dword [esi]
mov dword [ebp - 0x58], 0x10
test edi, edi
jne 0x40f1e9
mov dword [ebp - 0x5c], edi
jmp 0x40f1fd
push 0x104
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strnlen]
mov edi, dword [esi]
add esp, 8
mov dword [ebp - 0x5c], eax
push 0xf0000000
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push 0
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x40f393
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push 0x8003
push dword [ebp - 0x3c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40f393
push 0
push dword [ebp - 0x5c]
push edi
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40f393
push 0
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x34]
push eax
push 2
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40f393
push ecx
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x74]
call fcn.0040f720
mov edi, eax
add esp, 4
lea eax, [ebp - 0x54]
cmp eax, edi
je 0x40f2eb
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x40f2b7
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f2ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f311
push edx
push ecx
call fcn.00416baa
add esp, 8
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0xf
mov byte [ebp - 0x54], 0
movups xmm0, xmmword [edi]
movups xmmword [ebp - 0x54], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [ebp - 0x44], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov edx, dword [ebp - 0x60]
cmp edx, 0x10
jb 0x40f321
mov ecx, dword [ebp - 0x74]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f317
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f317
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416baa
add esp, 8
cmp dword [ebp - 0x40], 0x10
lea eax, [ebp - 0x54]
push 0
cmovae eax, dword [ebp - 0x54]
lea edi, [esi + 0x10]
push 1
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40f3f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x40f3eb
cmp dword [ebp - 0x40], 0x10
lea eax, [ebp - 0x54]
push 8
cmovae eax, dword [ebp - 0x54]
push 1
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40f3f2
push str.InitRSAKey_Error:_CRYPT_NEWKEYSET_error_r_n
push 0x400
push dword [esi + 4]
call fcn.00404b30
add esp, 0xc
push dword [esi + 4]
call fcn.004027f0
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40f3a3
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40f3b3
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov edx, dword [ebp - 0x40]
cmp edx, 0x10
jb 0x40f4a4
mov ecx, dword [ebp - 0x54]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40f49a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f49a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push str.InitRSAKey_Error:_GetLastError_____NTE_BAD_KEYSET_r_n
jmp 0x40f378
lea edi, [esi + 0x14]
push edi
push 1
push dword [esi + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x40f43e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x8009000d
jne 0x40f434
push edi
push 0x8000000
push 0xa400
push dword [esi + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x40f43e
push str.InitRSAKey_Error:_CryptGenKey_error_r_n
jmp 0x40f378
push str.InitRSAKey_Error:_GetLastError_____NTE_NO_KEY_r_n
jmp 0x40f378
lea eax, [esi + 0x38]
push eax
push 0
push 0
push 6
push 0
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f460
push str.InitRSAKey_Error:_Get_blobLength_error_r_n
jmp 0x40f378
push dword [esi + 0x38]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov dword [esi + 0x34], eax
lea ecx, [esi + 0x38]
push ecx
push eax
push 0
push 6
push 0
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f490
push str.InitRSAKey_Error:_CryptExportKey_error_r_n
jmp 0x40f378
mov esi, 1
jmp 0x40f395
push edx
push ecx
call fcn.00416baa
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret