Function at 0x51aa10
Capabilities:
Create new key via cryptacquirecontext
Get common file path
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x350
mov eax, dword [0x6aae14]
xor eax, esp
mov dword [esp + 0x34c], eax
push ebx
xor ebx, ebx
push esi
push edi
push 0x103
lea eax, [esp + 0x51]
push ebx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov byte [esp + 0x28], bl
mov word [esp + 0x29], bx
mov byte [esp + 0x2b], bl
mov byte [esp + 0x1b], bl
mov dword [esp + 0x40], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x58], bl
call fcn.005dfd60
add esp, 0xc
xor esi, esi
cmp dword [esp + 0x360], 1
mov dword [esp + 0x20], ebx
jne 0x51aa8a
mov byte [esp + 0xf], 1
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push ebx
push str.SystemWPAPnP
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, ebx
jne 0x51aae5
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x3c]
push eax
push ebx
push ebx
push str.seed
push ecx
mov dword [esp + 0x3c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x51aaec
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x51b004
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
push eax
call edi
mov ebp, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
push ebx
push 1
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x28], ebx
call ebp
test eax, eax
jne 0x51acff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
je 0x51acea
cmp eax, 0x8009001d
jne 0x51afff
push 0x103
lea edx, [esp + 0x25d]
push ebx
push edx
mov byte [esp + 0x264], bl
call fcn.005dfd60
push 0x103
lea eax, [esp + 0x165]
push ebx
push eax
mov byte [esp + 0x16c], bl
call fcn.005dfd60
add esp, 0x18
call fcn.004d96c0
test eax, eax
je 0x51ab83
lea ecx, [esp + 0x24]
push ecx
call fcn.004f77e0
add esp, 4
mov esi, eax
push 0x104
lea edx, [esp + 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x258]
push eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x50]
push edx
call fcn.004e24e0
add esp, 4
push str.wbem
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x50]
push ebx
push ecx
call fcn.004e8c10
add esp, 8
test eax, eax
je 0x51ac26
lea eax, [esp + 0x258]
push eax
lea ecx, [esp + 0x158]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x154]
push edx
call fcn.004e24e0
add esp, 4
push str..._syswow64
lea eax, [esp + 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x154]
push ebx
push ecx
call fcn.004e8c10
add esp, 8
test eax, eax
jne 0x51ac3e
cmp esi, ebx
je 0x51ac37
mov edx, dword [esp + 0x24]
push edx
call fcn.004f7860
add esp, 4
xor eax, eax
jmp 0x51b003
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x68]
push eax
push str.rsaenh.dll
lea ecx, [esp + 0x174]
push ecx
call fcn.005017d0
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea edx, [esp + 0x68]
push edx
mov dword [esp + 0x54], eax
push str.psapi.dll
lea eax, [esp + 0x174]
push eax
call fcn.005017d0
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [esp + 0x68]
push ecx
push str.userenv.dll
lea edx, [esp + 0x174]
push edx
mov dword [esp + 0x50], eax
call fcn.005017d0
mov dword [esp + 0x30], eax
cmp esi, ebx
je 0x51acb2
mov eax, dword [esp + 0x24]
push eax
call fcn.004f7860
add esp, 4
push ebx
push 1
push ebx
push ebx
lea ecx, [esp + 0x28]
push ecx
call ebp
cmp eax, ebx
jne 0x51acff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x80090016
jne 0x51af71
push 8
push 1
push ebx
push ebx
lea edx, [esp + 0x28]
push edx
call ebp
cmp eax, ebx
je 0x51af71
jmp 0x51acff
push 8
push 1
push ebx
push ebx
lea eax, [esp + 0x28]
push eax
call ebp
test eax, eax
je 0x51ac37
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push ebx
push ebx
push 0x8003
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push ebx
test eax, eax
jne 0x51ad2b
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x51af71
mov eax, dword [esp + 0x20]
mov cl, byte [esp + 0x17]
mov esi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 4
lea edx, [esp + 0x28]
push edx
push eax
mov byte [esp + 0x30], bl
mov byte [esp + 0x31], cl
mov byte [esp + 0x32], bl
mov byte [esp + 0x33], bl
call esi
mov ecx, dword [esp + 0x1c]
test eax, eax
je 0x51adae
push ebx
push 4
lea eax, [esp + 0x44]
push eax
push ecx
call esi
test eax, eax
jne 0x51ad86
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x18]
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x51af71
mov eax, dword [esp + 0x1c]
push ebx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x48]
push edx
push 2
push eax
mov dword [esp + 0x3c], 0x10
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x51adc6
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov edx, dword [esp + 0x18]
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x51af71
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov ecx, dword [esp + 0x18]
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea edx, [esp + 0x14]
push edx
push 0x20006
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004dc0a0
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add esp, 0x14
test eax, eax
jne 0x51ae21
mov ecx, dword [esp + 0x14]
push 0x10
lea eax, [esp + 0x44]
push eax
push 3
push ebx
push str.PrivateHash
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call edi
call fcn.004d96c0
test eax, eax
je 0x51ae65
lea eax, [esp + 0x14]
push eax
push 0xf013f
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionSetup
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004fadc0
test eax, eax
jne 0x51ae65
mov edx, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x44]
push ecx
push 3
push ebx
push str.PrivateHash
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call edi
lea ecx, [esp + 0x14]
push ecx
push 0x20006
push ebx
push str.SoftwareMicrosoftDriver_Signing
push connect
call fcn.004dc0a0
add esp, 0x14
test eax, eax
jne 0x51aea3
mov eax, dword [esp + 0x14]
push 1
lea edx, [esp + 0x17]
push edx
push 3
push ebx
push str.Policy
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call edi
call fcn.004d96c0
test eax, eax
je 0x51aee7
lea edx, [esp + 0x14]
push edx
push 0xf013f
push ebx
push str.SoftwareMicrosoftDriver_Signing
push connect
call fcn.004fadc0
test eax, eax
jne 0x51aee7
mov ecx, dword [esp + 0x14]
push 1
lea eax, [esp + 0x17]
push eax
push 3
push ebx
push str.Policy
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call edi
lea eax, [esp + 0x14]
push eax
push 0x20006
push ebx
push str.SoftwareMicrosoftDriver_Signing
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004dc0a0
add esp, 0x14
test eax, eax
jne 0x51af25
mov edx, dword [esp + 0x14]
push 1
lea ecx, [esp + 0x17]
push ecx
push 3
push ebx
push str.Policy
push edx
call esi
mov eax, dword [esp + 0x14]
push eax
call edi
call fcn.004d96c0
test eax, eax
je 0x51af69
lea ecx, [esp + 0x14]
push ecx
push 0xf013f
push ebx
push str.SoftwareMicrosoftDriver_Signing
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004fadc0
test eax, eax
jne 0x51af69
mov eax, dword [esp + 0x14]
push 1
lea edx, [esp + 0x17]
push edx
push 3
push ebx
push str.Policy
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call edi
mov dword [esp + 0x34], 1
mov esi, dword [esp + 0x38]
cmp esi, ebx
jne 0x51af85
cmp dword [esp + 0x2c], ebx
jne 0x51af85
cmp dword [esp + 0x30], ebx
je 0x51afff
xor edi, edi
call fcn.004d96c0
test eax, eax
je 0x51af9f
lea edx, [esp + 0x24]
push edx
call fcn.004f77e0
add esp, 4
mov edi, eax
cmp esi, ebx
je 0x51afb8
push 1
push ebx
lea eax, [esp + 0x58]
push str.rsaenh.dll
push eax
call fcn.00517250
add esp, 0x10
cmp dword [esp + 0x2c], ebx
je 0x51afd3
push 1
push ebx
lea ecx, [esp + 0x58]
push str.psapi.dll
push ecx
call fcn.00517250
add esp, 0x10
cmp dword [esp + 0x30], ebx
je 0x51afee
push 1
push ebx
lea edx, [esp + 0x58]
push str.userenv.dll
push edx
call fcn.00517250
add esp, 0x10
cmp edi, ebx
je 0x51afff
mov eax, dword [esp + 0x24]
push eax
call fcn.004f7860
add esp, 4
mov eax, dword [esp + 0x34]
pop ebp
mov ecx, dword [esp + 0x358]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.005dfbbe
add esp, 0x350
ret 4