Function at 0x4be470
Capabilities:
Hash data via bcrypt

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x88
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x4c0550
lea ecx, [ebp - 0x18]
mov edx, dword fs:[0]
cmp eax, 3
mov dword [ebp - 0x18], edx
mov dword fs:[0], ecx
ja 0x4be590
mov eax, dword [eax*4 + 0x65d42c]
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x24]
push 0
push 0
push eax
push ecx
call sub.bcrypt.dll_BCryptOpenAlgorithmProvider
test eax, eax
js 0x4be590
mov dword [ebp - 0x7c], 0
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x7c]
lea ecx, [ebp - 0x38]
push 0
push eax
push 4
push ecx
push str.HashDigestLength
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x4be586
mov esi, dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x4be586
mov esi, eax
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x34]
push 0
push 0
push 0
push 0
push 0
push eax
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptCreateHash
test eax, eax
js 0x4be5a4
mov dword [ebp - 0x28], esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x20], esp
push eax
sub esp, 0x18
mov edi, esp
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov eax, dword [esi + 0x10]
cmp dword [esi + 0x14], 7
jbe 0x4be562
mov esi, dword [esi]
lea ecx, [edi + 4]
cmp eax, 7
ja 0x4be5c0
movsd xmm0, qword [esi]
movsd xmm1, qword [esi + 8]
mov ebx, 7
movsd qword [ecx + 8], xmm1
movsd qword [ecx], xmm0
jmp 0x4be62f
push 0
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4be590
mov ebx, eax
mov dword [ebp - 0x2c], ecx
mov ecx, 0x7ffffffe
mov dword [ebp - 0x30], eax
or ebx, 7
cmp ebx, 0x7ffffffe
cmovb ecx, ebx
lea eax, [ecx + ecx]
cmp ecx, 0x7ff
jb 0x4be609
cmp ecx, 0x7fffffee
jae 0x4be9a9
add eax, 0x25
push eax
call fcn.005d0220
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4be615
add eax, 2
push eax
call fcn.005d0220
add esp, 4
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx + ecx + 2]
push ecx
push esi
push eax
call fcn.0061e340
mov eax, dword [ebp - 0x30]
add esp, 0xc
lea esi, [ebp - 0x94]
mov dword [edi + 0x14], eax
mov dword [edi + 0x18], ebx
mov dword [edi], esi
call fcn.004bdd50
add esp, 0x1c
mov esp, dword [ebp - 0x20]
mov eax, dword [ebp - 0x84]
cmp dword [ebp - 0x80], 0xf
jbe 0x4be65a
mov esi, dword [ebp - 0x94]
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x10], 3
push 0
push eax
push esi
push ecx
call sub.bcrypt.dll_BCryptHashData
test eax, eax
js 0x4be6cf
push 0
push dword [ebp - 0x38]
push dword [ebp - 0x28]
push dword [ebp - 0x34]
call sub.bcrypt.dll_BCryptFinishHash
test eax, eax
js 0x4be6ed
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x40], 0xf
mov dword [ebp - 0x44], 0
mov byte [ebp - 0x54], 0
lea esi, [ebx + ebx]
cmp esi, 0xf
jbe 0x4be715
mov dword [ebp - 0x10], 4
sub esp, 0xc
mov al, byte [ebp - 0x70]
lea ecx, [ebp - 0x54]
mov byte [esp + 4], al
mov dword [esp], esi
mov dword [esp + 8], 0x20
mov dword [ebp - 0x20], ebx
call fcn.0049ff50
mov ebx, dword [ebp - 0x20]
jmp 0x4be72c
push 0
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push dword [ebp - 0x28]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4be709
push 0
push dword [ebp - 0x24]
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push dword [ebp - 0x28]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x20], 0
jmp 0x4be96a
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x54]
push esi
push 0x20
push eax
call fcn.0061e8c0
add esp, 0xc
mov byte [ebp + esi - 0x54], 0
mov edi, dword [ebp - 0x28]
test ebx, ebx
je 0x4be780
xor eax, eax
lea ecx, [ebp - 0x54]
jmp 0x4be749
mov byte [esi + eax*2 + 1], dl
inc eax
cmp ebx, eax
je 0x4be780
movzx edx, byte [edi + eax]
mov esi, ecx
shr edx, 4
cmp dword [ebp - 0x40], 0xf
movzx edx, byte [edx + str.0123456789abcdef_]
jbe 0x4be762
mov esi, dword [ebp - 0x54]
mov byte [esi + eax*2], dl
mov esi, ecx
movzx edx, byte [edi + eax]
and edx, 0xf
cmp dword [ebp - 0x40], 0xf
movzx edx, byte [edx + str.0123456789abcdef_]
jbe 0x4be740
mov esi, dword [ebp - 0x54]
jmp 0x4be740
mov dword [ebp - 0x20], esp
push eax
sub esp, 0x18
mov esi, dword [ebp - 0x44]
cmp dword [ebp - 0x40], 0xf
mov eax, esp
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
jbe 0x4be7a5
mov ecx, dword [ebp - 0x54]
jmp 0x4be7a8
lea ecx, [ebp - 0x54]
lea edx, [eax + 4]
cmp esi, 0xf
ja 0x4be7d0
movsd xmm0, qword [ecx]
movsd xmm1, qword [ecx + 8]
mov dword [ebp - 0x10], 5
mov ecx, 0xf
movsd qword [edx + 8], xmm1
movsd qword [edx], xmm0
jmp 0x4be844
mov dword [ebp - 0x58], edx
mov edx, esi
mov dword [ebp - 0x78], ecx
mov ecx, 0x7fffffff
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x10], 5
or edx, 0xf
cmp edx, 0x7fffffff
cmovb ecx, edx
cmp ecx, 0xfff
mov dword [ebp - 0x74], ecx
jb 0x4be81a
lea eax, [ecx + 0x24]
push eax
call fcn.005d0220
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4be826
lea eax, [ecx + 1]
push eax
call fcn.005d0220
add esp, 4
mov ecx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x2c]
mov dword [ecx], eax
lea ecx, [esi + 1]
push ecx
push dword [ebp - 0x78]
push eax
call fcn.0061e340
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x74]
lea edx, [ebp - 0x70]
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], ecx
mov dword [eax], edx
call fcn.004be310
add esp, 0x1c
mov ecx, dword [ebp + 0x10]
mov esp, dword [ebp - 0x20]
lea edx, [ebp - 0x70]
cmp edx, ecx
je 0x4be8b6
mov esi, dword [ebp - 0x60]
cmp dword [ebp - 0x5c], 7
jbe 0x4be870
mov edx, dword [ebp - 0x70]
mov eax, dword [ecx + 0x14]
cmp eax, esi
jae 0x4be896
mov dword [ebp - 0x10], 6
sub esp, 0xc
mov al, byte [ebp - 0x3c]
mov byte [esp + 4], al
mov dword [esp + 8], edx
mov dword [esp], esi
call fcn.00405590
jmp 0x4be8b6
cmp eax, 7
mov edi, ecx
jbe 0x4be89f
mov edi, dword [ecx]
lea eax, [esi + esi]
mov dword [ecx + 0x10], esi
push eax
push edx
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov ecx, dword [ebp - 0x5c]
cmp ecx, 8
jb 0x4be8f1
mov eax, dword [ebp - 0x70]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x4be8e7
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x4be9ba
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov eax, dword [ebp - 0x40]
cmp eax, 0x10
jb 0x4be929
mov ecx, dword [ebp - 0x54]
lea edx, [eax + 1]
cmp edx, 0x1000
jb 0x4be91f
mov esi, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, esi
cmp ecx, 0x20
jae 0x4be9c6
add eax, 0x24
mov ecx, esi
mov edx, eax
push edx
push ecx
call fcn.005d319e
add esp, 8
mov al, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4be944
mov dword [ebp - 0x10], 3
push 0
push eax
call sub.bcrypt.dll_BCryptCloseAlgorithmProvider
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], 3
test eax, eax
je 0x4be958
push eax
call sub.bcrypt.dll_BCryptDestroyHash
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push dword [ebp - 0x28]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x80]
cmp eax, 0x10
jb 0x4be9a1
mov ecx, dword [ebp - 0x94]
lea edx, [eax + 1]
cmp edx, 0x1000
jb 0x4be997
mov esi, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, esi
cmp ecx, 0x20
jae 0x4be9ae
add eax, 0x24
mov ecx, esi
mov edx, eax
push edx
push ecx
call fcn.005d319e
add esp, 8
mov eax, dword [ebp - 0x20]
jmp 0x4be592
call fcn.005e8c60
mov dword [ebp - 0x10], 2
call fcn.006207e0
mov dword [ebp - 0x10], 0
call fcn.006207e0
mov dword [ebp - 0x10], 1
call fcn.006207e0
add ebp, 0xc
jmp 0x4be92e