Function at 0x401610
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 0x435ebb
push eax
mov eax, 0x1064
mov dword fs:[0], esp
call fcn.00416320
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 0x40166f
mov eax, 0x4396f0
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 0x4016ec
push 0xe471e8
push 0xe4e790
call fcn.00403690
mov esi, eax
mov eax, dword [edi + 4]
add esp, 8
cmp eax, ebp
jne 0x4016ad
mov eax, 0x4396f0
push eax
push esi
call fcn.00403690
add esp, 8
mov ecx, esi
push 0xa
call fcn.00402b00
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
test byte [eax + 4], 6
jne 0x4017a5
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4017a5
jmp 0x4017a0
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 0x401733
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xe471d4
push 0xe4e790
call fcn.00403690
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402b00
mov edx, dword [esi]
xor edi, edi
mov eax, dword [edx + 4]
add eax, esi
jmp 0x4016ca
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 0x4017ba
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 0xe471c0
push 0xe4e790
call fcn.00403690
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402b00
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 0x4017a5
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4017a5
mov edi, 4
mov eax, dword [esi]
push ebp
push edi
mov ecx, dword [eax + 4]
add ecx, esi
call fcn.00402cd0
xor al, al
jmp 0x40198e
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 0x401812
mov edi, dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov eax, dword [esp + 0x20]
cmp eax, ebp
jbe 0x401812
mov ecx, dword [esp + 0x14]
push ebp
push eax
lea eax, [esp + 0x7c]
push eax
push ecx
call edi
test eax, eax
je 0x4018f8
lea edx, [esp + 0x20]
push ebp
push edx
lea eax, [esp + 0x7c]
push 0x1000
push eax
push ebx
call esi
test eax, eax
jne 0x4017dd
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 0x401963
mov eax, dword [esp + 0x1c]
xor esi, esi
cmp eax, ebp
jbe 0x401861
lea edi, [esp + 0x34]
xor eax, eax
mov al, byte [esp + esi + 0x60]
push eax
push 0xe471b8
push edi
call fcn.004162cd
mov eax, dword [esp + 0x28]
add esp, 0xc
inc esi
add edi, 2
cmp esi, eax
jb 0x401840
mov cl, byte [esp + 0x13]
push ebp
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
call fcn.00402f00
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.004030a0
test al, al
je 0x4018b7
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 [0x4396ec]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x108c]
push 0
push edx
mov dword [esp + 0x1088], 0
call fcn.00402d00
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40195e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x401955
cmp al, 0xff
je 0x401955
dec al
mov byte [ecx], al
jmp 0x40195e
push 0xe471a8
push 0xe4e790
call fcn.00403690
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00402b00
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 0x40193c
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x40193c
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
cmp edi, ebp
je 0x401963
mov edx, dword [ecx + 4]
push ebp
or edx, edi
push edx
call fcn.00402f50
jmp 0x401963
push ecx
call fcn.0042a51d
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 0x401979
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40198a
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