Function at 0x180587b3
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 [0x180fb8f9]
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, 0x180fbba0
inc esi
and ecx, edi
mov dword [ebp - 0x7c], eax
je 0x1805880f
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 0x180588c6
call fcn.1800fc86
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, edi
mov ebx, eax
je 0x1805887f
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 0x1805888e
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], 0
je 0x1805889d
push dword [ebp - 0x44]
call fcn.1809ccaa
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.1809ccaa
pop ecx
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1809ccb5
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 0x18058947
call fcn.1800fc86
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, edi
mov ebx, eax
je 0x18058921
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 0x18058931
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], esi
je 0x1805893f
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], esi
jmp 0x18058892
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 0x18058a5b
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 0x18058af1
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 0x18058b2d
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 0x18058b3b
jb 0x180589d9
cmp dword [ebp - 0x58], 0x20000000
ja 0x18058b3b
mov dword [ebp - 0x74], edi
mov edi, dword [ebp - 0x40]
sub edi, dword [ebp - 0x44]
jne 0x180589e9
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 0x18058b2d
xor edi, edi
cmp dword [ebp - 0x74], edi
jbe 0x18058a30
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x44]
jne 0x18058a18
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 0x18058bbd
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x44]
cmp dword [ebp - 0x74], eax
je 0x180589dc
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 0x18058964
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 0x18058c3b
call fcn.1800fc86
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbba0
mov ebx, eax
je 0x18058acd
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 0x18058adb
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058ae9
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
jmp 0x18058892
call fcn.1800fc86
mov esi, eax
xor edi, edi
cmp dword [ebp - 0x20], edi
je 0x18058b08
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058b16
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
je 0x1805889f
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
jmp 0x1805889f
call fcn.1800fc86
push dword [ebp - 0x28]
mov esi, eax
call ebx
jmp 0x18058af8
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbba0
je 0x18058b84
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 0x18058b97
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058ba5
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058bb3
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
mov esi, 0x80004005
jmp 0x1805889f
call fcn.1800fc86
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbba0
mov dword [ebp - 0x24], eax
je 0x18058c04
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 0x18058c17
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058c25
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058c33
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
mov esi, dword [ebp - 0x24]
jmp 0x1805889f
cmp dword [ebp - 0x78], ebx
je 0x18058cb3
movzx ecx, byte [0x180fb8f9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbba0
je 0x18058c7f
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 0x18058c8d
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058c9b
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058ca9
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
mov esi, 0x8000ffff
jmp 0x1805889f
mov eax, dword [ebp - 0x7c]
push ebx
cmp eax, edi
je 0x18058e10
lea ecx, [ebp - 0x18]
push ecx
call fcn.1800663a
push eax
call fcn.1809e8b0
add esp, 0xc
test eax, eax
jne 0x18058d06
cmp dword [ebp - 0x20], edi
je 0x18058ce3
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x18058cf1
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], edi
je 0x18058cff
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
xor esi, esi
jmp 0x1805889f
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 [0x180fa268]
add esp, 0xc
mov ecx, 0x180fa268
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x94]
call fcn.180585fe
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx - 0xc]
pop ecx
lea ecx, [ebp - 0x7c]
call fcn.18008d5d
movzx ecx, byte [0x180fb8f9]
mov edi, dword [ebp - 0x7c]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbba0
je 0x18058d9b
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 0x18058dc1
push dword [ebp - 0x88]
call fcn.1809ccaa
pop ecx
push dword [ebp - 0x94]
mov dword [ebp - 0x88], esi
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x80], esi
call fcn.1809ccaa
pop ecx
cmp dword [ebp - 0x20], esi
je 0x18058dea
push dword [ebp - 0x20]
call fcn.18058532
pop ecx
cmp dword [ebp - 0x1c], esi
je 0x18058df8
push dword [ebp - 0x1c]
call fcn.180584db
pop ecx
cmp dword [ebp - 0x44], esi
je 0x18058e06
push dword [ebp - 0x44]
call fcn.1809ccaa
pop ecx
mov esi, 0x80040204
jmp 0x1805889f
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 0x18058cd5