Function at 0x4012e0
Capabilities:
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402e8c
mov eax, dword fs:[0]
push eax
mov eax, 0x1084
call fcn.00402ce0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0xffffffff
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x4c], 0x14
mov byte [ebp - 0x48], 0
xor eax, eax
mov dword [ebp - 0x47], eax
mov dword [ebp - 0x43], eax
mov dword [ebp - 0x3f], eax
mov dword [ebp - 0x3b], eax
mov dword [ebp - 0x37], eax
mov dword [ebp - 0x33], eax
mov dword [ebp - 0x2f], eax
mov dword [ebp - 0x2b], eax
mov dword [ebp - 0x27], eax
mov dword [ebp - 0x23], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov ecx, dword [ebp + 8]
call dword [sym.imp.MSVCP90.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x4013b5
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x4032bc
mov eax, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.004021a0
add esp, 8
push eax
call dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___char__struct_std::char_traits_char___class_std::allocator_char___class_std::basic_ostream_char__struct_std::char_traits_char_____class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
jmp 0x4015c8
push 0xf0000000
push 1
push 0
push 0
lea ecx, [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x401401
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push 0x4032cc
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
call fcn.004021a0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
jmp 0x4015c8
lea edx, [ebp - 0x10]
push edx
push 0
push 0
push 0x8004
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40145b
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push eax
push 0x4032e0
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
call fcn.004021a0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
jmp 0x4015c8
push 0
lea edx, [ebp - 0x1068]
push edx
push 0x1000
lea eax, [ebp - 0x1064]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4014ce
cmp dword [ebp - 0x1068], 0
jbe 0x4014ce
push 0
mov edx, dword [ebp - 0x1068]
push edx
lea eax, [ebp - 0x1064]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4014cc
mov edx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
push edx
push 0x4032f4
mov eax, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push eax
call fcn.004021a0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x401599
jmp 0x40145b
push 0
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x60]
push edx
push 2
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x401599
mov dword [ebp - 0x106c], 0
jmp 0x401507
mov ecx, dword [ebp - 0x106c]
add ecx, 1
mov dword [ebp - 0x106c], ecx
mov edx, dword [ebp - 0x106c]
cmp edx, dword [ebp - 0x4c]
jae 0x401549
mov eax, dword [ebp - 0x106c]
movzx ecx, byte [ebp + eax - 0x60]
push ecx
push str._02x
mov edx, dword [ebp - 0x106c]
shl edx, 1
mov eax, 0x29
sub eax, edx
push eax
mov ecx, dword [ebp - 0x106c]
lea edx, [ebp + ecx*2 - 0x48]
push edx
call dword [sym.imp.MSVCR90.dll_sprintf_s]
add esp, 0x10
jmp 0x4014f8
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x1088]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov dword [ebp - 0x108c], eax
mov ecx, dword [ebp - 0x108c]
mov dword [ebp - 0x1090], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x1090]
push edx
mov ecx, dword [ebp + 0xc]
call dword [sym.imp.MSVCP90.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__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1088]
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov byte [ebp - 0x61], 1
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0
je 0x4015b3
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 0x14], 0
je 0x4015c5
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [ebp - 0x61]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00402471
mov esp, ebp
pop ebp
ret