Function at 0x402640
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4978e5
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x4db064]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 8
jb 0x402675
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x24], 0x4ba518
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0
cmp edi, 0xffffffff
jne 0x4026ba
mov byte [ebx + 0x10], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebx + 0xc], esi
jmp 0x402829
mov dword [ebp - 0x1c], 0x4ba004
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x14], 0x4ba00c
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
call dword [eax + 4]
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40272c
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x14]
call dword [eax + 4]
lea eax, [ebp - 0x10]
push eax
push 0
push 0
push 0x800c
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x402742
call esi
mov esi, eax
test esi, esi
je 0x40273c
mov dword [ebx + 0xc], esi
jmp 0x4027e7
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
sub eax, ecx
cmp eax, 0x400
jbe 0x40277c
lea eax, [ecx + 0x400]
mov dword [ebp - 0x2c], eax
jmp 0x402790
jae 0x402790
push ecx
push 0x400
lea ecx, [ebp - 0x30]
call fcn.00403030
mov ecx, dword [ebp - 0x30]
nop
push 0
lea eax, [ebp + 8]
push eax
push 0x400
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4027d0
push 0
push dword [ebp + 8]
push dword [ebp - 0x30]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4027d4
cmp dword [ebp + 8], 0
jne 0x40278c
push dword [ebp - 0x10]
mov ecx, ebx
call fcn.00402a30
mov esi, eax
jmp 0x4027db
mov byte [ebx + 0x10], 1
call esi
mov esi, eax
mov dword [ebx + 0xc], esi
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x30]
call fcn.00402e40
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], 0x4ba00c
test eax, eax
je 0x402800
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [ebp - 0x10], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 0x4ba004
test eax, eax
je 0x402822
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x24], 0x4ba518
test edi, edi
je 0x402849
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20], 0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4