Function at 0x502440
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56a060
mov eax, dword fs:[0]
push eax
sub esp, 0x8c4
mov eax, dword [0x5d0074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x8ac], eax
xor ecx, ecx
mov dword [ebp - 0x8a8], ecx
cmp dword [eax + 0x64], ecx
jne 0x502506
mov edi, dword [eax + 0x6c]
push 0x1c
push str.AI_EXTERNALUIUNINSTALLERNAME
mov eax, dword [edi]
mov dword [ebp - 0x818], ecx
mov dword [ebp - 0x814], ecx
mov dword [ebp - 0x818], ecx
lea ecx, [ebp - 0x828]
mov esi, dword [eax]
xor eax, eax
mov dword [ebp - 0x814], 7
mov word [ebp - 0x828], ax
call fcn.00407880
mov dword [ebp - 4], 0
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x840]
mov dword [ebp - 0x8a8], 1
push eax
mov ecx, edi
call esi
mov dword [ebp - 4], 1
mov ecx, 3
mov dword [ebp - 0x8a8], ecx
cmp dword [eax + 0x10], 0
mov byte [ebp - 0x8a1], 1
jne 0x50250d
mov byte [ebp - 0x8a1], 0
mov dword [ebp - 4], 0
test cl, 2
je 0x502533
and ecx, 0xfffffffd
mov dword [ebp - 0x8a8], ecx
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov ecx, dword [ebp - 0x8a8]
mov dword [ebp - 4], 0xffffffff
test cl, 1
je 0x502553
and ecx, 0xfffffffe
mov dword [ebp - 0x8a8], ecx
lea ecx, [ebp - 0x828]
call fcn.00407b40
cmp byte [ebp - 0x8a1], 0
je 0x502c22
mov edi, dword [ebp - 0x8ac]
lea ecx, [ebp - 0x828]
push 9
push str.Installed
mov edi, dword [edi + 0x6c]
mov eax, dword [edi]
mov dword [ebp - 0x818], 0
mov dword [ebp - 0x814], 0
mov dword [ebp - 0x818], 0
mov esi, dword [eax]
xor eax, eax
mov dword [ebp - 0x814], 7
mov word [ebp - 0x828], ax
call fcn.00407880
mov dword [ebp - 4], 2
lea eax, [ebp - 0x828]
push eax
lea eax, [ebp - 0x840]
mov ecx, edi
push eax
call esi
mov byte [ebp - 4], 3
mov esi, dword [eax + 0x10]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call fcn.00407b40
test esi, esi
jne 0x502c22
mov edi, dword [ebp - 0x8ac]
lea eax, [ebp - 0x828]
push eax
mov ecx, edi
call fcn.005022a0
mov dword [ebp - 4], 4
xor eax, eax
mov dword [ebp - 0x860], esi
mov dword [ebp - 0x85c], esi
mov dword [ebp - 0x860], esi
mov dword [ebp - 0x85c], 7
mov word [ebp - 0x870], ax
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x8d0]
call fcn.0048e1a0
mov byte [ebp - 4], 8
mov ecx, dword [edi + 0x68]
cmp dword [ecx + 0x10c], esi
je 0x5026dd
lea eax, [ebp - 0x840]
push eax
call fcn.004f3d80
mov esi, eax
mov byte [ebp - 4], 9
lea eax, [ebp - 0x870]
cmp eax, esi
je 0x5026a8
mov ecx, eax
call fcn.00407b40
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [ebp - 0x870], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x860], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov eax, dword [edi + 0x68]
lea ecx, [ebp - 0x870]
add eax, 0xfc
push eax
call fcn.00445380
lea eax, [ebp - 0x870]
push eax
lea ecx, [ebp - 0x8d0]
call fcn.0048e430
xor eax, eax
mov dword [ebp - 0x878], 0
mov dword [ebp - 0x874], 0
mov dword [ebp - 0x878], 0
mov dword [ebp - 0x874], 7
mov word [ebp - 0x888], ax
mov byte [ebp - 4], 0xe
cmp dword [ebp - 0x860], eax
je 0x502759
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x870]
call fcn.0048d0b0
mov byte [ebp - 4], 0xf
mov esi, dword [ebp - 0x8a8]
or esi, 4
mov dword [ebp - 0x8a8], esi
cmp dword [eax + 0x14], 8
jb 0x502747
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 0x8a1], 0
test eax, eax
jne 0x502760
mov byte [ebp - 0x8a1], 1
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x8a8]
test al, 4
je 0x502785
and eax, 0xfffffffb
lea ecx, [ebp - 0x840]
mov dword [ebp - 0x8a8], eax
call fcn.00407b40
cmp byte [ebp - 0x8a1], 0
je 0x5029e9
lea ecx, [ebp - 0x840]
call fcn.0048bfa0
mov esi, eax
mov byte [ebp - 4], 0x10
lea eax, [ebp - 0x870]
cmp eax, esi
je 0x5027de
mov ecx, eax
call fcn.00407b40
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [ebp - 0x870], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [ebp - 0x860], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x810]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0x18
lea ecx, [ebp - 0x810]
mov edx, esp
mov dword [ebp - 0x8ac], esp
xor eax, eax
lea esi, [ecx + 2]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov word [edx], ax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x502830
sub ecx, esi
lea eax, [ebp - 0x810]
sar ecx, 1
push ecx
push eax
mov ecx, edx
call fcn.00407880
mov byte [ebp - 4], 0x14
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x840]
call fcn.0048bb00
mov byte [ebp - 4], 0x16
xor ecx, ecx
mov dword [ebp - 0x848], 0
mov dword [ebp - 0x844], 0
mov dword [ebp - 0x848], 0
mov dword [ebp - 0x844], 7
mov word [ebp - 0x858], cx
mov dword [ebp - 4], 0x16
lea ecx, [ebp - 0x858]
mov esi, dword [ebp - 0x8a8]
push ecx
or esi, 0x20
mov ecx, eax
mov dword [ebp - 0x8a8], esi
call fcn.004842a0
mov eax, esi
and eax, 0xffffffdf
mov dword [ebp - 0x8a8], eax
mov dword [ebp - 4], 0x15
or eax, 0x10
mov dword [ebp - 0x8a8], eax
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x840]
call fcn.00407b40
lea ecx, [ebp - 0x888]
call fcn.00407b40
movups xmm0, xmmword [ebp - 0x858]
mov esi, dword [ebp - 0x8a8]
xor eax, eax
and esi, 0xffffffef
mov word [ebp - 0x858], ax
movups xmmword [ebp - 0x888], xmm0
movq xmm0, qword [ebp - 0x848]
movq qword [ebp - 0x878], xmm0
mov dword [ebp - 0x848], 0
mov dword [ebp - 0x844], 7
mov dword [ebp - 0x8a8], esi
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.00407b40
sub esp, 0x18
lea eax, [ebp - 0x828]
mov ecx, esp
mov dword [ebp - 0x8ac], esp
push eax
call fcn.00406ba0
mov byte [ebp - 4], 0x1d
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.0048bb00
mov byte [ebp - 4], 0x1e
lea ecx, [ebp - 0x840]
push ecx
mov ecx, eax
call fcn.0048d040
mov byte [ebp - 4], 0x1f
lea ecx, [ebp - 0x888]
push eax
call fcn.00445380
mov byte [ebp - 4], 0x1e
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.00407b40
push 0x593320
lea ecx, [ebp - 0x858]
call fcn.004064f0
mov byte [ebp - 4], 0x22
lea eax, [ebp - 0x858]
push eax
lea ecx, [ebp - 0x888]
call fcn.0048bc60
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.00407b40
jmp 0x5029ef
mov esi, dword [ebp - 0x8a8]
cmp dword [ebp - 0x814], 8
lea eax, [ebp - 0x828]
lea ecx, [ebp - 0x8ac]
cmovae eax, dword [ebp - 0x828]
push eax
call fcn.004127e0
mov byte [ebp - 4], 0x23
xor dl, dl
push 0
lea ecx, [ebp - 0x8ac]
call fcn.00494c80
add esp, 4
mov byte [ebp - 4], 0xe
or eax, 0xffffffff
mov edx, dword [ebp - 0x8ac]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x502a47
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x870]
call fcn.0048d0b0
mov byte [ebp - 4], 0x25
lea ecx, [ebp - 0x828]
cmp dword [ebp - 0x814], 8
cmovae ecx, dword [ebp - 0x828]
cmp dword [eax + 0x14], 8
jb 0x502a79
mov eax, dword [eax]
mov edi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0
push ecx
push eax
call edi
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x840]
call fcn.00407b40
cmp dword [ebp - 0x878], 0
je 0x502ad6
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x888]
call fcn.0048d0b0
mov byte [ebp - 4], 0x26
or esi, 8
mov dword [ebp - 0x8a8], esi
cmp dword [eax + 0x14], 8
jb 0x502ac4
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov byte [ebp - 0x8a1], 1
test eax, eax
jne 0x502add
mov byte [ebp - 0x8a1], 0
mov dword [ebp - 4], 0xe
mov eax, dword [ebp - 0x8a8]
test al, 8
je 0x502b02
and eax, 0xfffffff7
lea ecx, [ebp - 0x840]
mov dword [ebp - 0x8a8], eax
call fcn.00407b40
cmp byte [ebp - 0x8a1], 0
je 0x502be3
sub esp, 0x18
lea eax, [ebp - 0x828]
mov ecx, esp
mov dword [ebp - 0x8ac], esp
push eax
call fcn.00406ba0
mov byte [ebp - 4], 0x27
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.0048bb00
mov byte [ebp - 4], 0x28
lea ecx, [ebp - 0x840]
push 0x593320
call fcn.004064f0
mov byte [ebp - 4], 0x29
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x858]
call fcn.0048bc60
mov byte [ebp - 4], 0x28
lea ecx, [ebp - 0x840]
call fcn.00407b40
lea eax, [ebp - 0x8a0]
push eax
lea ecx, [ebp - 0x858]
call fcn.0048d0b0
mov esi, eax
mov byte [ebp - 4], 0x2a
lea eax, [ebp - 0x840]
push eax
lea ecx, [ebp - 0x888]
call fcn.0048d0b0
mov byte [ebp - 4], 0x2b
cmp dword [esi + 0x14], 8
jb 0x502ba8
mov esi, dword [esi]
cmp dword [eax + 0x14], 8
jb 0x502bb0
mov eax, dword [eax]
push 0
push esi
push eax
call edi
mov byte [ebp - 4], 0x2a
lea ecx, [ebp - 0x840]
call fcn.00407b40
mov byte [ebp - 4], 0x28
lea ecx, [ebp - 0x8a0]
call fcn.00407b40
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x858]
call fcn.00407b40
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x888]
call fcn.00407b40
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x8d0]
call fcn.0048e230
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x870]
call fcn.00407b40
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call fcn.00407b40
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005214e1
mov esp, ebp
pop ebp
ret