Function at 0x408730
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 0x40890e
mov edi, eax
lea ebx, [eax + eax]
xor eax, eax
dec eax
test edi, edi
cmovs ebx, eax
push ebx
call fcn.00409f5e
add esp, 4
mov esi, eax
push ebx
push 0
push eax
call fcn.0040c4c0
add esp, 0xc
push edi
mov dword [ebp - 0x20], esi
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
xor ebx, ebx
test eax, eax
je 0x408903
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 0x408821
mov ebx, dword [ebp - 0x14]
push ebx
call fcn.0040a09e
add esp, 4
test eax, eax
je 0x408816
mov edi, eax
cmp word [ebx + eax*2 - 2], 0x5c
jne 0x408828
push edi
push ebx
push dword [ebp - 0x20]
call fcn.00411f1c
add esp, 0xc
test eax, eax
je 0x40888c
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 0x42c114
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x408897
xor eax, eax
jmp 0x4088fc
test ebx, ebx
je 0x408821
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
xor ebx, ebx
jmp 0x408903
lea eax, [edi + 1]
mov dword [ebp - 0x1c], eax
lea esi, [edi*2 + 4]
add edi, 2
mov eax, 0xffffffff
cmovs esi, eax
push esi
call fcn.00409f5e
add esp, 4
push esi
push 0
mov esi, eax
push eax
call fcn.0040c4c0
sub esp, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call fcn.004089e0
add esp, 0x10
push dword [ebp - 0x1c]
push esi
push dword [ebp - 0x20]
call fcn.00411f1c
add esp, 0xc
mov edi, eax
push esi
call fcn.0040a1ea
add esp, 4
test edi, edi
jne 0x4087d9
push ebx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov bl, 1
jmp 0x408903
mov ecx, dword [ebp - 0x18]
xor eax, eax
cmp ecx, 4
jb 0x4088fc
mov dword [ebp - 0x24], ecx
mov esi, ecx
and esi, 0xfffffffe
push esi
call fcn.00409f5e
add esp, 4
mov edi, eax
push esi
xor esi, esi
push esi
push eax
call fcn.0040c4c0
add esp, 0xc
push ebx
mov ebx, edi
push edi
mov dword [ebp - 0x1c], 0
push esi
push 0x10002
push 0x42c114
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
xor esi, esi
inc esi
test eax, eax
je 0x408922
mov edi, ebx
push edi
call fcn.0040a1ea
add esp, 4
mov eax, dword [ebp - 0x1c]
test esi, esi
setne bl
and bl, al
push dword [ebp - 0x20]
call fcn.0040a1ea
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040ac85
mov eax, ebx
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x24]
shr eax, 1
push eax
push ebx
call fcn.00413c07
add esp, 8
test eax, eax
mov edi, ebx
je 0x40895a
cmp word [edi + eax*2 - 2], 0x5c
jne 0x408963
push eax
push edi
push dword [ebp - 0x20]
call fcn.00411f1c
add esp, 0xc
test eax, eax
jne 0x4089cd
mov al, 1
mov dword [ebp - 0x1c], eax
xor esi, esi
inc esi
jmp 0x4088f0
mov dword [ebp - 0x1c], 0
jmp 0x4088f0
lea ecx, [eax + 1]
mov dword [ebp - 0x1c], ecx
mov esi, eax
lea eax, [eax*2 + 4]
add esi, 2
mov ecx, 0xffffffff
mov dword [ebp - 0x24], edi
mov edi, ecx
cmovns edi, eax
push edi
call fcn.00409f5e
add esp, 4
mov ebx, eax
push edi
mov edi, dword [ebp - 0x24]
push 0
push eax
call fcn.0040c4c0
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.004089e0
add esp, 0x10
push dword [ebp - 0x1c]
push ebx
push dword [ebp - 0x20]
call fcn.00411f1c
add esp, 0xc
mov esi, eax
push ebx
call fcn.0040a1ea
add esp, 4
test esi, esi
je 0x408950
mov al, 1
mov dword [ebp - 0x1c], eax
xor esi, esi
jmp 0x4088f0