Function at 0x4026d0
Capabilities:
Get common file path
Get startup folder
Query or enumerate registry value

Disassembly:
sub esp, 0x11c
push ebp
push esi
mov esi, dword [esp + 0x128]
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edx, 1
cmp ecx, 3
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], edx
jle 0x402a9f
cmp byte [ecx + esi - 1], 0x5c
jne 0x402718
push esi
mov dword [esp + 0x24], edx
call fcn.004012f0
add esp, 4
push ebx
lea eax, [esp + 0x28]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x28]
push ecx
call fcn.004012f0
lea edx, [esp + 0x2c]
push esi
push edx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea eax, [esp + 0x28]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x28]
push ecx
call fcn.004012f0
lea edx, [esp + 0x2c]
push esi
push edx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
lea eax, [esp + 0x10]
push eax
push ebp
push ebp
call edi
mov edx, dword [esp + 0x10]
mov ebx, dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
lea ecx, [esp + 0x28]
push ecx
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call fcn.004012f0
lea ecx, [esp + 0x2c]
push esi
push ecx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea edx, [esp + 0x10]
push edx
push 0x10
push ebp
call edi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push edx
call fcn.004012f0
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
cmp dword [0x40e934], ebp
je 0x40282e
lea ecx, [esp + 0x14]
push ecx
push 0x19
push ebp
call edi
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x28]
push edx
push eax
call ebx
lea ecx, [esp + 0x28]
push ecx
call fcn.004012f0
lea edx, [esp + 0x2c]
push esi
push edx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea eax, [esp + 0x10]
push eax
push 0x14
push ebp
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call fcn.004012f0
lea ecx, [esp + 0x2c]
push esi
push ecx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea edx, [esp + 0x10]
push edx
push 2
push ebp
call edi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push edx
call fcn.004012f0
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
cmp dword [0x40e934], ebp
je 0x4028d8
lea ecx, [esp + 0x10]
push ecx
push 0x17
push ebp
call edi
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x28]
push edx
push eax
call ebx
lea ecx, [esp + 0x28]
push ecx
call fcn.004012f0
lea edx, [esp + 0x2c]
push esi
push edx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea eax, [esp + 0x10]
push eax
push 0xb
push ebp
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call fcn.004012f0
lea ecx, [esp + 0x2c]
push esi
push ecx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
cmp dword [0x40e934], ebp
je 0x40294c
lea edx, [esp + 0x10]
push edx
push 0x16
push ebp
call edi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push edx
call fcn.004012f0
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea ecx, [esp + 0x10]
push ecx
push 7
push ebp
call edi
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x28]
push edx
push eax
call ebx
lea ecx, [esp + 0x28]
push ecx
call fcn.004012f0
lea edx, [esp + 0x2c]
push esi
push edx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
cmp dword [0x40e934], ebp
je 0x4029c0
lea eax, [esp + 0x10]
push eax
push 0x18
push ebp
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push edx
call ebx
lea eax, [esp + 0x28]
push eax
call fcn.004012f0
lea ecx, [esp + 0x2c]
push esi
push ecx
call fcn.004049c0
add esp, 0xc
test eax, eax
je 0x402a7f
lea edx, [esp + 0x18]
push edx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x402a67
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x20]
lea ecx, [esp + 0x28]
push eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
mov ebx, 0x104
push str.ProgramFilesDir
push eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x38], ebx
call edi
test eax, eax
jne 0x402a22
lea ecx, [esp + 0x28]
push esi
push ecx
call fcn.004049c0
add esp, 8
test eax, eax
je 0x402a6d
lea edx, [esp + 0x20]
lea eax, [esp + 0x28]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push eax
push ecx
push ebp
push str.CommonFilesDir
push edx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x38], ebx
call edi
test eax, eax
jne 0x402a5c
lea eax, [esp + 0x28]
push esi
push eax
call fcn.004049c0
add esp, 8
test eax, eax
je 0x402a74
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], ebp
jmp 0x402a7f
mov edx, dword [esp + 0x18]
push edx
jmp 0x402a79
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
pop ebx
cmp eax, ebp
je 0x402a91
push esi
call fcn.004012a0
add esp, 4
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
add esp, 0x11c
ret
pop edi
pop esi
mov eax, edx
pop ebp
add esp, 0x11c
ret