Function at 0x40f150
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51fe57
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x5640a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edx, dword [0x56e770]
lea ecx, [ebp - 0xb8]
lea edx, [edx + 0x6c]
call fcn.00430df0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x70]
mov edx, dword [esi]
add edx, 0xaa0
call fcn.00430df0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x58]
push 6
xor eax, eax
mov dword [ebp - 0xd4], 0
push 0x53cbdc
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
call fcn.00402570
lea eax, [ebp - 0xd4]
mov byte [ebp - 4], 2
push eax
mov eax, dword [esi]
lea edx, [ebp - 0x58]
add eax, 0xc60
lea ecx, [ebp - 0x28]
push eax
call fcn.0041dd00
add esp, 8
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x40f215
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp dword [ebp - 0x18], eax
je 0x40f472
push 0x53ca10
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.0040cc50
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 5
push ecx
mov edx, eax
lea ecx, [ebp - 0x40]
call fcn.0040cdd0
push 0x53ca10
push eax
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 6
push eax
call fcn.00415000
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 7
push ecx
mov edx, eax
lea ecx, [ebp - 0x88]
call fcn.0040cdd0
add esp, 0x20
mov edi, eax
lea eax, [ebp - 0x28]
cmp eax, edi
je 0x40f2c5
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40f2a8
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x14], 7
push edi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004032f0
mov eax, dword [ebp - 0x74]
cmp eax, 8
jb 0x40f2e0
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x74], 7
mov word [ebp - 0x88], ax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x78], 0
cmp eax, 8
jb 0x40f315
inc eax
lea ecx, [ebp - 0xa0]
push eax
push dword [ebp - 0xa0]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x8c], 7
mov word [ebp - 0xa0], ax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x90], 0
cmp eax, 8
jb 0x40f347
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00402f10
xor eax, eax
mov byte [ebp - 4], 4
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
cmp eax, 8
jb 0x40f37d
inc eax
lea ecx, [ebp - 0xd0]
push eax
push dword [ebp - 0xd0]
call fcn.00402f10
mov ecx, dword [esi]
lea eax, [ebp - 0x28]
add ecx, 0xc60
cmp ecx, eax
je 0x40f396
push 0xffffffffffffffff
push 0
push eax
call fcn.00402670
mov eax, dword [esi]
add eax, 0xc60
cmp dword [eax + 0x14], 8
jb 0x40f3a5
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f3ca
mov eax, dword [esi]
add eax, 0xc60
cmp dword [eax + 0x14], 8
jb 0x40f3bf
mov eax, dword [eax]
push 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
mov ecx, dword [esi]
mov edx, dword [ecx + 0xa40]
test edx, edx
je 0x40f412
add ecx, 0xc60
cmp dword [ecx + 0x14], 8
jb 0x40f3e4
mov ecx, dword [ecx]
mov eax, dword [edx]
push 0
push 0
push ecx
mov ecx, edx
call dword [eax + 0x34]
mov ecx, dword [esi]
cmp dword [ecx + 0xc74], 8
lea edx, [ecx + 0xc60]
jb 0x40f403
mov edx, dword [edx]
mov ecx, dword [ecx + 0xa40]
push edx
mov eax, dword [ecx]
call dword [eax + 0xb8]
push str.installPath
lea ecx, [ebp - 0x40]
call fcn.00403170
cmp dword [0x564a48], 8
lea edx, [ebp - 0x28]
mov esi, 0x564a34
lea ecx, [ebp - 0x40]
cmovae esi, dword [0x564a34]
lea eax, [ebp - 0x70]
cmp dword [ebp - 0x14], 8
push esi
cmovae edx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 8
push edx
cmovae ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x5c], 8
push ecx
cmovae eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.DLL_WritePrivateProfileStringW]
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x40f472
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00402f10
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40f487
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x40f4b0
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.00402f10
xor eax, eax
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x60], 0
cmp eax, 8
jb 0x40f4e2
inc eax
lea ecx, [ebp - 0xb8]
push eax
push dword [ebp - 0xb8]
call fcn.00402f10
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.004e1bb1
mov esp, ebp
pop ebp
ret