Function at 0x500390
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a5aab
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x60f520]
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 eax, dword [0x6434b4]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x34], esi
test eax, eax
jne 0x5003fc
push 0x2c
call fcn.00551c81
add esp, 4
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x5003ee
mov ecx, eax
call fcn.004947d0
jmp 0x5003f0
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x6434b4], eax
push ebx
push str.ExtractUpdatePackage__s_
push str.Update
push eax
call fcn.00494d30
mov ecx, ebx
add esp, 0x10
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x500415
sub ecx, edx
sar ecx, 1
je 0x50077e
cmp dword [esi], 0
je 0x50077e
push ebx
mov dword [ebp - 0x1c], 0
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040c2d0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffc
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004120e0
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.0040b7d0
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov edx, dword [ebp - 0x2c]
mov eax, edi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x500497
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
call fcn.004fb810
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x20]
push ecx
mov ecx, ebx
mov dword [ebp - 0x2c], 0
call fcn.00522f80
add esp, 4
test eax, eax
je 0x500720
mov ecx, dword [esi]
test ecx, ecx
je 0x5006fe
push 1
lea eax, [ebp - 0x20]
push eax
call fcn.004ffc40
test eax, eax
je 0x5006fe
xor edx, edx
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x24]
call fcn.004fac50
mov byte [ebp - 4], 4
xor ebx, ebx
mov ecx, dword [esi]
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
sar eax, 4
test eax, eax
je 0x5006b1
xor esi, esi
mov dword [ebp - 0x2c], esi
jmp 0x500520
mov dword [ebp - 0x14], 0
lea edx, [ebp - 0x20]
mov eax, dword [ecx + 4]
lea ecx, [ebp - 0x14]
add eax, 4
add eax, esi
push eax
call fcn.00513e30
add esp, 4
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x24]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
mov eax, dword [eax]
mov eax, dword [eax + 4]
add eax, 4
add eax, esi
push eax
call fcn.00513e30
add esp, 4
mov eax, dword [ebp - 0x34]
mov byte [ebp - 4], 6
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [eax + esi + 8]
sub ecx, 0x10
call fcn.0040c3c0
lea esi, [eax + 0x10]
mov dword [ebp - 0x28], esi
lea edx, [ebp - 0x18]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x38]
call fcn.005228c0
mov byte [ebp - 4], 8
mov ecx, dword [eax]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x5006bc
push ecx
push esi
call fcn.00551d79
add esp, 8
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x38]
test eax, eax
mov ecx, edi
sete byte [ebp - 0x2d]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x5005d7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x2d], 0
jne 0x500631
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x500607
push dword [ebp - 0x14]
push str.SrcFile__s__is_not_Exist_
push str.Update
call fcn.00494cb0
push eax
call fcn.00494d30
add esp, 0x10
jmp 0x500631
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
call fcn.00513b80
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push str.Replace_NewFile__s__To_LocalFile__s_._Result__d_
push str.Update
call fcn.00494cb0
push eax
call fcn.00494d30
add esp, 0x18
add esi, 0xfffffff0
mov byte [ebp - 4], 6
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x50064e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov ecx, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x50066e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov ecx, edi
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x50068e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x34]
inc ebx
mov esi, dword [ebp - 0x2c]
add esi, 0x10
mov dword [ebp - 0x2c], esi
mov ecx, dword [eax]
mov eax, dword [ecx + 8]
sub eax, dword [ecx + 4]
sar eax, 4
cmp ebx, eax
jb 0x500520
mov esi, dword [ebp - 0x34]
mov ecx, dword [esi]
test ecx, ecx
jne 0x5006c6
mov dword [ebp - 0x2c], ecx
jmp 0x5006d4
push 0x80004005
call fcn.0040c390
push 1
lea eax, [ebp - 0x24]
push eax
call fcn.004ffc40
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 3
mov edx, edi
mov esi, dword [ebp - 0x24]
add esi, 0xfffffff0
lea ecx, [esi + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x500716
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x20]
call fcn.00513860
jmp 0x500738
push str.Check_Download_Package_File_Integrity_Failed_
push str.Update
call fcn.00494cb0
push eax
call fcn.00494d30
add esp, 0xc
lea ecx, [ebp - 0x20]
call fcn.00513860
jmp 0x500738
push str.Unzip_Package_File_Failed_
push str.Update
call fcn.00494cb0
push eax
call fcn.00494d30
add esp, 0xc
mov byte [ebp - 4], 1
mov ecx, edi
mov edx, dword [ebp - 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x500758
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x500779
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x2c]
jmp 0x500780
xor eax, eax
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.0055199a
mov esp, ebp
pop ebp
ret 8