Function at 0x180587ae
Capabilities:
Get file size
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
sub esp, 0x94
mov eax, dword [0x180f51f0]
xor eax, ebp
mov dword [ebp - 4], eax
movzx ecx, byte [0x180fb8d9]
mov eax, dword [ebp + 8]
push ebx
push esi
neg ecx
sbb ecx, ecx
xor esi, esi
push edi
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov edi, 0x180fbb80
inc esi
and ecx, edi
mov dword [ebp - 0x7c], eax
je 0x1805880a
push esi
push esi
mov dword [ebp - 0x70], ecx
call fcn.18001d8a
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x70]
push str._CryptoHash::ComputeOrValidate_
push eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
call fcn.18001000
pop ecx
pop ecx
mov ebx, 0x20000
lea eax, [ebp - 0x50]
call fcn.1800db38
xor eax, eax
push 0xf0000040
push esi
push eax
push eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x180588c1
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, edi
mov ebx, eax
je 0x1805887a
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x70], ecx
call fcn.18001d8a
push ebx
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x70]
push str._CryptAcquireContext_failed__0x_08lX_
push eax
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x64], esi
call fcn.18001000
add esp, 0xc
cmp dword [ebp - 0x1c], 0
je 0x18058889
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], 0
je 0x18058898
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
mov esi, ebx
push dword [ebp - 0x50]
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
call fcn.1809cc9a
pop ecx
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1809cca5
leave
ret 8
lea eax, [ebp - 0x20]
push eax
xor ebx, ebx
push ebx
push ebx
push 0x8004
push dword [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x18058942
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, edi
mov ebx, eax
je 0x1805891c
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x70], ecx
call fcn.18001d8a
push ebx
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x70]
push str._CryptCreateHash_failed__0x_08lX_
push eax
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x64], esi
call fcn.18001000
add esp, 0xc
xor esi, esi
cmp dword [ebp - 0x20], esi
je 0x1805892c
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], esi
je 0x1805893a
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], esi
jmp 0x1805888d
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
mov dword [ebp - 0x5c], ebx
sar ecx, 2
test ecx, ecx
jbe 0x18058a56
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x24]
call fcn.1800a9bb
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
xor esi, esi
inc esi
push esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x18058aec
and dword [ebp - 0x68], 0
xor eax, eax
lea edi, [ebp - 0x64]
stosd dword es:[edi], eax
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x18058b28
mov eax, dword [ebp - 0x68]
add dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x64]
adc dword [ebp - 0x54], eax
xor edi, edi
cmp dword [ebp - 0x54], edi
ja 0x18058b36
jb 0x180589d4
cmp dword [ebp - 0x58], 0x20000000
ja 0x18058b36
mov dword [ebp - 0x74], edi
mov edi, dword [ebp - 0x40]
sub edi, dword [ebp - 0x44]
jne 0x180589e4
call fcn.1809e0d9
push 0
lea eax, [ebp - 0x74]
push eax
push edi
push dword [ebp - 0x44]
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18058b28
xor edi, edi
cmp dword [ebp - 0x74], edi
jbe 0x18058a2b
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x44]
jne 0x18058a13
call fcn.1809e0d9
push edi
push dword [ebp - 0x74]
push dword [ebp - 0x44]
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x18058bb8
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x44]
cmp dword [ebp - 0x74], eax
je 0x180589d7
push dword [ebp - 0x28]
call ebx
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x10]
sub ecx, dword [eax + 0xc]
inc dword [ebp - 0x5c]
sar ecx, 2
cmp dword [ebp - 0x5c], ecx
jb 0x1805895f
xor esi, esi
inc esi
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x14
pop ebx
stosd dword es:[edi], eax
xor edi, edi
push edi
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x18]
push eax
push 2
push dword [ebp - 0x20]
mov dword [ebp - 0x78], ebx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x18058c36
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov ebx, eax
je 0x18058ac8
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x38], ecx
call fcn.18001d8a
push ebx
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push str._CryptGetHashParam_failed__0x_08lX_
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
call fcn.18001000
add esp, 0xc
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x18058ad6
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058ae4
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
jmp 0x1805888d
call fcn.1800fc86
mov esi, eax
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x18058b03
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058b11
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
je 0x1805889a
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
jmp 0x1805889a
call fcn.1800fc86
push dword [ebp - 0x28]
mov esi, eax
call ebx
jmp 0x18058af3
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18058b7f
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x38], ecx
call fcn.18001d8a
push 0
push 0x20000000
push dword [ebp - 0x54]
mov dword [ebp - 0x34], eax
push dword [ebp - 0x58]
lea eax, [ebp - 0x38]
push str._exceed_max_len__curr_len_lu__max_len_lu_
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
call fcn.18001000
add esp, 0x18
xor edi, edi
push dword [ebp - 0x28]
call ebx
cmp dword [ebp - 0x20], edi
je 0x18058b92
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058ba0
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058bae
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
mov esi, 0x80004005
jmp 0x1805889a
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov dword [ebp - 0x24], eax
je 0x18058bff
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x38], ecx
call fcn.18001d8a
push dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push str._CryptHashData_failed__0x_08lX_
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
call fcn.18001000
add esp, 0xc
xor edi, edi
push dword [ebp - 0x28]
call ebx
cmp dword [ebp - 0x20], edi
je 0x18058c12
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058c20
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058c2e
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
mov esi, dword [ebp - 0x24]
jmp 0x1805889a
cmp dword [ebp - 0x78], ebx
je 0x18058cae
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18058c7a
push 0xfffffffffffffffe
pop edi
push edi
push esi
mov dword [ebp - 0x38], ecx
call fcn.18001d8a
push dword [ebp - 0x78]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push str._CryptGetHashParam_returned__d_bytes_
push eax
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
call fcn.18001000
add esp, 0xc
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x18058c88
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058c96
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058ca4
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
mov esi, 0x8000ffff
jmp 0x1805889a
mov eax, dword [ebp - 0x7c]
push ebx
cmp eax, edi
je 0x18058e0b
lea ecx, [ebp - 0x18]
push ecx
call fcn.1800663a
push eax
call fcn.1809e8b0
add esp, 0xc
test eax, eax
jne 0x18058d01
cmp dword [ebp - 0x20], edi
je 0x18058cde
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058cec
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058cfa
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
xor esi, esi
jmp 0x1805889a
lea eax, [ebp - 0x94]
call fcn.1800db38
push ebx
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x94]
call fcn.1800663a
push eax
call fcn.1809cfb0
mov eax, dword [0x180fa248]
add esp, 0xc
mov ecx, 0x180fa248
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x94]
call fcn.180585f9
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx - 0xc]
pop ecx
lea ecx, [ebp - 0x7c]
call fcn.18008d5d
movzx ecx, byte [0x180fb8d9]
mov edi, dword [ebp - 0x7c]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18058d96
push esi
push 0xa
mov dword [ebp - 0x38], ecx
call fcn.18001d8a
push edi
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push str._actual_hash_s_
push eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], 0xa
call fcn.18001000
add esp, 0xc
lea eax, [edi - 0x10]
call fcn.18004250
lea eax, [ebx - 0x10]
call fcn.18004250
xor esi, esi
cmp dword [ebp - 0x88], esi
je 0x18058dbc
push dword [ebp - 0x88]
call fcn.1809cc9a
pop ecx
push dword [ebp - 0x94]
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x80], esi
call fcn.1809cc9a
pop ecx
cmp dword [ebp - 0x20], esi
je 0x18058de5
push dword [ebp - 0x20]
call fcn.1805852d
pop ecx
cmp dword [ebp - 0x1c], esi
je 0x18058df3
push dword [ebp - 0x1c]
call fcn.180584d6
pop ecx
cmp dword [ebp - 0x44], esi
je 0x18058e01
push dword [ebp - 0x44]
call fcn.1809cc9a
pop ecx
mov esi, 0x80040204
jmp 0x1805889a
xor eax, eax
call fcn.180068a7
push ebx
lea eax, [ebp - 0x18]
push eax
xor eax, eax
call fcn.1800663a
push eax
call fcn.1809cfb0
add esp, 0xc
jmp 0x18058cd0