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

Disassembly:
push 0xffffffffffffffff
push 0x53b926
mov eax, dword fs:[0]
push eax
sub esp, 0x214
mov eax, dword [0x58c950]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push esi
push edi
mov eax, dword [0x58c950]
xor eax, esp
push eax
lea eax, [esp + 0x224]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00415862
mov eax, dword [esi + 0x20]
push 0
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.00419d92
mov edi, eax
test edi, edi
je 0x405d86
lea ecx, [esp + 0x10]
call fcn.00407b20
mov dword [esp + 0x22c], 0
push 0x65
call fcn.0041059b
test eax, eax
je 0x405d44
push 0x65
push eax
lea ecx, [esp + 0x18]
call fcn.00402940
mov ecx, dword [esp + 0x10]
cmp dword [ecx - 0xc], 0
je 0x405d72
mov edx, dword [edi + 4]
mov ebx, dword [sym.imp.USER32.dll_AppendMenuW]
push 0
push 0
push 0x800
push edx
call ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 4]
push eax
push 0x10
push 0
push ecx
call ebx
mov dword [esp + 0x22c], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.00402500
mov eax, dword [esi + 0x78]
mov edx, dword [esi + 0x20]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 1
push 0x80
push edx
call ebx
mov eax, dword [esi + 0x78]
push eax
mov eax, dword [esi + 0x20]
push 0
push 0x80
push eax
call ebx
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x22]
push edx
mov word [esp + 0x24], cx
call fcn.00513690
add esp, 0xc
push 0
push 0x2d
lea eax, [esp + 0x20]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x405dee
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x14]
call fcn.00402430
mov dword [esp + 0x22c], 1
lea edi, [esi + 0x80]
push eax
mov ecx, edi
call fcn.00407ef0
mov dword [esp + 0x22c], 0xffffffff
lea ecx, [esp + 0x10]
call fcn.00402500
push 8
push 0x5683c8
mov ecx, edi
call fcn.00408410
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405e4e
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [esi + 0xc4]
push 0x640000
push 0
push 0x401
push ecx
call ebx
mov edx, dword [esi + 0xc4]
push 0
push 0
push 0x402
push edx
call ebx
push 0
push 0x3f3
mov ecx, esi
mov dword [esi + 0x110], 0
call fcn.0042085a
mov ecx, eax
call fcn.00420a7d
push 0xe
push 0x5683dc
lea ecx, [esi + 0x114]
call fcn.00402d70
push 0
mov ecx, esi
call fcn.0041cc50
lea eax, [esp + 0x14]
push eax
push 0
push esi
push 0x407700
push 0
push 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x405eec
push eax
push eax
push 0x5683fc
mov ecx, esi
call fcn.0041c007
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
jmp 0x405f0e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x20]
push 0
push 0x1f4
push 0x76c
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, 1
mov ecx, dword [esp + 0x224]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0050e8a6
add esp, 0x220
ret