Function at 0x40c4e0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4866cc
mov eax, dword fs:[0]
push eax
sub esp, 0x828
mov eax, dword [0x4a60f8]
xor eax, esp
mov dword [esp + 0x820], eax
push ebx
push esi
push edi
mov eax, dword [0x4a60f8]
xor eax, esp
push eax
lea eax, [esp + 0x838]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x90]
mov eax, dword [ebp + 0xc]
mov edx, dword [ecx]
lea ebx, [edi + 0x90]
push ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], ebx
call edx
mov eax, dword [edi + 0x88]
sub eax, dword [edi + 0x84]
lea esi, [edi + 0x78]
sar eax, 2
mov dword [esp + 0x20], esi
test eax, eax
ja 0x40c568
mov ecx, dword [ebx]
mov edx, dword [ecx + 4]
push ebx
call edx
xor eax, eax
jmp 0x40c877
mov eax, dword [0x4a7e58]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a7e58
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x840], 0
cmp dword [edi + 0x10], 0
jne 0x40c5e1
push 0x800
lea eax, [esp + 0x30]
push 0
push eax
call fcn.00461950
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x2c]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c5c0
sub eax, edx
sar eax, 1
lea edx, [esp + 0x2c]
mov ebx, eax
push edx
lea eax, [esp + 0x20]
call fcn.00402250
jmp 0x40c5ed
lea eax, [edi + 4]
lea edi, [esp + 0x1c]
call fcn.00401e30
mov eax, dword [0x4a7e58]
mov edx, dword [eax + 0xc]
mov ecx, 0x4a7e58
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov ebx, 1
mov byte [esp + 0x840], bl
mov edx, dword [esp + 0x14]
test edx, edx
je 0x40c6ab
cmp word [edx], 0
je 0x40c6ab
lea edi, [esp + 0x18]
call fcn.004022f0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.00401e90
lea edi, [eax + 0x10]
mov dword [esp + 0x14], edi
mov byte [esp + 0x840], 2
cmp dword [edi - 4], ebx
jle 0x40c660
mov eax, dword [edi - 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00402120
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea esi, [esp + 0x14]
call fcn.0040cb10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c684
push eax
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
add edi, 0xfffffff0
mov byte [esp + 0x840], bl
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40c6a7
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov esi, dword [esp + 0x20]
lea ebx, [esp + 0x18]
call fcn.0040ebc0
mov ebx, eax
call fcn.0040ec40
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
jne 0x40c724
mov edx, dword [esp + 0x1c]
cmp dword [edx - 0xc], 0
mov ebx, 0x495424
je 0x40c6d9
mov ebx, str.360desktop.setup.log
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.0040c9b0
add esp, 8
lea edi, [esp + 0x18]
mov byte [esp + 0x840], 3
call fcn.00401e30
mov byte [esp + 0x840], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c724
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push 0x4954b4
push ecx
call fcn.004651dc
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x40c7df
push 2
push 0
push eax
call fcn.004663c9
mov ebx, dword [esi + 0xc]
add esp, 0xc
cmp ebx, dword [esi + 0x10]
jbe 0x40c75c
call fcn.00461ea8
mov edi, dword [esi]
mov edi, edi
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], eax
cmp dword [esi + 0xc], eax
jbe 0x40c771
call fcn.00461ea8
mov eax, dword [esi]
test edi, edi
je 0x40c77b
cmp edi, eax
je 0x40c780
call fcn.00461ea8
cmp ebx, dword [esp + 0x14]
je 0x40c7d2
test edi, edi
jne 0x40c7ca
call fcn.00461ea8
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40c79b
call fcn.00461ea8
mov edx, dword [ebx]
mov eax, dword [esp + 0x20]
push edx
push 0x4954bc
push eax
call fcn.0046644e
add esp, 0xc
test edi, edi
jne 0x40c7ce
call fcn.00461ea8
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40c7c5
call fcn.00461ea8
add ebx, 4
jmp 0x40c760
mov eax, dword [edi]
jmp 0x40c791
mov eax, dword [edi]
jmp 0x40c7bb
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004646e3
add esp, 4
mov eax, dword [esi + 0x10]
mov dword [esp + 0x20], eax
cmp dword [esi + 0xc], eax
jbe 0x40c7f0
call fcn.00461ea8
mov edi, dword [esi + 0xc]
mov ebx, dword [esi]
cmp edi, dword [esi + 0x10]
jbe 0x40c7ff
call fcn.00461ea8
mov edx, dword [esp + 0x20]
mov eax, dword [esi]
push edx
push ebx
push edi
push eax
push esi
lea ebx, [esp + 0x34]
call fcn.0040d270
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov byte [esp + 0x840], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c847
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x840], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c872
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x838]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x820]
xor ecx, esp
call fcn.00461932
mov esp, ebp
pop ebp
ret 8