Function at 0x40b4f0
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
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x430304]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov eax, dword [ebp + 8]
mov ebx, ecx
mov ecx, dword [str.0123456789abcdef]
push esi
mov dword [ebp - 0x18], ecx
mov ecx, dword [0x42be9c]
push edi
mov dword [ebp - 0x10], ecx
mov cl, byte [0x42bea4]
mov byte [ebp - 8], cl
xor ecx, ecx
push ecx
push 0x8000000
push 3
push ecx
mov edi, edx
mov edx, dword [0x42be98]
push 1
mov dword [ebp - 0x14], edx
mov edx, dword [0x42bea0]
push 0x80000000
push eax
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x83c], ecx
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x830], ecx
mov dword [ebp - 0x834], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40b5b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebx]
cmp dword [edi], 3
jg 0x40b5a2
push eax
push str.Could_not_open_file:_ERROR_CODE__d
push str._GetSHA1_DownloadManager__IAE_NPBDPAD_Z
push 0x119
push str...commondownloadDownloadManager.cpp
call fcn.00403d50
add esp, 0x14
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e376
mov esp, ebp
pop ebp
ret 4
push 0xf0000000
push 1
push 0
push 0
lea edx, [ebp - 0x830]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40b619
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebx]
cmp dword [edi], 3
jg 0x40b5fd
push eax
push str.CryptAcquireContext_failed:_ERROR_CODE__d
push str._GetSHA1_DownloadManager__IAE_NPBDPAD_Z
push 0x121
push str...commondownloadDownloadManager.cpp
call fcn.00403d50
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e376
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x830]
lea eax, [ebp - 0x834]
push eax
push 0
push 0
push 0x8004
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40b68f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [ebx]
cmp dword [edi], 3
jg 0x40b664
push eax
push str.CryptCreateHash_failed:_ERROR_CODE__d
push str._GetSHA1_DownloadManager__IAE_NPBDPAD_Z
push 0x128
push str...commondownloadDownloadManager.cpp
call fcn.00403d50
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x830]
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e376
mov esp, ebp
pop ebp
ret 4
push 0
lea eax, [ebp - 0x83c]
push eax
push 0x800
lea ecx, [ebp - 0x82c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test bl, bl
je 0x40b702
mov eax, dword [ebp - 0x83c]
test eax, eax
je 0x40b702
push 0
push eax
mov eax, dword [ebp - 0x834]
lea edx, [ebp - 0x82c]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40b700
push 0
lea ecx, [ebp - 0x83c]
push ecx
push 0x800
lea edx, [ebp - 0x82c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setne bl
test bl, bl
jne 0x40b6b4
jmp 0x40b702
xor bl, bl
mov dword [ebp - 0x838], 0x14
test bl, bl
je 0x40b76b
mov edx, dword [ebp - 0x834]
push 0
lea eax, [ebp - 0x838]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 2
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40b76b
xor eax, eax
mov byte [edi], 0
cmp dword [ebp - 0x838], eax
jbe 0x40b765
lea ecx, [ecx]
movzx ecx, byte [ebp + eax - 0x2c]
mov edx, ecx
shr edx, 4
mov dl, byte [ebp + edx - 0x18]
and ecx, 0xf
mov cl, byte [ebp + ecx - 0x18]
mov byte [edi + eax*2], dl
mov byte [edi + eax*2 + 1], cl
inc eax
cmp eax, dword [ebp - 0x838]
jb 0x40b740
mov byte [edi + 0x28], 0
jmp 0x40b76d
xor bl, bl
mov edx, dword [ebp - 0x834]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 0x830]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x840]
mov eax, dword [ecx]
cmp dword [eax], 3
jg 0x40b7bc
push edi
push str.Creating_HASH_of_value:__s
push str._GetSHA1_DownloadManager__IAE_NPBDPAD_Z
push 0x14a
push str...commondownloadDownloadManager.cpp
mov edi, eax
call fcn.00403d50
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.0040e376
mov esp, ebp
pop ebp
ret 4