Function at 0x40c001
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
lea ebp, [esp - 0x3c8]
sub esp, 0x448
mov eax, dword [0x431420]
xor eax, ebp
mov dword [ebp + 0x3c4], eax
push ebx
push esi
mov eax, dword [ebp + 0x3d0]
push edi
mov ecx, dword [ebp + 0x3d4]
mov esi, str.0123456789abcdef
lea edi, [ebp + 0x3b0]
movsd dword es:[edi], dword [esi]
xor ebx, ebx
push ebx
movsd dword es:[edi], dword [esi]
push 0x8000000
push 3
movsd dword es:[edi], dword [esi]
push ebx
push 1
movsd dword es:[edi], dword [esi]
push SysReAllocString
push eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x80], ecx
movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x78], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x7c], esi
cmp esi, 0xffffffff
jne 0x40c08e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x68]
push str.Error_opening_file__s_nError:__d_n
call fcn.00416b48
add esp, 0xc
xor eax, eax
jmp 0x40c1d1
push 0xf0000000
push 1
push ebx
push ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40c0c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.00416b48
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c087
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 0x8004
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40c0ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CryptAcquireContext_failed:__d_n
call fcn.00416b48
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
jmp 0x40c087
push ebx
lea eax, [ebp - 0x74]
push eax
mov edi, 0x400
push edi
lea eax, [ebp - 0x64]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x40c13e
cmp dword [ebp - 0x74], ebx
je 0x40c14c
push ebx
push dword [ebp - 0x74]
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40c149
push ebx
lea eax, [ebp - 0x74]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x7c]
call esi
mov dword [ebp - 0x68], eax
cmp eax, ebx
jne 0x40c117
jmp 0x40c14c
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x70], 0x14
cmp dword [ebp - 0x68], ebx
je 0x40c1af
push ebx
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp + 0x39c]
push eax
push 2
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40c1af
mov esi, dword [ebp - 0x80]
xor edi, edi
mov byte [esi], bl
cmp dword [ebp - 0x70], ebx
jbe 0x40c1aa
movzx eax, byte [ebp + edi + 0x39c]
mov ecx, eax
shr ecx, 4
mov cl, byte [ebp + ecx + 0x3b0]
and eax, 0xf
mov al, byte [ebp + eax + 0x3b0]
mov byte [esi + edi*2], cl
mov byte [esi + edi*2 + 1], al
inc edi
cmp edi, dword [ebp - 0x70]
jb 0x40c17f
mov byte [esi + 0x28], bl
jmp 0x40c1b2
mov dword [ebp - 0x68], ebx
push dword [ebp - 0x78]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push ebx
push dword [ebp - 0x6c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp + 0x3c4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413f3b
add ebp, 0x3c8
leave
ret