Function at 0x40a170
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439816
mov eax, dword fs:[0]
push eax
sub esp, 0x44c
mov eax, dword [0x446824]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x1fe
xor ebx, ebx
push ebx
push 0x454c68
call fcn.00423160
mov eax, dword [str.Telegram.exe]
push 0x44036c
push eax
call fcn.00421515
add esp, 0x14
test eax, eax
jne 0x40a221
mov edi, 0x44d848
xor esi, esi
mov edi, edi
mov edi, dword [edi]
call fcn.00409ec0
test eax, eax
je 0x40a1fb
mov ecx, dword [esi + 0x44d84c]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push ecx
push 0x454c68
call esi
push 0x440370
push 0x454c68
call esi
inc ebx
lea esi, [ebx*8]
mov eax, dword [esi + 0x44d848]
lea edi, [esi + 0x44d848]
push 0x44036c
push eax
call fcn.00421515
add esp, 8
test eax, eax
je 0x40a1d0
xor esi, esi
mov dword [ebp - 0x44c], esi
lea edx, [ebp - 0x44c]
push edx
push 0x44093c
push 0x17
push esi
push 0x43b5a0
mov dword [ebp - 4], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, esi
jl 0x40a442
mov dword [ebp - 0x430], 0x56ffcc30
mov dword [ebp - 0x42c], 0x11d0d398
mov dword [ebp - 0x428], 0xa000aeb2
mov dword [ebp - 0x424], 0x49fa08c9
mov dword [ebp - 0x444], esi
lea ecx, [ebp - 0x444]
push ecx
push esi
push esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x44c]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
lea ecx, [ebp - 0x430]
push ecx
push 1
push eax
call edx
cmp eax, esi
jl 0x40a42a
mov eax, dword [ebp - 0x444]
mov ecx, dword [eax]
push esi
lea edx, [ebp - 0x440]
push edx
push 1
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jne 0x40a42a
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
jmp 0x40a2e0
push 0x208
lea ecx, [ebp - 0x420]
push 0
push ecx
call fcn.00423160
movzx edx, byte [ebp - 0x431]
movzx eax, byte [ebp - 0x432]
movzx ecx, byte [ebp - 0x433]
push edx
movzx edx, byte [ebp - 0x434]
push eax
movzx eax, byte [ebp - 0x435]
push ecx
movzx ecx, byte [ebp - 0x436]
push edx
movzx edx, byte [ebp - 0x437]
push eax
movzx eax, byte [ebp - 0x438]
push ecx
movzx ecx, word [ebp - 0x43a]
push edx
movzx edx, word [ebp - 0x43c]
push eax
mov eax, dword [ebp - 0x440]
push ecx
push edx
push eax
lea ecx, [ebp - 0x420]
push str.CLSID_.8X__.4X__.4X__.2X_.2X__.2X_.2X_.2X_.2X_.2X_.2X
push ecx
call esi
add esp, 0x40
lea edx, [ebp - 0x448]
push edx
push 0x20019
push 0
lea eax, [ebp - 0x420]
push eax
push SysReAllocString
mov dword [ebp - 0x448], 0
call ebx
test eax, eax
jne 0x40a409
push 0x208
push eax
lea ecx, [ebp - 0x218]
push ecx
call fcn.00423160
add esp, 0xc
lea edx, [ebp - 0x454]
push edx
mov edx, dword [ebp - 0x448]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x450]
push ecx
push 0
push 0
push edx
mov dword [ebp - 0x454], 0x104
mov dword [ebp - 0x450], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a3fc
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x218]
push eax
push 0x454c68
call edi
push 0x44036c
push 0x454c68
call edi
mov ecx, dword [ebp - 0x448]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x444]
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push 0
lea ecx, [ebp - 0x440]
push ecx
push 1
push eax
call edx
test eax, eax
je 0x40a2e0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x444]
xor esi, esi
cmp eax, esi
je 0x40a442
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push 0x454c68
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x40a461
push 0x4403f4
push 0x454c68
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x44c]
cmp eax, esi
je 0x40a47a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, 0x454c68
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041fcee
mov esp, ebp
pop ebp
ret