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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x660
mov eax, dword [0x5afee0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5d92a8], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x660], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x65c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x650], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x648], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x658], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x64c], eax
mov eax, dword [ebp + 0x28]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x654], eax
jne 0x407297
push esi
push edi
xor eax, eax
mov esi, 0x206
push esi
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.00537010
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor eax, eax
push esi
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00537010
push 0xffffffffffffffff
push str.ntdll.dll
lea eax, [ebp - 0x414]
push eax
push 0x57c6a4
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.00407467
add esp, 0x24
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40717f
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407201
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x407201
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x407201
push 0x110
lea eax, [ebp - 0x640]
push 0
push eax
call fcn.00537010
add esp, 0xc
lea eax, [ebp - 0x644]
push eax
mov dword [ebp - 0x644], 0x114
call esi
mov eax, dword [ebp - 0x640]
test eax, eax
je 0x407201
mov dword [0x5d92a8], eax
mov eax, dword [ebp - 0x63c]
mov dword [0x5d92ac], eax
mov eax, dword [ebp - 0x638]
mov dword [0x5d92b0], eax
mov eax, dword [ebp - 0x634]
mov dword [0x5d92b4], eax
push 0xffffffffffffffff
lea eax, [ebp - 0x630]
push eax
push edi
push 0x5d92b8
call fcn.00531bbd
add esp, 0x10
push 0x118
lea eax, [ebp - 0x52c]
push 0
push eax
call fcn.00537010
add esp, 0xc
lea eax, [ebp - 0x530]
push eax
mov dword [ebp - 0x530], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
pop edi
pop esi
test eax, eax
je 0x407297
cmp dword [0x5d92a8], 0
jne 0x407269
mov eax, dword [ebp - 0x52c]
mov dword [0x5d92a8], eax
mov eax, dword [ebp - 0x528]
mov dword [0x5d92ac], eax
mov eax, dword [ebp - 0x524]
mov dword [0x5d92b0], eax
mov eax, dword [ebp - 0x520]
mov dword [0x5d92b4], eax
cmp byte [0x5d94c6], 0
jne 0x407297
mov ax, word [ebp - 0x41a]
mov word [0x5d94c4], ax
mov ax, word [ebp - 0x41c]
mov word [0x5d94c0], ax
mov al, byte [ebp - 0x416]
mov byte [0x5d94c6], al
test ebx, ebx
je 0x4072a2
mov eax, dword [0x5d92a8]
mov dword [ebx], eax
mov eax, dword [ebp - 0x660]
pop ebx
test eax, eax
je 0x4072b5
mov ecx, dword [0x5d92ac]
mov dword [eax], ecx
mov eax, dword [ebp - 0x65c]
test eax, eax
je 0x4072c7
mov ecx, dword [0x5d92b0]
mov dword [eax], ecx
mov eax, dword [ebp - 0x650]
test eax, eax
je 0x4072d9
mov ecx, dword [0x5d92b4]
mov dword [eax], ecx
cmp dword [ebp - 0x648], 0
je 0x407300
cmp dword [ebp + 0x1c], 0
je 0x407300
push 0xffffffffffffffff
push 0x5d92b8
push dword [ebp + 0x1c]
push dword [ebp - 0x648]
call fcn.00531bbd
add esp, 0x10
mov eax, dword [ebp - 0x658]
test eax, eax
je 0x407314
mov cx, word [0x5d94c0]
mov word [eax], cx
mov eax, dword [ebp - 0x64c]
test eax, eax
je 0x407328
mov cx, word [0x5d94c4]
mov word [eax], cx
mov eax, dword [ebp - 0x654]
test eax, eax
je 0x40733a
mov cl, byte [0x5d94c6]
mov byte [eax], cl
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052f7d0
leave
ret