Function at 0x408b66
Capabilities:
Hash data via bcrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
xor eax, eax
push ebx
push esi
push edi
mov esi, 0x406b78
mov dword [ebp - 0x30], edx
lea edi, [ebp - 0x14]
mov dword [ebp - 0x28], ecx
xor ebx, ebx
push ebx
movsd dword es:[edi], dword [esi]
push 0x406b88
push 0x406bc4
mov dword [ebp - 0x20], ebx
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x2c], ebx
movsd dword es:[edi], dword [esi]
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
mov esi, eax
test esi, esi
js 0x408c52
push ebx
lea eax, [ebp - 0x24]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push 0x406bd0
push dword [ebp - 0x20]
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov esi, eax
test esi, esi
js 0x408c52
push dword [ebp - 0x18]
call fcn.00408d4b
mov dword [ebp - 0x2c], eax
pop ecx
test eax, eax
jne 0x408bfc
mov esi, 0xc0000017
test esi, esi
js 0x408c52
push ebx
push ebx
push ebx
push dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.bcrypt.dll_BCryptCreateHash]
mov esi, eax
test esi, esi
js 0x408c52
push ebx
push 0x10
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x12d8ff70
push eax
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], 0x7d4c7f4c
call dword [sym.imp.bcrypt.dll_BCryptHashData]
mov esi, eax
test esi, esi
js 0x408c52
push ebx
push dword [ebp + 8]
push dword [ebp - 0x30]
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptHashData]
mov esi, eax
test esi, esi
jne 0x408c89
push ebx
lea eax, [ebp - 0x24]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push 0x406bec
push dword [ebp - 0x20]
call dword [sym.imp.bcrypt.dll_BCryptGetProperty]
mov esi, eax
test esi, esi
jne 0x408c89
push dword [ebp - 0x18]
call fcn.00408d4b
mov edi, eax
pop ecx
test edi, edi
jne 0x408c8f
mov esi, 0xc0000017
jmp 0x408c8b
mov edi, ebx
test esi, esi
js 0x408cf6
push ebx
push dword [ebp - 0x18]
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptFinishHash]
mov esi, eax
test esi, esi
js 0x408cf6
push 0x10
pop eax
cmp dword [ebp - 0x18], eax
jae 0x408cae
mov eax, dword [ebp - 0x18]
push eax
push edi
push dword [ebp - 0x28]
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov eax, dword [ecx]
bswap eax
mov dword [ecx], eax
movzx eax, word [ecx + 4]
rol ax, 8
movzx eax, ax
mov word [ecx + 4], ax
movzx eax, word [ecx + 6]
rol ax, 8
movzx eax, ax
and eax, 0xfff
or eax, 0x5000
mov word [ecx + 6], ax
mov al, byte [ecx + 8]
and al, 0x3f
or al, 0x80
mov byte [ecx + 8], al
cmp dword [ebp - 0x1c], ebx
je 0x408d04
push dword [ebp - 0x1c]
call dword [sym.imp.bcrypt.dll_BCryptDestroyHash]
cmp dword [ebp - 0x20], ebx
je 0x408d13
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x408d21
push eax
call fcn.00408d74
pop ecx
test edi, edi
je 0x408d2c
push edi
call fcn.00408d74
pop ecx
test esi, esi
jns 0x408d38
mov ebx, esi
or ebx, 0x10000000
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409050
leave
ret 8