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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x572836
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x15ec
call fcn.004acfe0
mov eax, dword [0x5d7c7c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x15ec], edi
push 0x208
lea eax, [ebp - 0x31c]
mov dword [ebp - 0x15f8], edi
push 0
push eax
call fcn.00512920
add esp, 0xc
call fcn.00472010
push 0x104
lea edx, [ebp - 0x31c]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x4c]
push 0x586adc
lea eax, [ebp - 0x31c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x31c]
push eax
call fcn.004a6910
add esp, 4
test eax, eax
jne 0x4795bd
xor eax, eax
jmp 0x4799ca
lea eax, [ebp - 0x31c]
push eax
call fcn.00435dd0
mov ecx, eax
call fcn.00435e70
test eax, eax
je 0x4795b6
call fcn.00435dd0
mov ecx, eax
call fcn.00435bc0
push dword [ebp - 0x15f8]
lea ecx, [ebp - 0x15e8]
mov dword [ebp - 0x15e8], 0
push eax
mov dword [ebp - 0x15e4], 0
call fcn.004143f0
mov eax, dword [ebp - 0x15e8]
mov dword [edi + 4], eax
mov esi, dword [edi + 8]
mov eax, dword [ebp - 0x15e4]
mov dword [edi + 8], eax
or edi, 0xffffffff
test esi, esi
je 0x479641
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x479641
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x479641
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x15ec]
cmp dword [eax + 4], 0
je 0x4795b6
call fcn.0040cdc0
mov ecx, eax
test ecx, ecx
je 0x4799e6
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x15f4], eax
mov dword [ebp - 4], 0
push 0
mov byte [ebp - 4], 1
call fcn.00542eb1
mov dword [ebp - 0x15e8], eax
lea eax, [ebp - 0x15e8]
push eax
lea eax, [ebp - 0x1550]
mov dword [ebp - 0x15e4], edx
push eax
call fcn.00546c55
test eax, eax
mov ecx, edi
lea eax, [ebp - 0x15e8]
cmove ecx, dword [ebp - 0x154c]
push eax
lea eax, [ebp - 0x1574]
mov dword [ebp - 0x15f0], ecx
push eax
call fcn.00546c55
test eax, eax
lea eax, [ebp - 0x15e8]
push eax
cmove edi, dword [ebp - 0x156c]
lea eax, [ebp - 0x1598]
push eax
call fcn.00546c55
xor ecx, ecx
test eax, eax
lea eax, [ebp - 0x15e8]
cmove ecx, dword [ebp - 0x158c]
push eax
lea eax, [ebp - 0x15bc]
mov dword [ebp - 0x15fc], ecx
push eax
call fcn.00546c55
add esp, 0x24
test eax, eax
jne 0x479715
mov esi, dword [ebp - 0x15ac]
inc esi
jmp 0x479717
xor esi, esi
lea eax, [ebp - 0x15e8]
push eax
lea eax, [ebp - 0x15e0]
push eax
call fcn.00546c55
add esp, 8
test eax, eax
jne 0x47973e
mov eax, dword [ebp - 0x15cc]
add eax, 0x76c
jmp 0x479740
xor eax, eax
push dword [ebp - 0x15f0]
push edi
push dword [ebp - 0x15fc]
push esi
push eax
lea eax, [ebp - 0x15f4]
push 0x596bb8
push eax
call fcn.0040b130
add esp, 0x1c
jmp 0x479777
mov dword [ebp - 4], 0
call fcn.0040cdc0
mov ecx, eax
test ecx, ecx
je 0x4799f0
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x15f0], eax
mov edi, dword [ebp - 0x15f4]
lea eax, [ebp - 0x15f0]
push edi
push str.http:__ini.update.360safe.com_lds_update_patch.cab
push str._s_t_s
push eax
mov byte [ebp - 4], 3
call fcn.0040b130
push 0x800
lea eax, [ebp - 0x151c]
push 0
push eax
call fcn.00512920
push 0x800
lea eax, [ebp - 0xd1c]
push 0
push eax
call fcn.00512920
add esp, 0x28
lea eax, [ebp - 0x151c]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0xfe
lea eax, [ebp - 0x112]
push 0
push eax
call fcn.00512920
add esp, 0xc
xor esi, esi
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x114], ax
lea eax, [ebp - 0x152c]
push eax
movups xmmword [ebp - 0x152c], xmm0
call dword [sym.imp.ole32.dll_CoCreateGuid]
push 0x200
lea eax, [ebp - 0x51c]
push 0
push eax
call fcn.00512920
movzx eax, byte [ebp - 0x151d]
push eax
movzx eax, byte [ebp - 0x151e]
push eax
movzx eax, byte [ebp - 0x151f]
push eax
movzx eax, byte [ebp - 0x1520]
push eax
movzx eax, byte [ebp - 0x1521]
push eax
movzx eax, byte [ebp - 0x1522]
push eax
movzx eax, byte [ebp - 0x1523]
push eax
movzx eax, byte [ebp - 0x1524]
push eax
movzx eax, word [ebp - 0x1526]
push eax
movzx eax, word [ebp - 0x1528]
push eax
push dword [ebp - 0x152c]
lea eax, [ebp - 0x51c]
push str._08X__04X__04x__02X_02X__02X_02X_02X_02X_02X_02X
push eax
call fcn.0040f1d0
lea eax, [ebp - 0x51c]
add esp, 0x40
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4798b7
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x114]
push 0x80
push eax
call fcn.0053e40d
add esp, 0x10
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x151c]
push eax
lea eax, [ebp - 0xd1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push str..tmp
lea eax, [ebp - 0xd1c]
push 0x400
push eax
call fcn.0053e207
add esp, 0xc
lea eax, [ebp - 0xd1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x479939
inc esi
cmp esi, 0xa
jl 0x479811
mov esi, dword [ebp - 0x15ec]
jmp 0x479967
lea ecx, [ebp - 0xd1c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x479942
mov esi, dword [ebp - 0x15ec]
lea eax, [ebp - 0xd1c]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0xc]
call fcn.0040d900
mov ecx, dword [esi + 4]
push dword [esi + 0xc]
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, dword [esi + 4]
push esi
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [esi + 4]
mov esi, dword [ebp - 0x15f0]
push esi
push 0
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4799a9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x4799c5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004acb88
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040ae00
push 0x80004005
call fcn.0040ae00
int3