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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x649ffc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [0x64f12c]
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x650], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x654], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x658], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x64c], edx
mov dword [ebp - 0x65c], eax
push ebx
mov ebx, dword [ebp + 0x24]
push esi
mov esi, dword [ebp + 0x20]
mov dword [ebp - 0x648], esi
push edi
mov edi, dword [ebp + 0x28]
test ecx, ecx
jne 0x49da0c
push 0x208
push ecx
lea eax, [ebp - 0x414]
push eax
call fcn.00586790
add esp, 0xc
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00586790
push 0xffffffffffffffff
push str.ntdll.dll
lea eax, [ebp - 0x414]
push eax
push str._s_s
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.00411770
add esp, 0x24
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x49d8dc
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x49d968
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x49d968
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x49d962
push 0x110
lea eax, [ebp - 0x640]
push 0
push eax
call fcn.00586790
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 0x49d962
mov dword [0x64f12c], eax
mov eax, dword [ebp - 0x63c]
mov dword [0x64f130], eax
mov eax, dword [ebp - 0x638]
mov dword [0x64f134], eax
mov eax, dword [ebp - 0x634]
mov dword [0x64f138], eax
lea eax, [ebp - 0x630]
push 0xffffffffffffffff
push eax
push 0x104
push 0x64f140
call fcn.00598bb6
add esp, 0x10
mov esi, dword [ebp - 0x648]
push 0x118
lea eax, [ebp - 0x52c]
push 0
push eax
call fcn.00586790
add esp, 0xc
mov dword [ebp - 0x530], 0x11c
lea eax, [ebp - 0x530]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov ecx, dword [0x64f12c]
test eax, eax
je 0x49da06
test ecx, ecx
jne 0x49d9d0
mov eax, dword [ebp - 0x528]
mov ecx, dword [ebp - 0x52c]
mov dword [0x64f130], eax
mov eax, dword [ebp - 0x524]
mov dword [0x64f134], eax
mov eax, dword [ebp - 0x520]
mov dword [0x64f12c], ecx
mov dword [0x64f138], eax
cmp byte [0x64f34e], 0
mov edx, dword [ebp - 0x64c]
jne 0x49da0c
movzx eax, word [ebp - 0x41a]
mov word [0x64f34c], ax
movzx eax, word [ebp - 0x41c]
mov word [0x64f348], ax
mov al, byte [ebp - 0x416]
mov byte [0x64f34e], al
jmp 0x49da0c
mov edx, dword [ebp - 0x64c]
mov eax, dword [ebp - 0x650]
test eax, eax
je 0x49da18
mov dword [eax], ecx
mov ecx, dword [ebp - 0x654]
test ecx, ecx
je 0x49da29
mov eax, dword [0x64f130]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x658]
test ecx, ecx
je 0x49da3a
mov eax, dword [0x64f134]
mov dword [ecx], eax
test edx, edx
je 0x49da45
mov eax, dword [0x64f138]
mov dword [edx], eax
mov ecx, dword [ebp - 0x65c]
test ecx, ecx
je 0x49da67
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x49da67
push 0xffffffffffffffff
push 0x64f140
push eax
push ecx
call fcn.00598bb6
add esp, 0x10
test esi, esi
je 0x49da74
mov ax, word [0x64f348]
mov word [esi], ax
test ebx, ebx
je 0x49da81
mov ax, word [0x64f34c]
mov word [ebx], ax
test edi, edi
je 0x49da8c
mov al, byte [0x64f34e]
mov byte [edi], al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0056e987
mov esp, ebp
pop ebp
ret