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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51c1ab
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x54735c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
lea esi, [edi + 0x90]
mov dword [ebp - 0x24c], eax
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x254], eax
je 0x40fa43
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40fa34
mov eax, dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40fdca
cmp byte [edi + 0x108], 0
je 0x40fc69
cmp dword [edi + 0x100], 0
je 0x40fc69
call fcn.0041be00
mov edx, dword [esi + 0x14]
cmp eax, 1
mov ecx, dword [esi + 0x10]
mov eax, edx
je 0x40fb6e
sub eax, ecx
cmp eax, 9
jb 0x40fac4
mov dword [ebp - 0x250], esi
lea eax, [ecx + 9]
mov dword [ebp - 0x24c], eax
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 8
jb 0x40fa9b
mov eax, dword [esi]
mov dword [ebp - 0x250], eax
push 0x12
lea eax, [eax + ecx*2]
push str.C:Users_
push eax
call fcn.004f4a40
mov eax, dword [ebp - 0x250]
add esp, 0xc
mov ecx, dword [ebp - 0x24c]
xor edx, edx
mov word [eax + ecx*2], dx
mov eax, esi
jmp 0x40fae1
push 9
push str.C:Users_
mov byte [ebp - 0x24c], 0
mov ecx, esi
push dword [ebp - 0x24c]
push 9
call fcn.00408630
cmp dword [edi + 0x104], 8
lea ecx, [edi + 0xf0]
jb 0x40faf6
mov ecx, dword [edi + 0xf0]
push dword [edi + 0x100]
push ecx
mov ecx, eax
call fcn.00407f10
mov edi, eax
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
sub ecx, edx
mov dword [ebp - 0x24c], edx
cmp ecx, 0x13
jb 0x40fb4c
cmp dword [edi + 0x14], 8
lea eax, [edx + 0x13]
mov dword [edi + 0x10], eax
jb 0x40fb27
mov edi, dword [edi]
push 0x26
lea eax, [edi + edx*2]
push str.AppDataLocalTemp
push eax
call fcn.004f4a40
mov eax, dword [ebp - 0x24c]
add esp, 0xc
xor ecx, ecx
mov word [edi + eax*2 + 0x26], cx
jmp 0x40fdca
push 0x13
push str.AppDataLocalTemp
mov byte [ebp - 0x24c], 0
mov ecx, edi
push dword [ebp - 0x24c]
push 0x13
call fcn.00408630
jmp 0x40fdca
sub eax, ecx
cmp eax, 0x1a
jb 0x40fbbf
mov dword [ebp - 0x250], esi
lea eax, [ecx + 0x1a]
mov dword [ebp - 0x24c], eax
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 8
jb 0x40fb96
mov eax, dword [esi]
mov dword [ebp - 0x250], eax
push 0x34
lea eax, [eax + ecx*2]
push str.C:Documents_and_Settings_
push eax
call fcn.004f4a40
mov eax, dword [ebp - 0x250]
add esp, 0xc
mov ecx, dword [ebp - 0x24c]
xor edx, edx
mov word [eax + ecx*2], dx
mov eax, esi
jmp 0x40fbdc
push 0x1a
push str.C:Documents_and_Settings_
mov byte [ebp - 0x24c], 0
mov ecx, esi
push dword [ebp - 0x24c]
push 0x1a
call fcn.00408630
cmp dword [edi + 0x104], 8
lea ecx, [edi + 0xf0]
jb 0x40fbf1
mov ecx, dword [edi + 0xf0]
push dword [edi + 0x100]
push ecx
mov ecx, eax
call fcn.00407f10
mov edi, eax
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
sub ecx, edx
mov dword [ebp - 0x24c], edx
cmp ecx, 0x14
jb 0x40fc47
cmp dword [edi + 0x14], 8
lea eax, [edx + 0x14]
mov dword [edi + 0x10], eax
jb 0x40fc22
mov edi, dword [edi]
push 0x28
lea eax, [edi + edx*2]
push str.Local_SettingsTemp
push eax
call fcn.004f4a40
mov eax, dword [ebp - 0x24c]
add esp, 0xc
xor ecx, ecx
mov word [edi + eax*2 + 0x28], cx
jmp 0x40fdca
push 0x14
push str.Local_SettingsTemp
mov byte [ebp - 0x24c], 0
mov ecx, edi
push dword [ebp - 0x24c]
push 0x14
call fcn.00408630
jmp 0x40fdca
push ecx
lea eax, [ebp - 0x248]
push eax
call fcn.0040fe10
mov edx, eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x230]
call fcn.0040a000
mov dword [ebp - 0x24c], eax
cmp esi, eax
je 0x40fcc4
mov ecx, esi
call fcn.00403ca0
mov eax, dword [ebp - 0x24c]
xor ecx, ecx
movups xmm0, xmmword [eax]
movups xmmword [esi], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [esi + 0x10], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x40fd04
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40fcfa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fdf9
push edx
push ecx
call fcn.004f2ead
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x234]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
cmp edx, 0x10
jb 0x40fd62
mov ecx, dword [ebp - 0x248]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40fd58
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40fdfe
push edx
push ecx
call fcn.004f2ead
add esp, 8
cmp dword [edi + 0xa0], 0
jne 0x40fdca
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004f53d0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40fdca
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fda0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.00403ab0
mov edx, 0x5c
mov ecx, esi
call fcn.0040a200
mov ecx, dword [ebp - 0x254]
push esi
call fcn.004031b0
mov eax, dword [ebp - 0x254]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f313b
mov esp, ebp
pop ebp
ret 4
call fcn.004f855c
call fcn.004f855c
int3