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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov eax, dword [0x431014]
xor eax, ebp
mov dword [ebp - 0x10], eax
xor ebx, ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x40893f
mov edi, eax
lea ebx, [eax + eax]
xor eax, eax
dec eax
test edi, edi
cmovs ebx, eax
push ebx
call fcn.0040a20b
add esp, 4
mov esi, eax
push ebx
push 0
push eax
call fcn.0040c770
add esp, 0xc
push edi
mov edi, esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
xor ebx, ebx
test eax, eax
je 0x408936
lea eax, [ebp - 0x14]
mov dword [eax], ebx
push eax
push ebx
push ebx
push section..rdata
call sub.SHELL32.dll_SHGetKnownFolderPath
test eax, eax
js 0x40884f
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.0040a34b
add esp, 4
test eax, eax
je 0x408844
cmp word [ebx + eax*2 - 2], 0x5c
mov dword [ebp - 0x20], edi
jne 0x408856
push eax
push ebx
push edi
call fcn.004121cc
add esp, 0xc
test eax, eax
je 0x4088c2
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
lea ebx, [ebp - 0x18]
mov dword [ebx], eax
push ebx
push eax
push eax
push 0x10002
push 0x42c104
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x4088cd
xor eax, eax
jmp 0x40892c
test ebx, ebx
je 0x40884f
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
jmp 0x408936
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], ecx
mov ecx, eax
add ecx, 2
mov dword [ebp - 0x24], ecx
lea esi, [eax + eax + 4]
mov eax, 0xffffffff
cmovs esi, eax
push esi
call fcn.0040a20b
add esp, 4
mov edi, eax
push esi
push 0
push eax
call fcn.0040c770
sub esp, 4
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00408a00
add esp, 0x10
push dword [ebp - 0x1c]
push edi
push dword [ebp - 0x20]
call fcn.004121cc
add esp, 0xc
mov esi, eax
push edi
mov edi, dword [ebp - 0x20]
call fcn.0040a497
add esp, 4
test esi, esi
jne 0x408807
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov bl, 1
jmp 0x408936
mov edi, dword [ebp - 0x18]
xor eax, eax
cmp edi, 4
jb 0x40892c
mov esi, edi
and esi, 0xfffffffe
push esi
call fcn.0040a20b
add esp, 4
push esi
xor ecx, ecx
push ecx
push eax
mov esi, eax
call fcn.0040c770
add esp, 0xc
push ebx
mov dword [ebp - 0x1c], esi
push esi
xor ebx, ebx
xor eax, eax
push eax
push 0x10002
push 0x42c104
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x408953
push dword [ebp - 0x1c]
call fcn.0040a497
add esp, 4
mov eax, ebx
test esi, esi
setne bl
and bl, al
mov edi, dword [ebp - 0x20]
push edi
call fcn.0040a497
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040af35
mov eax, ebx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
shr edi, 1
push edi
push dword [ebp - 0x1c]
call fcn.00413eb7
add esp, 8
test eax, eax
je 0x40898a
mov ecx, dword [ebp - 0x1c]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x40898e
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call fcn.004121cc
add esp, 0xc
test eax, eax
jne 0x4089f0
mov bl, 1
xor esi, esi
inc esi
jmp 0x40891f
xor ebx, ebx
jmp 0x40891f
lea ecx, [eax + 1]
mov dword [ebp - 0x24], ecx
mov edi, eax
add edi, 2
lea eax, [eax + eax + 4]
mov ebx, 0xffffffff
cmovns ebx, eax
push ebx
call fcn.0040a20b
add esp, 4
push ebx
mov esi, dword [ebp - 0x1c]
push 0
mov ebx, eax
push eax
call fcn.0040c770
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.00408a00
add esp, 0x10
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x20]
call fcn.004121cc
add esp, 0xc
mov esi, eax
push ebx
call fcn.0040a497
add esp, 4
test esi, esi
je 0x408983
mov bl, 1
xor esi, esi
jmp 0x40891f