Function at 0x4c7a10
Capabilities:
Hash data via bcrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
cmp ebx, 0x14
jne 0x4c7a2e
mov edi, dword [0x51d748]
mov eax, str.SHA1
jmp 0x4c7a62
cmp ebx, 0x20
jne 0x4c7a40
mov edi, dword [0x51d74c]
mov eax, str.SHA256
jmp 0x4c7a62
cmp ebx, 0x30
jne 0x4c7a52
mov edi, dword [0x51d750]
mov eax, str.SHA384
jmp 0x4c7a62
cmp ebx, 0x40
jne 0x4c7a93
mov edi, dword [0x51d754]
mov eax, str.SHA512
mov esi, dword [ebp + 0x1c]
push esi
mov dword [ebp - 0x24], eax
call fcn.0042d9fe
add esp, 4
mov dword [ebp + 0xc], eax
test eax, eax
je 0x4c7a93
push ebx
call fcn.0042d9fe
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c7a9d
push dword [ebp + 0xc]
call fcn.00421011
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push dword [ebp + 0x18]
push dword [ebp + 0xc]
call fcn.004095d0
add esp, 0xc
lea eax, [ebp - 0x18]
push 0
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push str.HashDigestLength
push edi
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x4c7b34
cmp dword [ebp - 0x14], ebx
jne 0x4c7b34
push 0
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 8]
push eax
push str.ObjectLength
push edi
call sub.bcrypt.dll_BCryptGetProperty
test eax, eax
js 0x4c7b34
push dword [ebp - 8]
call fcn.0042d9fe
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
je 0x4c7b34
push 0
push 0
push 0
push dword [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
push edi
call sub.bcrypt.dll_BCryptCreateHash
test eax, eax
jns 0x4c7b90
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
test ecx, ecx
je 0x4c7b2b
mov eax, edx
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x4c7b20
push edx
call fcn.00421011
add esp, 4
or edi, 0xffffffff
test esi, esi
je 0x4c7b4b
mov eax, dword [ebp + 0xc]
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub esi, 1
jne 0x4c7b40
push dword [ebp + 0xc]
call fcn.00421011
add esp, 4
test edi, edi
je 0x4c7bff
test ebx, ebx
je 0x4c7c2b
mov eax, dword [ebp - 4]
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ebx, 1
jne 0x4c7b70
push dword [ebp - 4]
call fcn.00421011
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x14]
push 0
push dword [ebp + 0x1c]
mov dword [ebp - 0x20], eax
push dword [ebp + 0xc]
push edi
call sub.bcrypt.dll_BCryptHashData
xor ecx, ecx
test eax, eax
push 0
push esi
push dword [ebp - 4]
setns cl
dec ecx
push edi
mov dword [ebp - 0x10], ecx
call sub.bcrypt.dll_BCryptFinishHash
push edi
mov esi, eax
call sub.bcrypt.dll_BCryptDestroyHash
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
test eax, eax
je 0x4c7be0
mov ecx, edx
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x4c7bd5
push edx
call fcn.00421011
xor eax, eax
add esp, 4
test esi, esi
mov esi, dword [ebp + 0x1c]
setns al
dec eax
or dword [ebp - 0x10], eax
mov edi, dword [ebp - 0x10]
jmp 0x4c7b37
mov esi, dword [ebp + 0x14]
push esi
call fcn.0042d9fe
mov edi, eax
add esp, 4
mov dword [ebp + 0xc], edi
test edi, edi
jne 0x4c7c40
test ebx, ebx
je 0x4c7c2b
mov eax, dword [ebp - 4]
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ebx, 1
jne 0x4c7c20
push dword [ebp - 4]
call fcn.00421011
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push dword [ebp + 0x10]
push edi
call fcn.004095d0
mov eax, dword [ebp + 0x20]
add esp, 0xc
test al, 2
mov ecx, 0
push eax
push esi
push edi
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x24]
push ebx
push edi
cmove eax, ecx
push eax
mov eax, dword [ebp + 8]
push dword [eax]
call sub.bcrypt.dll_BCryptVerifySignature
mov dword [ebp - 0x20], eax
test ebx, ebx
je 0x4c7c8b
mov ecx, edi
nop dword [eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub ebx, 1
jne 0x4c7c80
push edi
call fcn.00421011
mov ecx, dword [ebp + 0xc]
add esp, 4
test esi, esi
je 0x4c7cab
mov eax, ecx
nop dword [eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub esi, 1
jne 0x4c7ca0
push ecx
call fcn.00421011
add esp, 4
xor eax, eax
cmp dword [ebp - 0x20], eax
setge al
pop edi
pop esi
dec eax
pop ebx
mov esp, ebp
pop ebp
ret