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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x5c2460]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [0x768ef8]
mov dword [ebp - 0x650], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x64c], edx
mov dword [ebp - 0x648], ecx
push edi
mov edi, dword [ebp + 0x10]
test esi, esi
jne 0x464302
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.005091d0
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.005091d0
push 0xffffffffffffffff
push str.ntdll.dll
lea eax, [ebp - 0x414]
push eax
push 0x540480
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.0040acc0
add esp, 0x24
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x4641cc
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x464252
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x464252
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x464252
push 0x110
lea eax, [ebp - 0x640]
push 0
push eax
call fcn.005091d0
add esp, 0xc
mov dword [ebp - 0x644], 0x114
lea eax, [ebp - 0x644]
push eax
call esi
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x464252
mov dword [0x768ef8], eax
mov eax, dword [ebp - 0x63c]
mov dword [0x768cec], eax
mov eax, dword [ebp - 0x638]
mov dword [0x768ce0], eax
mov eax, dword [ebp - 0x634]
mov dword [0x768ce8], eax
lea eax, [ebp - 0x630]
push 0xffffffffffffffff
push eax
push 0x104
push 0x768cf0
call fcn.00504153
add esp, 0x10
push 0x118
lea eax, [ebp - 0x52c]
push 0
push eax
call fcn.005091d0
add esp, 0xc
mov dword [ebp - 0x530], 0x11c
lea eax, [ebp - 0x530]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov esi, dword [0x768ef8]
test eax, eax
je 0x4642f6
test esi, esi
jne 0x4642ba
mov eax, dword [ebp - 0x528]
mov esi, dword [ebp - 0x52c]
mov dword [0x768cec], eax
mov eax, dword [ebp - 0x524]
mov dword [0x768ce0], eax
mov eax, dword [ebp - 0x520]
mov dword [0x768ef8], esi
mov dword [0x768ce8], eax
cmp byte [0x768ce4], 0
mov ecx, dword [ebp - 0x648]
mov edx, dword [ebp - 0x64c]
jne 0x464302
movzx eax, word [ebp - 0x41a]
mov word [0x768cd8], ax
movzx eax, word [ebp - 0x41c]
mov word [0x768efc], ax
mov al, byte [ebp - 0x416]
mov byte [0x768ce4], al
jmp 0x464302
mov ecx, dword [ebp - 0x648]
mov edx, dword [ebp - 0x64c]
mov eax, dword [ebp - 0x650]
test eax, eax
je 0x46430e
mov dword [eax], esi
test edx, edx
je 0x464319
mov eax, dword [0x768cec]
mov dword [edx], eax
test ecx, ecx
je 0x464324
mov eax, dword [0x768ce0]
mov dword [ecx], eax
test ebx, ebx
je 0x46432f
mov eax, dword [0x768ce8]
mov dword [ebx], eax
test edi, edi
je 0x46434b
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x46434b
push 0xffffffffffffffff
push 0x768cf0
push eax
push edi
call fcn.00504153
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00501d03
mov esp, ebp
pop ebp
ret