Function at 0x1012518
Capabilities:
Hash data via bcrypt

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10143f8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x30], eax
xor ecx, ecx
xor eax, eax
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
lea edi, [ebp - 0x10]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ecx
push 0x10028dc
stosd dword es:[edi], eax
push 0x10028d0
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], ecx
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
mov edi, eax
test edi, edi
jl 0x1012661
push 0
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push 0x10028b4
push dword [ebp - 0x20]
call sub.bcrypt.dll_BCryptGetProperty
mov edi, eax
test edi, edi
jl 0x1012661
push dword [ebp - 0x18]
call fcn.01011936
pop ecx
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x10125b6
mov edi, 0xc0000017
test edi, edi
jl 0x1012661
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
push dword [ebp - 0x24]
push eax
push dword [ebp - 0x20]
call sub.bcrypt.dll_BCryptCreateHash
mov edi, eax
test edi, edi
jl 0x1012661
push dword [ebx]
call fcn.010124e4
mov dword [ebp - 0x14], eax
movzx eax, word [ebx + 4]
rol ax, 8
mov word [ebp - 0x10], ax
movzx eax, word [ebx + 6]
rol ax, 8
push 0
mov word [ebp - 0xe], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
call sub.bcrypt.dll_BCryptHashData
mov edi, eax
test edi, edi
jl 0x1012661
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x30]
push dword [ebp - 0x1c]
call sub.bcrypt.dll_BCryptHashData
mov edi, eax
test edi, edi
jne 0x1012661
push eax
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x18]
push eax
push 0x1002890
push dword [ebp - 0x20]
call sub.bcrypt.dll_BCryptGetProperty
mov edi, eax
test edi, edi
jne 0x1012661
push dword [ebp - 0x18]
call fcn.01011936
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x1012668
mov edi, 0xc0000017
jmp 0x1012664
mov ebx, dword [ebp - 0x2c]
test edi, edi
jl 0x10126ca
push 0
push dword [ebp - 0x18]
push ebx
push dword [ebp - 0x1c]
call sub.bcrypt.dll_BCryptFinishHash
mov edi, eax
test edi, edi
jl 0x10126ca
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x1012687
push 0x10
pop eax
push eax
push ebx
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [esi]
call fcn.010124e4
mov dword [esi], eax
movzx eax, word [esi + 4]
rol ax, 8
mov word [esi + 4], ax
movzx eax, word [esi + 6]
rol ax, 8
movzx eax, ax
and eax, 0xfff
or eax, 0x5000
mov word [esi + 6], ax
mov al, byte [esi + 8]
and al, 0x3f
or al, 0x80
mov byte [esi + 8], al
cmp dword [ebp - 0x1c], 0
je 0x10126d8
push dword [ebp - 0x1c]
call sub.bcrypt.dll_BCryptDestroyHash
cmp dword [ebp - 0x20], 0
je 0x10126e8
push 0
push dword [ebp - 0x20]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
cmp dword [ebp - 0x24], 0
je 0x10126f7
push dword [ebp - 0x24]
call fcn.01011964
pop ecx
test ebx, ebx
je 0x1012702
push ebx
call fcn.01011964
pop ecx
test edi, edi
jl 0x101270a
xor eax, eax
jmp 0x1012712
or edi, 0x10000000
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01011cef
leave
ret 0x10