Function at 0x408300
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f37f5
mov eax, dword fs:[0]
push eax
sub esp, 0x468
mov eax, dword [0x65b500]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x434], ecx
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 4], 1
cmp dword [eax - 0xc], 0
jne 0x40835f
push 6
push 0x603ee0
mov ecx, ebx
call fcn.00408d30
xor edi, edi
or ebx, 0xffffffff
jmp 0x4087b1
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], 0
jne 0x408380
push 6
push 0x603ef0
mov ecx, ebx
call fcn.00408d30
xor edi, edi
or ebx, 0xffffffff
jmp 0x4087b1
call fcn.00406890
mov ecx, eax
test ecx, ecx
je 0x40880e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
push dword [ebp + 8]
lea eax, [ebp - 0x42c]
mov byte [ebp - 4], 2
push str._s.url
push eax
call fcn.00407c80
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.005c5370
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.005c5370
add esp, 0x24
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push str.HaloDesktopData
push eax
call edi
push str.UserUrl
lea eax, [ebp - 0x218]
push eax
call edi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x408435
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
mov esi, dword [ebp - 0x42c]
lea eax, [ebp - 0x420]
push esi
push eax
call edi
push ecx
mov edi, esp
mov dword [ebp - 0x428], edi
call fcn.00406890
mov ecx, eax
test ecx, ecx
je 0x408818
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 3
test eax, 0xffff0000
jne 0x408499
movzx eax, ax
mov ecx, edi
push eax
call fcn.00406df0
jmp 0x4084c0
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4084a2
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00408d30
lea eax, [ebp - 0x430]
mov byte [ebp - 4], 2
push eax
call fcn.0043dbd0
add esp, 8
mov eax, dword [ebp - 0x430]
mov byte [ebp - 4], 4
cmp dword [eax - 0xc], 0
jne 0x4084f8
push 4
push 0x603f40
mov ecx, ebx
call fcn.00408d30
xor edi, edi
jmp 0x408772
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push ecx
mov edi, esp
mov dword [ebp - 0x428], esp
mov dword [ebp - 0x424], edi
call fcn.00406890
mov ecx, eax
test ecx, ecx
je 0x408822
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 5
test eax, 0xffff0000
jne 0x40854c
movzx eax, ax
mov ecx, edi
push eax
call fcn.00406df0
jmp 0x408573
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408555
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00408d30
push ecx
mov edi, esp
mov byte [ebp - 4], 6
mov dword [ebp - 0x424], edi
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.00407c20
add esp, 4
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 4
call fcn.0043d580
add esp, 8
test eax, eax
jne 0x4085b9
push 8
push 0x603f4c
mov ecx, ebx
call fcn.00408d30
xor edi, edi
jmp 0x408772
lea ecx, [ebp - 0x474]
call fcn.00432690
lea eax, [ebp - 0x474]
mov byte [ebp - 4], 7
push eax
push ecx
lea eax, [ebp - 0x218]
mov dword [ebp - 0x428], esp
mov ecx, esp
push eax
call fcn.00406060
mov ecx, dword [0x6652ac]
mov byte [ebp - 4], 8
test ecx, ecx
jne 0x40864e
push 0x65a008
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x6652ac], 0
jne 0x40863d
push 1
call fcn.004da3a2
add esp, 4
mov dword [ebp - 0x424], eax
mov byte [ebp - 4], 9
test eax, eax
je 0x408627
mov ecx, eax
call fcn.00432710
jmp 0x408629
xor eax, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x428]
xor edx, edx
lock or dword [ecx], edx
mov dword [0x6652ac], eax
push 0x65a008
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x6652ac]
mov byte [ebp - 4], 7
call fcn.00438450
test eax, eax
lea eax, [ebp - 0x218]
push eax
je 0x40867d
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 5
push 0x603f60
mov ecx, ebx
call fcn.00408d30
xor edi, edi
jmp 0x408767
lea ecx, [ebp - 0x424]
call fcn.00406060
push 1
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x454]
call fcn.00432480
lea ecx, [ebp - 0x424]
mov byte [ebp - 4], 0xc
call fcn.00406220
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x44c]
add edi, 0xfffffff0
lea edx, [eax - 0x10]
cmp edx, edi
je 0x408714
cmp dword [edi + 0xc], 0
jl 0x408705
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x408705
push edx
call fcn.00407c20
add esp, 4
mov dword [ebp - 0x428], eax
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4086fa
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x428]
add eax, 0x10
mov dword [ebp - 0x44c], eax
jmp 0x408714
push dword [eax - 0xc]
lea ecx, [ebp - 0x44c]
push eax
call fcn.00408d30
lea eax, [ebp - 0x454]
push eax
mov eax, dword [ebp - 0x434]
push 0
push 0x42f
push dword [eax + 0x314]
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jns 0x408757
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 4
push 0x603f40
mov ecx, ebx
call fcn.00408d30
xor edi, edi
jmp 0x40875c
mov edi, 1
lea ecx, [ebp - 0x454]
call fcn.00407b10
lea ecx, [ebp - 0x474]
call fcn.00407b10
mov edx, dword [ebp - 0x430]
or ebx, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x408796
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4087b1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4087cf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4087ee
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004da36e
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.004064e0
push 0x80004005
call fcn.004064e0
push 0x80004005
call fcn.004064e0
int3