Function at 0x402939
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push 0xdc
mov eax, 0x564e54
call fcn.0053cdbf
mov eax, dword [ebp + 0xc]
mov edi, ecx
xor esi, esi
mov ebx, edx
mov dword [ebp - 0xd4], eax
cmp edi, esi
je 0x402d88
cmp ebx, esi
je 0x402d88
cmp dword [ebp + 8], esi
je 0x402d88
cmp eax, esi
je 0x402d88
push 0xf0000000
push 0x18
push esi
push esi
lea eax, [ebp - 0xcc]
push eax
mov byte [ebp - 0xbd], 0
mov dword [ebp - 0xcc], esi
mov dword [ebp - 0xd0], esi
mov dword [ebp - 0xc4], esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402a6a
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x4029c6
push 0x2f
jmp 0x4029d6
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x4029e1
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x4029e3
mov eax, esi
push 4
push 0x34
push eax
lea esi, [ebp - 0x6c]
call fcn.00404b3c
mov esi, eax
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._Error_in_AcquireContext_0x_08x__n
push 0
mov ecx, esi
call fcn.00404c1a
mov edi, eax
call fcn.004027b4
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0x6c]
call fcn.00404ba8
xor esi, esi
cmp dword [ebp - 0xc4], esi
je 0x402a36
push dword [ebp - 0xc4]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 0xd0], esi
je 0x402a4a
push dword [ebp - 0xd0]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp dword [ebp - 0xcc], esi
je 0x402a5f
push esi
push dword [ebp - 0xcc]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [ebp - 0xbd]
jmp 0x402d8a
push 0x1c
mov dword [ebp - 0xc8], esi
mov dword [ebp - 4], 1
call fcn.004378f7
pop ecx
mov esi, eax
push 0x10
pop eax
push eax
mov dword [esi + 8], eax
lea eax, [esi + 0xc]
push edi
push eax
mov dword [ebp - 0xc8], esi
mov dword [esi], 0x208
mov dword [esi + 4], 0x6602
call fcn.00537ab0
add esp, 0xc
lea eax, [ebp - 0xd0]
push eax
push 0x100
push 0
push 0x1c
push esi
push dword [ebp - 0xcc]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push esi
mov edi, eax
call fcn.00437902
xor esi, esi
pop ecx
cmp edi, esi
jne 0x402b3e
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402aeb
push 0x2f
jmp 0x402afb
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402b06
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402b08
mov eax, esi
push 4
push 0x58
push eax
lea esi, [ebp - 0x6c]
call fcn.00404b3c
push 0
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.00404c1a
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptImportKey_0x_08x__n
call fcn.004027b4
mov byte [ebp - 4], 1
jmp 0x402a16
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xc4]
push eax
push esi
push dword [ebp - 0xd0]
push 0x8009
push dword [ebp - 0xcc]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x402bbe
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402b7c
push 0x2f
jmp 0x402b8c
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402b97
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402b99
mov eax, esi
push 4
pop edi
push edi
push 0x66
push eax
lea esi, [ebp - 0x6c]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptCreateHash_0x_08x__n
jmp 0x402a02
push 0x14
lea eax, [ebp - 0xe8]
push esi
push eax
call fcn.00538410
add esp, 0xc
push esi
lea eax, [ebp - 0xe8]
push eax
push 5
pop edi
push edi
push dword [ebp - 0xc4]
mov dword [ebp - 0xe8], 0x800c
call dword [sym.imp.ADVAPI32.dll_CryptSetHashParam]
test eax, eax
jne 0x402c4d
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402c0d
push 0x2f
jmp 0x402c1d
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402c28
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402c2a
mov eax, esi
push 4
push 0x6f
push eax
lea esi, [ebp - 0x6c]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptSetHashParam_0x_08x__n
jmp 0x402a02
push esi
push dword [ebp + 8]
push ebx
push dword [ebp - 0xc4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x402cbd
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402c79
push 0x2f
jmp 0x402c89
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402c94
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402c96
mov eax, esi
push 4
push 0x74
push eax
lea esi, [ebp - 0x6c]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptHashData_0x_08x__n
jmp 0x402a02
push esi
lea eax, [ebp - 0xc8]
push eax
push dword [ebp - 0xd4]
mov dword [ebp - 0xc8], 0x20
push 2
push dword [ebp - 0xc4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
jne 0x402d61
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402cfe
push 0x2f
jmp 0x402d0e
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402d19
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402d1b
mov eax, esi
push 4
push 0x7e
push eax
lea esi, [ebp - 0xbc]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_in_CryptGetHashParam_0x_08x__n
push 0
mov ecx, esi
call fcn.00404c1a
mov edi, eax
call fcn.004027b4
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
lea ecx, [ebp - 0xbc]
jmp 0x402a1b
mov byte [ebp - 0xbd], 1
jmp 0x402a20
xor al, al
call fcn.0053ce1b
ret 8