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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x566576
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x15ec
call fcn.004a9970
mov eax, dword [0x5c9c4c]
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.00506bc0
add esp, 0xc
call fcn.0046e930
push 0x104
lea edx, [ebp - 0x31c]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x4c]
push 0x57aab4
lea eax, [ebp - 0x31c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x31c]
push eax
call fcn.004a32a0
add esp, 4
test eax, eax
jne 0x47429d
xor eax, eax
jmp 0x4746aa
lea eax, [ebp - 0x31c]
push eax
call fcn.00435760
mov ecx, eax
call fcn.00435800
test eax, eax
je 0x474296
call fcn.00435760
mov ecx, eax
call fcn.00435550
push dword [ebp - 0x15f8]
lea ecx, [ebp - 0x15e8]
mov dword [ebp - 0x15e8], 0
push eax
mov dword [ebp - 0x15e4], 0
call fcn.00414130
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 0x474321
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x474321
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, edi
lock xadd dword [esi + 8], eax
jne 0x474321
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x15ec]
cmp dword [eax + 4], 0
je 0x474296
call fcn.0040cd20
mov ecx, eax
test ecx, ecx
je 0x4746c6
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.00537141
mov dword [ebp - 0x15e8], eax
lea eax, [ebp - 0x15e8]
push eax
lea eax, [ebp - 0x1550]
mov dword [ebp - 0x15e4], edx
push eax
call fcn.00539c36
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.00539c36
test eax, eax
lea eax, [ebp - 0x15e8]
push eax
cmove edi, dword [ebp - 0x156c]
lea eax, [ebp - 0x1598]
push eax
call fcn.00539c36
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.00539c36
add esp, 0x24
test eax, eax
jne 0x4743f5
mov esi, dword [ebp - 0x15ac]
inc esi
jmp 0x4743f7
xor esi, esi
lea eax, [ebp - 0x15e8]
push eax
lea eax, [ebp - 0x15e0]
push eax
call fcn.00539c36
add esp, 8
test eax, eax
jne 0x47441e
mov eax, dword [ebp - 0x15cc]
add eax, 0x76c
jmp 0x474420
xor eax, eax
push dword [ebp - 0x15f0]
push edi
push dword [ebp - 0x15fc]
push esi
push eax
lea eax, [ebp - 0x15f4]
push 0x58a440
push eax
call fcn.0040b090
add esp, 0x1c
jmp 0x474457
mov dword [ebp - 4], 0
call fcn.0040cd20
mov ecx, eax
test ecx, ecx
je 0x4746d0
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.0040b090
push 0x800
lea eax, [ebp - 0x151c]
push 0
push eax
call fcn.00506bc0
push 0x800
lea eax, [ebp - 0xd1c]
push 0
push eax
call fcn.00506bc0
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.00506bc0
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.00506bc0
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.0040f130
lea eax, [ebp - 0x51c]
add esp, 0x40
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x474597
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x114]
push 0x80
push eax
call fcn.0053269d
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.00532497
add esp, 0xc
lea eax, [ebp - 0xd1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x474619
inc esi
cmp esi, 0xa
jl 0x4744f1
mov esi, dword [ebp - 0x15ec]
jmp 0x474647
lea ecx, [ebp - 0xd1c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x474622
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.0040d860
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 0x474689
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 0x4746a5
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.004a9518
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040ad60
push 0x80004005
call fcn.0040ad60
int3