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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x44465c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x650], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x658], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x654], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
push edi
mov dword [ebp - 0x648], eax
mov edi, 0x104
cmp dword [0x4afc54], ebx
jne 0x4137b4
push esi
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push ebx
push eax
call fcn.00427d80
add esp, 0xc
push edi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
push esi
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call fcn.00427d80
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.00407223
add esp, 0x24
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp eax, ebx
jne 0x413673
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4136f4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
je 0x4136f4
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x4136f4
push 0x110
lea eax, [ebp - 0x640]
push ebx
push eax
call fcn.00427d80
add esp, 0xc
lea eax, [ebp - 0x644]
push eax
mov dword [ebp - 0x644], 0x114
call esi
mov eax, dword [ebp - 0x640]
cmp eax, ebx
je 0x4136f4
mov dword [0x4afc54], eax
mov eax, dword [ebp - 0x63c]
mov dword [0x4afc58], eax
mov eax, dword [ebp - 0x638]
mov dword [0x4afc5c], eax
mov eax, dword [ebp - 0x634]
mov dword [0x4afc60], eax
push 0xffffffffffffffff
lea eax, [ebp - 0x630]
push eax
push edi
push 0x4afc68
call fcn.004242f6
add esp, 0x10
push 0x118
lea eax, [ebp - 0x52c]
push ebx
push eax
call fcn.00427d80
add esp, 0xc
lea eax, [ebp - 0x530]
push eax
mov dword [ebp - 0x530], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
pop esi
test eax, eax
je 0x4137b4
cmp dword [0x4afc54], ebx
jne 0x41373c
mov eax, dword [ebp - 0x52c]
mov dword [0x4afc54], eax
cmp dword [0x4afc58], ebx
jne 0x41374f
mov eax, dword [ebp - 0x528]
mov dword [0x4afc58], eax
cmp dword [0x4afc5c], ebx
jne 0x413762
mov eax, dword [ebp - 0x524]
mov dword [0x4afc5c], eax
cmp dword [0x4afc60], ebx
jne 0x413775
mov eax, dword [ebp - 0x520]
mov dword [0x4afc60], eax
cmp word [0x4afe70], bx
jne 0x41378b
mov ax, word [ebp - 0x41c]
mov word [0x4afe70], ax
cmp word [0x4afe74], bx
jne 0x4137a1
mov ax, word [ebp - 0x41a]
mov word [0x4afe74], ax
cmp byte [0x4afe76], bl
jne 0x4137b4
mov al, byte [ebp - 0x416]
mov byte [0x4afe76], al
mov eax, dword [ebp - 0x650]
cmp eax, ebx
je 0x4137c6
mov ecx, dword [0x4afc54]
mov dword [eax], ecx
mov eax, dword [ebp - 0x658]
cmp eax, ebx
je 0x4137d8
mov ecx, dword [0x4afc58]
mov dword [eax], ecx
mov eax, dword [ebp - 0x654]
cmp eax, ebx
je 0x4137ea
mov ecx, dword [0x4afc5c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x64c]
cmp eax, ebx
je 0x4137fc
mov ecx, dword [0x4afc60]
mov dword [eax], ecx
cmp dword [ebp - 0x648], ebx
je 0x41381a
push 0xffffffffffffffff
push 0x4afc68
push edi
push dword [ebp - 0x648]
call fcn.004242f6
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0042396b
leave
ret