Function at 0x405d60
Capabilities:
Check if file exists
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418111
mov eax, dword fs:[0]
push eax
sub esp, 0xa54
mov eax, dword [0x420008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.ASUSGiftBox3
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 4
lea eax, [ebp - 0x218]
push eax
push ecx
call fcn.00405b50
add esp, 4
mov ecx, eax
call fcn.00407f60
call fcn.00405b50
push str.Create_GiftBox_Service_
push 1
mov dword [eax + 0x5c], 1
call fcn.00405b50
push eax
call fcn.004084d0
add esp, 0xc
push 0x41a198
push 2
call dword [sym.imp.api_ms_win_crt_locale_l1_1_0.dll_setlocale]
add esp, 8
mov dword [esi + 4], 0xd49a
xor eax, eax
mov dword [ebp - 0xa50], 0
lea ecx, [ebp - 0xa60]
mov dword [ebp - 0xa4c], 7
mov word [ebp - 0xa60], ax
push 7
push str.1.0.0.0
call fcn.00402320
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xa48]
push 7
xor eax, eax
mov dword [ebp - 0xa38], 0
push str.1.0.0.0
mov dword [ebp - 0xa34], 7
mov word [ebp - 0xa48], ax
call fcn.00402320
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa30]
push 7
xor eax, eax
mov dword [ebp - 0xa20], 0
push str.1.0.0.0
mov dword [ebp - 0xa1c], 7
mov word [ebp - 0xa30], ax
call fcn.00402320
lea eax, [ebp - 0xa60]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0xa48]
mov ecx, esi
push eax
lea eax, [ebp - 0xa30]
push eax
call fcn.0040b360
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0xa1c]
cmp edx, 8
jb 0x405f1e
mov ecx, dword [ebp - 0xa30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405f14
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405fd0
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov dword [ebp - 0xa20], 0
mov byte [ebp - 4], al
mov edx, dword [ebp - 0xa34]
mov dword [ebp - 0xa1c], 7
mov word [ebp - 0xa30], ax
cmp edx, 8
jb 0x405f7a
mov ecx, dword [ebp - 0xa48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405f70
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405fd0
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xa4c]
mov dword [ebp - 0xa38], 0
mov dword [ebp - 0xa34], 7
mov word [ebp - 0xa48], ax
cmp edx, 8
jb 0x405fe0
mov ecx, dword [ebp - 0xa60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405fd6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405fd6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00416baa
add esp, 8
xor eax, eax
mov dword [ebp - 0xa50], 0
push ecx
mov ecx, esi
mov dword [ebp - 0xa4c], 7
mov word [ebp - 0xa60], ax
call fcn.0040ac90
push dword [esi + 4]
push str.Start_Loopback_Listen__port:_d_r_n
call fcn.00404ad0
add esp, 8
lea eax, [ebp - 0xa18]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40605e
push str.giftboxupdate.tmp
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40605e
mov eax, dword [esi]
mov ecx, esi
push 0
push 0
push 6
call dword [eax + 8]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004168de
mov esp, ebp
pop ebp
ret