Function at 0x401310
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
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40289c
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1084
call fcn.004026e0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1080], eax
push ebx
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x1098]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov esi, ecx
mov dword [esp + 0x2c], eax
xor eax, eax
cmp dword [esi + 0x18], 0x10
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov byte [esp + 0x17], 0
mov dword [esp + 0x20], 0x14
mov byte [esp + 0x4c], 0
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov dword [esp + 0x55], eax
mov dword [esp + 0x59], eax
mov dword [esp + 0x5d], eax
mov dword [esp + 0x61], eax
mov dword [esp + 0x65], eax
mov dword [esp + 0x69], eax
mov dword [esp + 0x6d], eax
mov dword [esp + 0x71], eax
jb 0x4013af
mov eax, dword [esi + 4]
jmp 0x4013b2
lea eax, [esi + 4]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, 0xffffffff
jne 0x401409
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____]
mov edx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
push esi
push 0x40323c
push edx
call fcn.00401cb0
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 0x4015b4
push 0xf0000000
push 1
push edi
push edi
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x401453
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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____]
mov edx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push ecx
push ecx
push 0x40324c
push edx
call fcn.00401cb0
add esp, 0xc
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 0x4015b4
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push edi
push edi
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x401496
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x18]
push edi
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 ecx
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x403260
push ecx
jmp 0x40143c
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea edx, [esp + 0x28]
push edx
push 0x1000
lea eax, [esp + 0x98]
push eax
push ebx
call esi
test eax, eax
je 0x4014f5
mov eax, dword [esp + 0x24]
cmp eax, edi
jbe 0x4014f5
mov edx, dword [esp + 0x1c]
push edi
push eax
lea ecx, [esp + 0x94]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4015d8
push edi
lea eax, [esp + 0x28]
push eax
push 0x1000
lea ecx, [esp + 0x98]
push ecx
push ebx
call esi
test eax, eax
jne 0x4014b6
mov eax, dword [esp + 0x1c]
push edi
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x80]
push edx
push 2
push eax
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40158a
cmp dword [esp + 0x20], edi
jbe 0x40154f
mov ebx, dword [sym.imp.MSVCR90.dll_sprintf_s]
xor esi, esi
movzx ecx, byte [esp + edi + 0x78]
push ecx
mov edx, 0x29
push str._02x
sub edx, esi
push edx
lea eax, [esp + esi + 0x58]
push eax
call ebx
inc edi
add esp, 0x10
add esi, 2
cmp edi, dword [esp + 0x20]
jb 0x401522
mov ebx, dword [esp + 0x28]
xor edi, edi
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x34]
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 ecx, dword [esp + 0x2c]
push eax
mov dword [esp + 0x10a4], edi
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__]
lea ecx, [esp + 0x30]
mov dword [esp + 0x10a0], 0xffffffff
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 [esp + 0x17], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
cmp eax, edi
je 0x4015a0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x4015b0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x1098]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1080]
xor ecx, esp
call fcn.00401e6c
mov esp, ebp
pop ebp
ret
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____]
mov eax, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push edx
push ecx
push 0x403274
push eax
call fcn.00401cb0
add esp, 0xc
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 0x40158a