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

Disassembly:
mov eax, 0x610781
call fcn.0060b6e8
sub esp, 0x238
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
mov esi, edx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x3c], edi
call fcn.00404f47
push eax
lea ecx, [ebp - 0x18]
call fcn.004065d8
mov dword [ebp - 4], edi
call fcn.00404f47
push eax
lea ecx, [ebp - 0x34]
call fcn.004065d8
push 0x208
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 1
push edi
push eax
call fcn.005e1180
add esp, 0xc
call fcn.00404f47
push eax
lea ecx, [ebp - 0x30]
call fcn.004065d8
mov byte [ebp - 4], 2
call fcn.00404f47
push eax
lea ecx, [ebp - 0x20]
call fcn.004065d8
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
push 0x692da4
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.00406173
push 0x103
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 5
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x470441
lea eax, [ebp - 0x244]
push eax
call fcn.005efad8
pop ecx
cmp eax, 8
jb 0x470441
push 0x3a
pop eax
cmp ax, word [ebp - 0x242]
jne 0x470441
push 0x5c
pop eax
cmp ax, word [ebp - 0x240]
jne 0x470441
push 3
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x20]
call fcn.004061d4
lea ecx, [ebp - 0x2c]
call fcn.0046e09e
test eax, eax
jne 0x470367
push 0x69b948
lea ecx, [ebp - 0x14]
call fcn.00406173
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x2c]
call fcn.0046ae70
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
push 0x69b950
lea ecx, [ebp - 0x14]
call fcn.00406173
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x2c]
call fcn.0046ae70
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
push 0x69b958
lea ecx, [ebp - 0x14]
call fcn.00406173
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x2c]
call fcn.0046ae70
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
push 0x69b960
lea ecx, [ebp - 0x14]
call fcn.00406173
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x2c]
call fcn.0046ae70
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x28]
sete al
test al, al
jne 0x470441
push esi
lea edx, [ebp - 0x2c]
lea ecx, [ebp - 0x20]
call fcn.00470593
pop ecx
test eax, eax
je 0x470441
mov esi, dword [ebp - 0x2c]
jmp 0x4703e8
push esi
lea ecx, [ebp - 0x1c]
call fcn.00406123
push 2
lea ecx, [ebp - 0x1c]
call fcn.0040682a
push 2
lea ecx, [ebp - 0x1c]
mov edi, eax
call fcn.00406601
push edi
lea ecx, [ebp - 0x14]
call fcn.00406173
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xa
call fcn.0046e175
mov byte [ebp - 4], 5
mov edi, eax
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.00404ea9
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.00408f1c
test edi, edi
jne 0x470435
add esi, 4
cmp esi, dword [ebp - 0x28]
jne 0x470392
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
call fcn.00406123
lea ecx, [ebp - 0x18]
call fcn.00405fc4
lea ecx, [ebp - 0x18]
call fcn.0046e2f9
push str.kinsttemp
lea ecx, [ebp - 0x18]
call fcn.004062d3
lea ecx, [ebp - 0x18]
call fcn.0046e2f9
mov esi, dword [ebp - 0x18]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x470444
mov ecx, esi
call fcn.0046e398
jmp 0x470444
push dword [esi]
lea ecx, [ebp - 0x18]
call fcn.004060f8
jmp 0x4703f9
mov esi, dword [ebp - 0x18]
add esi, 0xfffffff0
push esi
call fcn.004067cf
pop ecx
mov ecx, dword [ebp - 0x1c]
add eax, 0x10
mov dword [ebx], eax
lea ecx, [ecx - 0x10]
call fcn.00404ea9
lea ecx, [ebp - 0x2c]
call fcn.0042a94f
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx - 0x10]
call fcn.00404ea9
mov ecx, esi
call fcn.00404ea9
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret