Function at 0x40fd20
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x638931
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x298
push ebx
push esi
mov esi, dword [esp + 0x2bc]
push edi
xor ebx, ebx
xor edi, edi
neg esi
mov ecx, dword [esp + 0x2b4]
lea eax, [esp + 0x10]
sbb esi, esi
push eax
and esi, 0x100
mov dword [esp + 0x38], edi
add esi, 0x20019
push esi
push ebx
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x410007
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x20]
lea eax, [esp + 0x38]
push edx
push eax
push ebx
push ebx
push str.CurrentVersion
push ecx
mov dword [esp + 0x38], 0x64
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40fffc
lea edx, [esp + 0x38]
push ebp
mov ebp, dword [esp + 0x2c0]
push edx
push 0x6c910c
push ebp
call fcn.0061fae1
mov eax, dword [ebp]
push 0x20
push eax
call fcn.00609c00
add esp, 0x14
cmp eax, ebx
je 0x40fdfb
mov byte [eax], bl
mov edx, dword [ebp]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [edx + ecx - 1], 0x2e
jne 0x40fdf7
dec ecx
push ebx
push ecx
mov ecx, ebp
call fcn.006231f6
mov edi, dword [esp + 0x38]
mov eax, dword [0x6f7b78]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x10]
push ecx
push str._sMain
push edx
mov dword [esp + 0x2bc], ebx
call fcn.0061fae1
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x28]
push eax
push esi
push ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ffe7
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x24]
lea ecx, [esp + 0xa0]
push eax
push ecx
push ebx
push ebx
push str.PathToExe
push edx
mov dword [esp + 0x3c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40ffdc
mov eax, 0x6c910c
test eax, eax
je 0x40ffd7
lea ecx, [esp + 0xa0]
test ecx, ecx
je 0x40ffd7
lea edx, [esp + 0xa0]
lea ecx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
mov word [esp + 0x34], bx
call fcn.00401f20
mov ecx, dword [esp + 0x2bc]
mov byte [esp + 0x2b0], 1
call fcn.00401070
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov word [esp + 0x1c], bx
lea ecx, [esp + 0x18]
mov byte [esp + 0x2b0], 2
call fcn.00401070
mov edi, 0x6c910c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x40ff34
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push ebx
push 0xffffffffffffffff
push 0x6c910c
push ebx
push ebx
call esi
cmp eax, ebx
mov dword [esp + 0x20], eax
je 0x40ff38
lea eax, [eax + eax + 2]
push eax
call fcn.00622acb
add esp, 4
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40ff34
mov ecx, dword [esp + 0x20]
push ecx
push eax
push 0xffffffffffffffff
push 0x6c910c
push ebx
push ebx
call esi
mov dword [esp + 0x20], eax
jmp 0x40ff38
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
cmp ecx, ebx
jne 0x40ff44
lea ecx, [esp + 0x30]
push ecx
mov esi, eax
call fcn.00609a4e
lea ebp, [eax + esi + 2]
lea esi, [ebp + ebp]
push esi
call fcn.00622acb
mov edx, dword [esp + 0x2c4]
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [edx], edi
je 0x40ffb6
mov ecx, esi
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
cmp eax, ebx
mov ecx, eax
jne 0x40ff8a
lea ecx, [esp + 0x30]
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40ff96
lea eax, [esp + 0x1c]
mov edx, dword [edx]
push ecx
push eax
push ebp
push edx
call fcn.006099de
mov esi, dword [esp + 0x2cc]
mov eax, dword [esi]
push eax
call fcn.00609a4e
add esp, 0x14
mov dword [esi + 8], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x2b0], 1
call fcn.00401070
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2b0], bl
call fcn.00401070
mov edi, 1
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x10]
mov dword [esp + 0x2b0], 0xffffffff
call fcn.00622d8a
pop ebp
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2a4]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x2a4
ret