Function at 0x40f776
Capabilities:
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
mov eax, 0x412838
call fcn.004111a0
sub esp, 0x28c
push edi
xor edi, edi
lea ecx, [ebp - 0x198]
mov dword [ebp - 0x14], edi
call fcn.00402440
push 0x32
lea eax, [ebp - 0x8c]
push edi
push eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], 0x14
call sub.MSVCRT.dll_memset
push 0x100
lea eax, [ebp - 0x298]
push edi
push eax
call sub.MSVCRT.dll_memset
mov al, byte [ebp + 0xb]
add esp, 0x18
lea ecx, [ebp - 0x28]
mov byte [ebp - 0x28], al
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x28]
push dword [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x90]
mov byte [ebp - 4], 1
push eax
push edi
push edi
push 0x8004
push dword [ebp - 0x94]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x40f959
push edi
lea ecx, [ebp - 0x58]
call fcn.00401b1b
mov eax, dword [ebp - 0x24]
mov byte [ebp - 4], 2
cmp eax, edi
jne 0x40f82a
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [ebp - 0x58]
call fcn.00401c5e
test eax, eax
je 0x40f93b
mov eax, dword [ebp - 0x24]
cmp eax, edi
jne 0x40f847
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push edi
push eax
lea ecx, [ebp - 0x58]
call fcn.00401d63
test eax, eax
je 0x40f93b
push ebx
push esi
lea ecx, [ebp - 0x58]
call fcn.00401edd
mov dword [ebp + 8], eax
xor ebx, ebx
mov esi, 0x1000
cmp ebx, dword [ebp + 8]
jae 0x40f8c9
movzx eax, si
add eax, ebx
cmp eax, dword [ebp + 8]
jbe 0x40f881
mov esi, dword [ebp + 8]
sub esi, ebx
movzx eax, si
push ebx
push eax
lea ecx, [ebp - 0x58]
call fcn.00402399
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x10], eax
call fcn.00402395
mov esi, eax
push 0
movzx edi, si
push edi
push dword [ebp - 0x10]
push dword [ebp - 0x90]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x10], eax
call fcn.00402418
cmp dword [ebp - 0x10], 0
je 0x40f8c7
add ebx, edi
xor edi, edi
jmp 0x40f86d
xor edi, edi
cmp ebx, dword [ebp + 8]
pop esi
pop ebx
jne 0x40f92b
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [ebp - 0x298]
push eax
push 2
push dword [ebp - 0x90]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40f92b
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x298]
push dword [ebp - 0x18]
push eax
call fcn.004024c2
lea eax, [ebp - 0x8c]
push eax
call sub.MSVCRT.dll_strlen
mov ecx, dword [ebp + 0xc]
add esp, 0x10
push eax
lea eax, [ebp - 0x8c]
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
mov dword [ebp - 0x14], 1
lea ecx, [ebp - 0x58]
call fcn.00402418
lea ecx, [ebp - 0x58]
call fcn.00401e9f
push dword [ebp - 0x90]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x90], edi
mov byte [ebp - 4], 1
call fcn.00401c10
and byte [ebp - 4], 0
push 1
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x198]
call fcn.0040249d
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
pop edi
mov dword fs:[0], ecx
leave
ret