Function at 0x401740
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 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x42bf3b
push eax
mov eax, 0x1064
mov dword fs:[0], esp
call fcn.0040ecd0
push ebx
push ebp
push esi
push edi
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], 0
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x1084]
xor ebp, ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebp
mov eax, dword [edi + 4]
mov byte [esp + 0x13], 0
cmp eax, ebp
mov dword [esp + 0x1c], 0x14
jne 0x40179f
mov eax, 0x42e798
push ebp
push 0x80
push 3
push ebp
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40181c
push 0xe391f8
push 0x15534f8
call fcn.00403330
mov esi, eax
mov eax, dword [edi + 4]
add esp, 8
cmp eax, ebp
jne 0x4017dd
mov eax, 0x42e798
push eax
push esi
call fcn.00403330
add esp, 8
mov ecx, esi
push 0xa
call fcn.00402800
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
test byte [eax + 4], 6
jne 0x4018d5
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4018d5
jmp 0x4018d0
push 0xf0000000
push 1
push ebp
lea ecx, [esp + 0x24]
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x401863
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe391e4
push 0x15534f8
call fcn.00403330
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402800
mov edx, dword [esi]
xor edi, edi
mov eax, dword [edx + 4]
add eax, esi
jmp 0x4017fa
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
push ebp
push ebp
push 0x8004
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x4018ea
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0xe391d0
push 0x15534f8
call fcn.00403330
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402800
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x4018d5
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4018d5
mov edi, 4
mov eax, dword [esi]
push ebp
push edi
mov ecx, dword [eax + 4]
add ecx, esi
call fcn.00402970
xor al, al
jmp 0x401abe
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x20]
push ebp
push ecx
lea edx, [esp + 0x7c]
push 0x1000
push edx
push ebx
call esi
test eax, eax
je 0x401942
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov eax, dword [esp + 0x20]
cmp eax, ebp
jbe 0x401942
mov ecx, dword [esp + 0x14]
push ebp
push eax
lea eax, [esp + 0x7c]
push eax
push ecx
call edi
test eax, eax
je 0x401a28
lea edx, [esp + 0x20]
push ebp
push edx
lea eax, [esp + 0x7c]
push 0x1000
push eax
push ebx
call esi
test eax, eax
jne 0x40190d
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push ebp
lea ecx, [esp + 0x64]
push eax
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x401a93
mov eax, dword [esp + 0x1c]
xor esi, esi
cmp eax, ebp
jbe 0x401991
lea edi, [esp + 0x34]
xor eax, eax
mov al, byte [esp + esi + 0x60]
push eax
push 0xe391c8
push edi
call fcn.0040ec7d
mov eax, dword [esp + 0x28]
add esp, 0xc
inc esi
add edi, 2
cmp esi, eax
jb 0x401970
mov cl, byte [esp + 0x13]
push ebp
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
call fcn.00402ba0
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call fcn.00402d40
test al, al
je 0x4019e7
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x34]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], ebp
mov byte [eax + ebp], 0
mov ecx, dword [0x42e794]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x108c]
push 0
push edx
mov dword [esp + 0x1088], 0
call fcn.004029a0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x401a8e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401a85
cmp al, 0xff
je 0x401a85
dec al
mov byte [ecx], al
jmp 0x401a8e
push 0xe391b8
push 0x15534f8
call fcn.00403330
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402800
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x401a6c
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401a6c
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
cmp edi, ebp
je 0x401a93
mov edx, dword [ecx + 4]
push ebp
or edx, edi
push edx
call fcn.00402bf0
jmp 0x401a93
push ecx
call fcn.00423ea4
add esp, 4
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401aa9
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401aba
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x1074]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1070
ret