Function at 0x40a2c0
Capabilities:
Authenticate hmac
Create new key via cryptacquirecontext
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x54112c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov ecx, edi
mov dword [ebp - 0x90], edi
mov dword [ebp - 0x94], eax
mov dword [ebp - 0xa4], esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a2f6
push 0xf0000000
push 0x18
push str.Microsoft_Enhanced_RSA_and_AES_Cryptographic_Provider
push 0
lea eax, [ebp - 0x9c]
sub ecx, edx
push eax
mov dword [ebp - 0x8c], ecx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
mov ebx, eax
test ebx, ebx
je 0x40a67e
cmp dword [ebp - 0x8c], 0x40
jbe 0x40a3e2
lea eax, [ebp - 0x88]
push eax
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x9c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov ebx, eax
test ebx, ebx
je 0x40a66e
push 0
push dword [ebp - 0x8c]
push edi
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x40a3d4
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
lea eax, [ebp - 0xa0]
push 0
push eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xa0], 4
push eax
push 4
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a3d4
mov eax, dword [ebp - 0x8c]
call fcn.0048c270
mov eax, esp
lea ecx, [ebp - 0x8c]
push 0
push ecx
push eax
push 2
push dword [ebp - 0x88]
mov dword [ebp - 0x90], eax
call ebx
test eax, eax
je 0x40a3d4
mov ebx, 1
jmp 0x40a3d6
xor ebx, ebx
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test ebx, ebx
je 0x40a66e
mov esi, dword [ebp - 0x8c]
xor edx, edx
mov ebx, dword [ebp - 0x90]
lea edx, [edx - 1]
lea edi, [edx + 0x40]
cmp edi, esi
jae 0x40a407
mov cl, byte [edi + ebx]
jmp 0x40a409
xor cl, cl
mov al, cl
xor cl, 0x5c
xor al, 0x36
mov byte [ebp + edx - 0x44], cl
mov byte [ebp + edx - 4], al
test edi, edi
jne 0x40a3f8
lea eax, [ebp - 0x88]
push eax
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp - 0x9c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov esi, dword [ebp - 0xa4]
mov ebx, eax
test ebx, ebx
je 0x40a66e
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptHashData]
lea eax, [ebp - 0x44]
push edi
push 0x40
push eax
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a4e9
mov edi, dword [ebp - 0x94]
mov ecx, edi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40a470
push 0
sub ecx, edx
push ecx
push edi
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a4e9
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
lea eax, [ebp - 0xa0]
push 0
push eax
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xa0], 4
push eax
push 4
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a4e9
mov eax, dword [ebp - 0x8c]
call fcn.0048c270
mov edi, esp
lea eax, [ebp - 0x8c]
push 0
push eax
push edi
push 2
push dword [ebp - 0x88]
mov dword [ebp - 0x90], edi
call ebx
test eax, eax
je 0x40a4ef
mov ebx, 1
jmp 0x40a4f1
mov edi, dword [ebp - 0x90]
xor ebx, ebx
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test ebx, ebx
je 0x40a66e
lea eax, [ebp - 0x88]
push eax
push 0
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x9c]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov ebx, eax
test ebx, ebx
je 0x40a66e
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptHashData]
lea eax, [ebp - 0x84]
push 0
push 0x40
push eax
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a57e
push 0
push dword [ebp - 0x8c]
push edi
push dword [ebp - 0x88]
call ebx
test eax, eax
je 0x40a57e
push 0
lea eax, [ebp - 0x8c]
push eax
push edi
push 2
push dword [ebp - 0x88]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x40a57e
mov ebx, 1
jmp 0x40a580
xor ebx, ebx
push dword [ebp - 0x88]
mov dword [ebp - 0x94], ebx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
test ebx, ebx
je 0x40a66e
cmp dword [ebp - 0x8c], 0
je 0x40a66e
cmp dword [esi + 0x14], 0x10
mov eax, esi
mov dword [esi + 0x10], 0
jb 0x40a5b8
mov eax, dword [esi]
xor ebx, ebx
mov byte [eax], 0
cmp dword [ebp - 0x8c], ebx
jbe 0x40a668
lea esp, [esp]
movzx eax, byte [edi + ebx]
push eax
lea eax, [ebp - 0x98]
push str._02x
push eax
call fcn.00406950
lea edi, [ebp - 0x98]
add esp, 0xc
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x40a5f2
mov edx, dword [esi + 0x14]
sub edi, ecx
mov ecx, dword [esi + 0x10]
mov eax, edx
sub eax, ecx
cmp edi, eax
ja 0x40a638
lea eax, [ecx + edi]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x40a618
mov eax, dword [esi]
lea esi, [eax + ecx]
push edi
lea eax, [ebp - 0x98]
push eax
push esi
call fcn.004afe90
mov byte [esi + edi], 0
add esp, 0xc
mov esi, dword [ebp - 0xa4]
jmp 0x40a655
push edi
lea eax, [ebp - 0x98]
mov byte [ebp - 0xa8], 0
push eax
push dword [ebp - 0xa8]
mov ecx, esi
push edi
call fcn.004061e0
mov edi, dword [ebp - 0x90]
inc ebx
cmp ebx, dword [ebp - 0x8c]
jb 0x40a5d0
mov ebx, dword [ebp - 0x94]
push 0
push dword [ebp - 0x9c]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, ebx
lea esp, [ebp - 0xb4]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048bf8d
mov esp, ebp
pop ebp
ret