Function at 0x40b663
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xab0
mov eax, dword [0x43e030]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
xor eax, eax
mov esi, ecx
mov dword [ebp - 0xab0], eax
cmp dword [esi + 0x27c], eax
je 0x40b90e
push ebx
push edi
mov edi, 0x206
push edi
push eax
lea eax, [ebp - 0xaaa]
xor ecx, ecx
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], cx
call fcn.00421bc0
add esp, 0xc
cmp dword [esi + 0x280], 8
jb 0x40b6bf
mov eax, dword [esi + 0x26c]
jmp 0x40b6c5
lea eax, [esi + 0x26c]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathCombineW]
push 0x437474
push eax
lea eax, [ebp - 0xaac]
push eax
call ebx
xor eax, eax
push edi
push eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x8a2]
push eax
call fcn.00421bc0
add esp, 0xc
cmp dword [esi + 0x280], 8
jb 0x40b705
mov esi, dword [esi + 0x26c]
jmp 0x40b70b
add esi, 0x26c
push 0x4374ac
push esi
lea eax, [ebp - 0x8a4]
push eax
call ebx
lea eax, [ebp - 0xaac]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b906
xor eax, eax
push 0x7e
push eax
mov word [ebp - 0x84], ax
lea eax, [ebp - 0x82]
push eax
call fcn.00421bc0
push HeapFree
lea edi, [ebp - 0x84]
lea esi, [ebp - 0xaac]
call fcn.0040dfbe
add esp, 0x10
test eax, eax
je 0x40b906
xor esi, esi
cmp word [ebp - 0x84], si
je 0x40b906
xor eax, eax
mov edi, 0x206
push edi
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x28a]
push esi
push eax
call fcn.00421bc0
xor eax, eax
push edi
mov word [ebp - reloc.USER32.dll_SetForegroundWindow], ax
lea eax, [ebp - 0x492]
push esi
push eax
call fcn.00421bc0
add esp, 0x18
call fcn.0040de57
cmp eax, 8
push edi
push esi
jge 0x40b7e1
xor eax, eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x69a]
push eax
call fcn.00421bc0
add esp, 0xc
push esi
push 0x1a
lea eax, [ebp - 0x69c]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
jmp 0x40b804
xor eax, eax
mov word [ebp - reloc.ADVAPI32.dll_RegCloseKey], ax
lea eax, [ebp - 0x69a]
push eax
call fcn.00421bc0
add esp, 0xc
lea edi, [ebp - 0x69c]
call fcn.004107f4
test eax, eax
je 0x40b891
mov esi, 0x4374ec
push esi
lea eax, [ebp - 0x69c]
push eax
lea eax, [ebp - 0x28c]
push eax
call ebx
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x28c]
push eax
call edi
push 0x437504
lea eax, [ebp - 0x28c]
push eax
call edi
call fcn.00410d73
test eax, eax
je 0x40b88f
lea eax, [ebp - 0x8a4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b88f
push esi
lea eax, [ebp - 0x69c]
push eax
lea eax, reloc.USER32.dll_SetForegroundWindow
push eax
call ebx
lea eax, [ebp - 0x84]
push eax
lea eax, reloc.USER32.dll_SetForegroundWindow
push eax
call edi
push 0x437528
lea eax, reloc.USER32.dll_SetForegroundWindow
push eax
call edi
xor esi, esi
cmp word [ebp - reloc.USER32.dll_SetForegroundWindow], si
je 0x40b8c0
lea eax, reloc.USER32.dll_SetForegroundWindow
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40b8c0
lea eax, [ebp - 0x8a4]
push esi
push eax
lea ecx, reloc.USER32.dll_SetForegroundWindow
call fcn.0040e5e1
pop ecx
pop ecx
cmp word [ebp - reloc.ADVAPI32.dll_RegCloseKey], si
je 0x40b906
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40b8f3
lea eax, [ebp - 0xaac]
push esi
push eax
lea ecx, [ebp - 0x28c]
call fcn.0040e5e1
pop ecx
pop ecx
test eax, eax
je 0x40b906
lea eax, [ebp - 0x28c]
push eax
call fcn.00410db0
pop ecx
mov dword [ebp - 0xab0], eax
mov eax, dword [ebp - 0xab0]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0041f23c
leave
ret