Function at 0x402840
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 0x4bdde5
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x509074]
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 0x402875
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 esi, eax
mov dword [ebp - 0x28], 0x4e0930
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 0
cmp esi, 0xffffffff
jne 0x4028bd
mov byte [ebx + 0x10], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebx + 0xc], esi
jmp 0x402a52
mov dword [ebp - 0x20], 0x4e0404
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], 0x4e040c
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x20]
mov eax, dword [ebp - 0x20]
call dword [eax + 4]
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40292f
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
call dword [eax + 4]
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0x800c
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x402942
call edi
mov esi, eax
test esi, esi
je 0x40293f
mov dword [ebx + 0xc], esi
jmp 0x402a10
mov esi, dword [ebp - 0x10]
mov dword [ebp + 8], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 3
push ecx
push 0x400
lea ecx, [ebp - 0x34]
call fcn.004032f0
mov edi, dword [ebp - 0x34]
push 0
lea eax, [ebp + 8]
push eax
push 0x400
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4029b1
push 0
push dword [ebp + 8]
push edi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4029b5
cmp dword [ebp + 8], 0
jne 0x402973
push dword [ebp - 0x14]
mov ecx, ebx
call fcn.00402c80
mov esi, eax
jmp 0x4029c6
mov byte [ebx + 0x10], 1
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
mov eax, 0xc
mov dword [eax + ebx], esi
mov byte [ebp - 4], 2
test edi, edi
je 0x402a10
mov ecx, dword [ebp - 0x2c]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x4029f1
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a8b
push ecx
push edi
call fcn.00496f00
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], 0x4e040c
test eax, eax
je 0x402a29
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], 0x4e0404
test eax, eax
je 0x402a4b
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], 0x4e0930
test eax, eax
je 0x402a75
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x24], 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
call fcn.0049bebf
int3