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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x477e1c
mov eax, dword fs:[0]
push eax
sub esp, 0x230
mov eax, dword [0x494db8]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
push esi
push edi
mov eax, dword [0x494db8]
xor eax, esp
push eax
lea eax, [esp + 0x240]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x90]
mov ecx, dword [eax]
mov ebx, dword [ebp + 0xc]
lea esi, [edi + 0x90]
push esi
mov dword [esp + 0x2c], esi
call ecx
mov edx, dword [edi + 0x88]
sub edx, dword [edi + 0x84]
lea eax, [edi + 0x78]
sar edx, 2
mov dword [esp + 0x14], eax
test edx, edx
ja 0x40d324
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
xor eax, eax
jmp 0x40d67b
mov edx, dword [0x496df8]
mov eax, dword [edx + 0xc]
mov ecx, 0x496df8
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x248], 0
cmp dword [edi + 0x10], 0
jne 0x40d3aa
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40d3b6
lea edx, [esp + 0x24]
push edx
push 0x15
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40d39c
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea edx, [esp + 0x2c]
lea edi, [esp + 0x18]
call fcn.004022d0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push ecx
push eax
call edx
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x40d3b6
lea eax, [edi + 4]
lea edi, [esp + 0x18]
call fcn.00401e10
mov eax, dword [0x496df8]
mov edx, dword [eax + 0xc]
mov ecx, 0x496df8
call edx
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x248], 1
test ebx, ebx
je 0x40d498
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d3e1
sub eax, edx
sar eax, 1
push ebx
mov ebx, eax
lea eax, [esp + 0x14]
call fcn.00402230
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.00401e70
lea edi, [eax + 0x10]
mov dword [esp + 0x1c], edi
mov ebx, 1
mov byte [esp + 0x248], 2
cmp dword [edi - 4], ebx
jle 0x40d433
mov eax, dword [edi - 0xc]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.00402100
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.0045ef7a
add esp, 8
test eax, eax
jl 0x40d5ba
cmp eax, dword [edi - 8]
jg 0x40d5ba
xor edx, edx
mov dword [edi - 0xc], eax
push edi
mov word [edi + eax*2], dx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d475
push eax
push edi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
add edi, 0xfffffff0
mov byte [esp + 0x248], bl
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d498
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea ebx, [esp + 0x10]
call fcn.0040db60
mov ebx, eax
call fcn.0040dbe0
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
jne 0x40d511
mov edx, dword [esp + 0x18]
cmp dword [edx - 0xc], 0
mov ebx, 0x48524c
je 0x40d4c6
mov ebx, str.360safe.setup.log
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0040d710
add esp, 8
lea edi, [esp + 0x10]
mov byte [esp + 0x248], 3
call fcn.00401e10
mov byte [esp + 0x248], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d511
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
push 0x4852bc
push ecx
call fcn.0045ddf3
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40d5db
push 2
push 0
push eax
call fcn.0045ee61
mov esi, dword [esp + 0x20]
mov ebx, dword [esi + 0xc]
add esp, 0xc
cmp ebx, dword [esi + 0x10]
jbe 0x40d54d
call fcn.0045c23a
mov edi, dword [esi]
nop
mov eax, dword [esi + 0x10]
mov dword [esp + 0x24], eax
cmp dword [esi + 0xc], eax
jbe 0x40d561
call fcn.0045c23a
mov eax, dword [esi]
test edi, edi
je 0x40d56b
cmp edi, eax
je 0x40d570
call fcn.0045c23a
cmp ebx, dword [esp + 0x24]
je 0x40d5cc
test edi, edi
jne 0x40d5c4
call fcn.0045c23a
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40d58b
call fcn.0045c23a
mov edx, dword [ebx]
mov eax, dword [esp + 0x1c]
push edx
push 0x4852c4
push eax
call fcn.0045eee6
add esp, 0xc
test edi, edi
jne 0x40d5c8
call fcn.0045c23a
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x40d5b5
call fcn.0045c23a
add ebx, 4
jmp 0x40d550
push 0x80070057
call fcn.00402210
mov eax, dword [edi]
jmp 0x40d581
mov eax, dword [edi]
jmp 0x40d5ab
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0045db98
add esp, 4
jmp 0x40d5df
mov esi, dword [esp + 0x14]
mov esi, dword [esi + 0x10]
mov edi, dword [esp + 0x14]
cmp dword [edi + 0xc], esi
jbe 0x40d5f0
call fcn.0045c23a
mov ebx, dword [edi]
mov edi, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
cmp edi, dword [ecx + 0x10]
jbe 0x40d607
call fcn.0045c23a
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
push esi
push ebx
push edi
push eax
push ecx
lea ebx, [esp + 0x30]
call fcn.00407dd0
mov eax, dword [esp + 0x28]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x248], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d64b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x248], 0xffffffff
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 0x40d676
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x240]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.0045bbec
mov esp, ebp
pop ebp
ret 8