Function at 0x40e930
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
push 0xffffffffffffffff
push 0x498500
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x4cff04]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x230], ecx
cmp dword [ecx + 0xa58], 0
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x224], eax
jne 0x40e983
xor al, al
jmp 0x40ecf1
push 0x2000
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x220], 0
mov byte [ebp - 0x215], 0
mov dword [ebp - 4], 0
call fcn.0045d568
mov edi, eax
push 0x1000
mov dword [ebp - 0x25c], edi
call fcn.0045d568
add esp, 8
mov ebx, eax
mov dword [ebp - 0x260], ebx
test edi, edi
je 0x40ec48
test ebx, ebx
je 0x40ec48
push 0x4a5e78
push esi
call fcn.0045d7dd
mov esi, eax
add esp, 8
mov dword [ebp - 0x234], esi
test esi, esi
jne 0x40ea1b
push 0x4c30a4
lea eax, [ebp - 0x238]
mov dword [ebp - 0x238], str.Could_not_open_data_file
push eax
call fcn.0043e0b1
push 0x4a5e78
push dword [ebp - 0x224]
call fcn.0045d7dd
add esp, 8
mov dword [ebp - 0x21c], eax
test eax, eax
jne 0x40ea53
push 0x4c30a4
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x23c], str.Could_not_open_signature_file
push eax
call fcn.0043e0b1
push eax
push 0x1000
push 1
push ebx
call fcn.0045dc4c
push dword [ebp - 0x21c]
mov dword [ebp - 0x224], eax
call fcn.0045da00
add esp, 0x14
test eax, eax
je 0x40ea94
push 0x4c30a4
lea eax, [ebp - 0x240]
mov dword [ebp - 0x240], str.Could_not_read_signature_file
push eax
call fcn.0043e0b1
push dword [ebp - 0x21c]
call fcn.0045d9d5
add esp, 4
test eax, eax
jne 0x40eac1
push 0x4c30a4
lea eax, [ebp - 0x244]
mov dword [ebp - 0x244], str.Invalid_signature_file
push eax
call fcn.0043e0b1
lea eax, [ebp - 0x220]
push eax
mov eax, dword [ebp - 0x230]
push 0
push 0
push 0x8004
push dword [eax + 0xa54]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x40eb02
push 0x4c30a4
lea eax, [ebp - 0x248]
mov dword [ebp - 0x248], str.Could_not_create_hash_object
push eax
call fcn.0043e0b1
mov ecx, dword [ebp - 0x224]
xor edx, edx
mov eax, ecx
shr eax, 1
mov dword [ebp - 0x228], eax
je 0x40eb41
lea eax, [ecx - 1]
add eax, ebx
mov dword [ebp - 0x22c], eax
mov al, byte [eax]
mov cl, byte [edx + ebx]
mov byte [edx + ebx], al
inc edx
mov eax, dword [ebp - 0x22c]
mov byte [eax], cl
dec eax
mov dword [ebp - 0x22c], eax
cmp edx, dword [ebp - 0x228]
jb 0x40eb21
push esi
call fcn.0045d9d5
add esp, 4
test eax, eax
jne 0x40ebbe
push esi
push 0x2000
push 1
push edi
call fcn.0045dc4c
push esi
mov dword [ebp - 0x228], eax
call fcn.0045da00
add esp, 0x14
test eax, eax
je 0x40eb8a
push 0x4c30a4
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], str.Error_reading_data_file
push eax
call fcn.0043e0b1
push 0
push dword [ebp - 0x228]
push edi
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x40eb41
push 0x4c30a4
lea eax, [ebp - 0x250]
mov dword [ebp - 0x250], str.Error_while_hashing_data
push eax
call fcn.0043e0b1
mov eax, dword [ebp - 0x230]
mov ecx, dword [ebp - 0x224]
push 0
push 0
push dword [eax + 0xa58]
push ecx
push ebx
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureW]
test eax, eax
je 0x40ebf2
mov byte [ebp - 0x215], 1
jmp 0x40eca0
movups xmm0, xmmword [str.Bad_update_signature]
mov ax, word [0x4a5d00]
mov word [ebp - 0x1ec], ax
lea eax, [ebp - 0x214]
movups xmmword [ebp - 0x214], xmm0
mov dword [ebp - 0x254], eax
lea eax, [ebp - 0x254]
movups xmm0, xmmword [0x4a5ce8]
push 0x4c30a4
push eax
movups xmmword [ebp - 0x204], xmm0
movq xmm0, qword [0x4a5cf8]
movq qword [ebp - 0x1f4], xmm0
call fcn.0043e0b1
push 0x4c30a4
lea eax, [ebp - 0x258]
mov dword [ebp - 0x258], str.Could_not_allocate_memory_for_reading_file
push eax
call fcn.0043e0b1
push 0x10
push str.Auto_Update_Error
push dword [ebp - 0x264]
push dword [0x4db82c]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, 0x40ec82
ret
test esi, esi
je 0x40ecad
push esi
call fcn.0045d926
add esp, 4
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x40ecc0
push eax
call fcn.0045d926
add esp, 4
test edi, edi
je 0x40eccd
push edi
call fcn.0045d563
add esp, 4
test ebx, ebx
je 0x40ecda
push ebx
call fcn.0045d563
add esp, 4
cmp dword [ebp - 0x220], 0
jne 0x40eceb
push 0
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov al, byte [ebp - 0x215]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00420b40
mov esp, ebp
pop ebp
ret 8