Function at 0x402984
Capabilities:
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
or dword [ebp - 0x14], 0xffffffff
push ebx
push esi
push edi
xor edi, edi
xor esi, esi
inc dword [0x40fa54]
mov eax, dword [0x40fa54]
cmp eax, dword [0x40fa7c]
mov dword [ebp - 8], edi
mov dword [ebp - 0x18], edi
jae 0x402e14
mov esi, dword [0x40fa50]
push esi
call fcn.00401d69
mov dword [0x40fa50], eax
mov word [esi + 4], di
mov eax, dword [0x40fa90]
push esi
xor dword [esi + 0xe], eax
mov eax, dword [0x40fa3c]
and byte [eax], 0
call fcn.004025ef
push dword [0x40fa40]
mov dword [ebp - 4], eax
call fcn.00405f43
add esp, 0xc
test byte [esi + 0xd], 1
je 0x402a0a
push dword [0x40fa40]
push dword [0x40fa34]
call fcn.00407ec0
pop ecx
pop ecx
mov eax, dword [0x40fa54]
xor edx, edx
inc eax
imul eax, eax, 0x64
div dword [0x40fa7c]
cmp byte [esi + 0xb], 2
mov dword [ebp - 0x1c], eax
je 0x402d50
cmp dword [ebp - 4], edi
push 1
pop ebx
je 0x402a7e
cmp byte [esi + 8], 3
jne 0x402a3a
xor ebx, ebx
jmp 0x402a8d
push edi
mov dword [ebp - 0x10], edi
push dword [0x40fa40]
call section..text
mov edi, eax
pop ecx
cmp edi, 0xffffffff
pop ecx
je 0x402a76
push edi
call fcn.0040114d
cmp eax, dword [esi + 0x12]
pop ecx
jne 0x402a6f
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
call fcn.00403cb6
add esp, 0xc
push edi
call fcn.0040121f
pop ecx
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0xe]
je 0x402a36
test byte [esi + 0xd], 6
je 0x402a8d
push esi
call fcn.00402834
pop ecx
mov ebx, eax
xor edi, edi
lea ecx, [ebp - 0x19c]
mov dword [0x40fa84], edi
call fcn.00407766
cmp ebx, edi
je 0x402c53
push dword [0x40fa40]
call fcn.00406285
push dword [0x40fa40]
push dword [0x40fa3c]
call fcn.00407ec0
push str..__A
push dword [0x40fa3c]
call fcn.0040601e
push edi
push dword [0x40fa3c]
call section..text
add esp, 0x1c
cmp eax, 0xffffffff
je 0x402b18
push eax
call fcn.0040121f
push dword [0x40fa3c]
call fcn.00407e40
mov ecx, dword [0x40fa3c]
inc byte [eax + ecx - 1]
push edi
push dword [0x40fa3c]
lea eax, [eax + ecx - 1]
call section..text
add esp, 0x10
jmp 0x402ae3
push dword [0x40fa3c]
call fcn.0040104d
mov edi, eax
pop ecx
cmp edi, 0xffffffff
mov dword [ebp - 0x14], edi
jne 0x402b46
push dword [0x40fa3c]
mov dword [0x40fa84], 0x11
call fcn.00401ee7
pop ecx
jmp 0x402b64
push dword [esi + 0x16]
lea ecx, [ebp - 0x19c]
push dword [0x40f058]
push edi
call fcn.00407821
cmp dword [0x40fb04], 2
jne 0x402b74
lea ecx, [ebp - 0x19c]
call fcn.00407772
jmp 0x402dff
mov al, byte [esi + 0xd]
test al, 8
je 0x402b95
test al, 6
lea eax, [esi + 0x2e]
jne 0x402b85
lea eax, [esi + 0x1a]
lea ecx, [eax + 0x10]
push ecx
lea ecx, [eax + 8]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call fcn.0040121f
or dword [ebp - 0x14], 0xffffffff
pop ecx
test byte [esi + 0xd], 1
jne 0x402bf9
push 0
push dword [0x40fa3c]
call section..text
mov edi, eax
pop ecx
cmp edi, 0xffffffff
pop ecx
jne 0x402bce
push dword [0x40fa3c]
mov dword [0x40fa84], 0x10
jmp 0x402c3d
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00403cb6
push edi
call fcn.0040121f
mov eax, dword [ebp - 0xc]
add esp, 0x10
cmp eax, dword [esi + 0xe]
je 0x402bf9
mov dword [0x40fa84], 0x15
jmp 0x402c37
cmp dword [ebp - 4], 0
push dword [0x40fa3c]
je 0x402c1e
push dword [0x40fa40]
call fcn.004043d0
pop ecx
mov dword [0x40fa68], 1
pop ecx
jmp 0x402c26
push esi
call fcn.00402e49
pop ecx
pop ecx
cmp word [esi + 4], 0x1b
jne 0x402c72
mov dword [0x40fa84], 0x16
push dword [0x40fa40]
call fcn.00401ee7
pop ecx
lea ecx, [ebp - 0x19c]
call fcn.00407772
jmp 0x402e14
push dword [esi + 0x16]
lea ecx, [ebp - 0x19c]
push dword [0x40f058]
push 0xffffffffffffffff
call fcn.00407821
cmp dword [0x40fb04], 2
je 0x402c43
lea ecx, [ebp - 0x19c]
call fcn.00407772
xor eax, eax
cmp dword [0x40fa84], eax
jne 0x402e14
test byte [esi + 0xd], 1
je 0x402c95
mov word [esi + 4], ax
cmp byte [esi + 8], 0
je 0x402d2d
cmp byte [esi + 0xa], 1
jne 0x402d2d
lea ecx, [ebp - 8]
push ecx
push 0xf003f
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionSharedDLLs
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402d2d
push 4
lea eax, [ebp - 0xc]
pop edi
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push dword [0x40fa40]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402cfd
inc dword [ebp - 4]
jmp 0x402d07
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], edi
push dword [ebp - 0xc]
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x10]
push 0
push dword [0x40fa40]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402d30
push 4
pop edi
cmp byte [esi + 8], 3
jne 0x402d42
push dword [0x40fa40]
call fcn.00403023
pop ecx
cmp byte [esi + 0xc], 1
jne 0x402d53
mov dword [0x40fa5c], esi
jmp 0x402d53
push 4
pop edi
cmp byte [esi + 9], 1
jne 0x402d5f
mov dword [0x40fa64], esi
cmp byte [esi + 9], 2
jne 0x402d6b
mov dword [0x40fa60], esi
push edi
push esi
call fcn.004025ba
mov edi, eax
pop ecx
pop ecx
cmp byte [edi], 0
je 0x402def
push 5
push esi
call fcn.004025ba
pop ecx
mov ebx, eax
pop ecx
lea eax, [ebp - 0xc]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x402def
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x402def
lea eax, [ebp - 0x224]
push eax
call fcn.0040605d
lea eax, [ebp - 0x224]
push edi
push eax
call fcn.00407ed0
lea eax, [ebp - 0x224]
push str..lnk
push eax
call fcn.00407ed0
push 0
lea eax, [ebp - 0x224]
push ebx
push eax
push dword [0x40fa40]
call fcn.0040162b
add esp, 0x24
push dword [ebp - 0x1c]
call fcn.00405f22
pop ecx
mov dword [ebp - 8], 1
cmp dword [ebp - 0x14], 0xffffffff
je 0x402e0e
push dword [ebp - 0x14]
call fcn.0040121f
pop ecx
cmp dword [ebp - 8], 0
jne 0x402e25
mov eax, dword [0x40fa3c]
cmp byte [eax], 0
je 0x402e25
push eax
call fcn.004082bc
pop ecx
test esi, esi
je 0x402e31
mov eax, dword [0x40fa90]
xor dword [esi + 0xe], eax
cmp dword [ebp - 0x18], 0
pop edi
pop esi
pop ebx
je 0x402e44
lea eax, [ebp - 0x18]
push eax
call fcn.00406110
pop ecx
mov eax, dword [ebp - 8]
leave
ret