Function at 0x40b840
Capabilities:
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov al, byte [ebp + 8]
push ebx
xor ebx, ebx
neg al
push esi
push edi
mov edi, dword [0x467010]
mov esi, str.Widcomm_Bluetooth_Key_Container_Name
mov byte [ebp - 1], bl
mov dword [ebp - 0x10], ebx
sbb eax, eax
and eax, 0xffffffe0
add eax, 0x20
push eax
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
mov dword [ebp + 8], eax
push esi
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
call edi
test eax, eax
jne 0x40b8ff
call dword [0x467358]
push eax
call dword [0x467358]
push eax
push dword [ebp + 8]
push str.encryptKeyValue:_CryptAcquireContext_failed._keyset0x_x__Error_d__0x_x__n
call fcn.0040b42c
add esp, 0x10
cmp dword [ebp + 8], ebx
je 0x40b8c0
call fcn.0040b486
call fcn.0040b50a
jmp 0x40b8ca
call fcn.0040b4c8
call fcn.0040b5a9
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push 1
push str.Microsoft_Base_Cryptographic_Provider_v1.0
push esi
push eax
call edi
test eax, eax
jne 0x40b8ff
mov esi, dword [0x467358]
call esi
push eax
call esi
push eax
push str.encryptKeyValue:_CryptAcquireContext_2_failed._Error_d__0x_x__n
call fcn.0040b42c
add esp, 0xc
xor al, al
jmp 0x40ba77
lea eax, [ebp - 0xc]
push eax
xor esi, esi
inc esi
push esi
push dword [ebp - 0x10]
call dword [0x467030]
test eax, eax
mov edi, dword [0x46702c]
jne 0x40b932
call dword [0x467358]
cmp eax, 0x8009000d
jne 0x40b932
lea eax, [ebp - 0xc]
push eax
push ebx
push esi
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0xc], ebx
je 0x40ba4b
lea eax, [ebp - 8]
push eax
push esi
push 0x6602
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x40ba4b
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push esi
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [0x467028]
test eax, eax
je 0x40ba4b
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push esi
push ebx
push dword [ebp - 8]
call dword [0x467024]
test eax, eax
je 0x40ba4b
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea eax, [ecx + eax + 0xc]
push eax
mov dword [ebp - 0x1c], eax
call fcn.00439dca
mov esi, eax
cmp esi, ebx
pop ecx
mov dword [ebp + 8], esi
je 0x40ba4b
push 4
lea eax, [ebp - 0x1c]
push eax
push esi
call fcn.00439860
push 4
lea eax, [ebp - 0x14]
push eax
add esi, 4
push esi
call fcn.00439860
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
add esi, 4
push esi
push ebx
push 1
push dword [ebp - 0xc]
push dword [ebp - 8]
call dword [0x467028]
test eax, eax
je 0x40ba3d
add esi, dword [ebp - 0x14]
push 4
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.00439860
push dword [edi]
mov eax, dword [ebp + 0xc]
push dword [eax]
add esi, 4
push esi
call fcn.00439860
mov eax, dword [edi]
add esp, 0x18
push dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push esi
push ebx
push 1
push ebx
push dword [ebp - 8]
call dword [0x467024]
test eax, eax
je 0x40ba3d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 1], 1
mov dword [ebp + 8], ebx
mov dword [edi], eax
cmp dword [ebp + 8], ebx
je 0x40ba4b
push dword [ebp + 8]
call fcn.00439c78
pop ecx
cmp dword [ebp - 8], ebx
mov esi, dword [0x467020]
je 0x40ba5b
push dword [ebp - 8]
call esi
cmp dword [ebp - 0xc], ebx
je 0x40ba65
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x10], ebx
je 0x40ba74
push ebx
push dword [ebp - 0x10]
call dword [0x467014]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret