Function at 0x40da60
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x417b86
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x674
push ebx
push ebp
push esi
mov edx, ecx
push edi
xor ebx, ebx
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x89]
mov byte [esp + 0x88], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [edx + 8]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x694]
lea ecx, [esp + 0x88]
push ecx
push edx
call dword [eax + 0x16]
add esp, 8
test eax, eax
jne 0x40dee6
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push ebx
call sub.WinSCard.dll_SCardEstablishContext
test eax, eax
jne 0x40dee6
mov edx, 0x40
lea eax, [esp + 0xc7]
sub eax, edx
cmp byte [eax + edx], 0x20
jne 0x40daf0
dec edx
cmp edx, ebx
jg 0x40dae5
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0xf1]
mov byte [esp + 0xf0], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
lea esi, [esp + 0x88]
lea edi, [esp + 0xf0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x23]
push ebx
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x694], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00401e80
lea edi, [esp + 0xf0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xf0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x68c], 1
lea ecx, [esp + ecx + 0xf0]
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.00414e90
push ebx
lea eax, [esp + 0x18]
push ebx
lea ecx, [esp + 0x48]
push eax
push ecx
mov byte [esp + 0x69c], 2
call fcn.00415650
add esp, 0x10
lea ecx, [esp + 0x14]
mov byte [esp + 0x68c], 6
call fcn.0040a000
mov edx, dword [esp + 0x40]
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x50]
push 1
push eax
push 0x3e8
push ecx
mov dword [esp + 0x60], edx
call sub.WinSCard.dll_SCardGetStatusChangeW
test eax, eax
je 0x40dbf5
mov edx, dword [esp + 0x2c]
push edx
call sub.WinSCard.dll_SCardReleaseContext
lea ecx, [esp + 0x40]
mov dword [esp + 0x68c], 7
call fcn.0040a000
jmp 0x40dee6
mov eax, dword [esp + 0x2c]
push eax
call sub.WinSCard.dll_SCardReleaseContext
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
push ecx
push 9
push ebx
push str.SOFTWAREMicrosoftCryptographyCalaisSmartCards
push 0x80000002
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40dc3c
lea ecx, [esp + 0x40]
mov dword [esp + 0x68c], 8
call fcn.0040a000
jmp 0x40dee6
xor esi, esi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x47e]
mov word [esp + 0x47c], bx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x47c]
push ebx
rep stosd dword es:[edi], eax
push ebx
push ebx
lea edx, [esp + 0x58]
push ebx
lea ecx, [esp + 0x48c]
mov eax, esi
push edx
mov edx, dword [esp + 0x38]
push ecx
push eax
push edx
mov dword [esp + 0x6c], 0x104
inc esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x23]
push ebx
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x694], 9
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00401e80
push str.SOFTWAREMicrosoftCryptographyCalaisSmartCards_
mov byte [esp + 0x690], 0xa
call fcn.00401e60
add esp, 4
lea ecx, [eax*2 + str.SOFTWAREMicrosoftCryptographyCalaisSmartCards_]
push ecx
push str.SOFTWAREMicrosoftCryptographyCalaisSmartCards_
lea ecx, [esp + 0x1c]
call fcn.0040e9f0
xor eax, eax
cmp word [esp + 0x47c], bx
mov byte [esp + 0x68c], 0xc
je 0x40dd08
lea ecx, [esp + 0x47c]
add ecx, 2
inc eax
cmp word [ecx], bx
jne 0x40dcff
lea edx, [esp + 0x37]
lea eax, [esp + eax*2 + 0x47c]
push edx
lea ecx, [esp + 0x480]
push eax
push ecx
lea ecx, [esp + 0x20]
call fcn.004040c0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 1
push ebx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40de9d
mov ecx, 0x40
lea edi, [esp + 0x379]
mov byte [esp + 0x378], bl
lea edx, [esp + 0x378]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0x104
push ecx
push edx
stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
push ebx
push ebx
push 0x423984
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40ddb8
mov ecx, dword [esp + 0x10]
push ecx
call ebp
mov dword [esp + 0x10], ebx
mov byte [esp + 0x68c], 0xe
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
sub edx, eax
lea ecx, [esp + 0x1c]
sar edx, 1
push edx
push eax
call fcn.0040e7d0
jmp 0x40de91
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x60]
cmp eax, ecx
je 0x40ddd9
mov ecx, dword [esp + 0x10]
push ecx
call ebp
mov dword [esp + 0x10], ebx
mov byte [esp + 0x68c], 0xf
jmp 0x40dd9c
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x275]
mov byte [esp + 0x274], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x274]
stosb byte es:[edi], al
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0x104
push eax
push ecx
push ebx
push ebx
push str.ATRMask
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40de4a
mov eax, dword [esp + 0x10]
push eax
call ebp
mov dword [esp + 0x10], ebx
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
sub ecx, eax
mov byte [esp + 0x68c], 0x10
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.0040e7d0
jmp 0x40de91
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x274]
push edx
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x380]
push ecx
mov ecx, dword [esp + 0x44]
push edx
call fcn.0040dff0
test al, al
jne 0x40df03
mov eax, dword [esp + 0x10]
push eax
call ebp
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x14]
mov byte [esp + 0x68c], 0x14
call fcn.0040a000
cmp dword [esp + 0x28], ebx
je 0x40dc5e
jmp 0x40debc
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
sub ecx, eax
mov byte [esp + 0x68c], 0xd
sar ecx, 1
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.0040e7d0
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x40dec7
push eax
call ebp
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40ded2
push eax
call ebp
lea ecx, [esp + 0x40]
mov dword [esp + 0x68c], 0xffffffff
call fcn.0040a000
xor al, al
mov ecx, dword [esp + 0x684]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x680
ret 8
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x171]
mov byte [esp + 0x170], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x28]
stosb byte es:[edi], al
lea eax, [esp + 0x170]
push edx
push eax
push ebx
push ebx
push str.Crypto_Provider
push ecx
mov dword [esp + 0x40], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40df62
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
sub edx, eax
mov byte [esp + 0x68c], 0x11
sar edx, 1
push edx
jmp 0x40deb2
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x698]
mov ecx, ebx
lea esi, [esp + 0x170]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x38]
lea esi, [esp + 0x170]
lea edx, [ecx + 0x34]
mov ecx, 0x82
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, ebx
mov edi, edx
mov edx, ecx
mov eax, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebp
mov ecx, dword [esp + 0x24]
push ecx
call ebp
lea ecx, [esp + 0x14]
mov byte [esp + 0x68c], 0x12
call fcn.0040a000
lea ecx, [esp + 0x40]
mov dword [esp + 0x68c], 0x13
call fcn.0040a000
mov al, 1
jmp 0x40dee8