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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d58d
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x54b144]
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 ebx, ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x3c], 0
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4951fd
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
mov dword [ebp - 4], 0
mov eax, dword [ebx + 0x1c]
or ebx, 0xffffffff
mov edi, dword [eax]
mov dword [ebp - 0x40], edi
cmp edi, eax
je 0x49503f
mov edx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ecx, dword [ebp - 0x34]
nop dword [eax]
nop dword [eax + eax]
movzx eax, word [edi + 0xa]
cmp eax, dword [ebp + 8]
jne 0x49502f
cmp dword [edi + 0xc], 0
je 0x494d6f
mov eax, dword [0x54bbfc]
cmp eax, 0xffffffff
jne 0x494d27
push str.IsWow64Process
push str.kernel32
call edx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x494d1b
push 0x54bbfc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
test eax, eax
je 0x494d1b
mov eax, dword [0x54bbfc]
mov edx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
jmp 0x494d2d
mov dword [0x54bbfc], 0
jmp 0x494d6f
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x494d6f
cmp dword [0x54f5ec], 0
jne 0x494d64
push str.Kernel32.dll
call edx
test eax, eax
je 0x494d52
push str.Wow64EnableWow64FsRedirection
push eax
call ebx
mov dword [0x54f5ec], eax
cmp dword [0x54f5ec], 0
jne 0x494d64
mov dword [ebp - 0x3c], 1
jmp 0x494d6f
push 0
call dword [0x54f5ec]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [edi + 0x14]
lea ebx, [edi + 0x14]
push ecx
sub eax, 0x10
mov esi, esp
push eax
mov dword [ebp - 0x38], esi
call fcn.0048ce30
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov esi, dword [ebp - 0x34]
mov ecx, esi
call fcn.00496110
test eax, eax
jne 0x494e5b
mov eax, dword [esi]
lea ecx, [ebp - 0x48]
push ecx
mov ecx, esi
call dword [eax]
push ebx
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 1
push eax
call fcn.00496cb0
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov esi, dword [ebp - 0x30]
lea edx, [ecx - 0x10]
lea ebx, [esi - 0x10]
cmp edx, ebx
je 0x494e1a
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x494e0b
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x494e0b
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x2c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x494e03
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x30], esi
jmp 0x494e1a
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x30]
call fcn.0044f440
mov esi, dword [ebp - 0x30]
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x44]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x494e3b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x494e61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x494e61
mov esi, dword [ebp - 0x30]
or ebx, 0xffffffff
movzx eax, word [edi + 8]
sub eax, 0
je 0x4950ba
sub eax, 1
je 0x495079
sub eax, 1
jne 0x494fdf
call fcn.004501e0
mov ecx, eax
test ecx, ecx
je 0x4951fd
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
add edi, 0x18
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2c]
push eax
push ecx
mov eax, dword [edi]
mov ebx, esp
sub eax, 0x10
mov dword [ebp - 0x38], ebx
push eax
call fcn.0048ce30
add eax, 0x10
add esp, 4
mov dword [ebx], eax
mov ebx, dword [ebp - 0x34]
mov ecx, ebx
call fcn.00496110
test eax, eax
jne 0x494f89
mov eax, dword [ebx]
lea ecx, [ebp - 0x50]
push ecx
mov ecx, ebx
call dword [eax]
push edi
push eax
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 5
push eax
call fcn.00496cb0
add esp, 0xc
mov byte [ebp - 4], 6
mov ecx, dword [eax]
mov edi, dword [ebp - 0x2c]
lea edx, [ecx - 0x10]
lea ebx, [edi - 0x10]
cmp edx, ebx
je 0x494f48
cmp dword [ebx + 0xc], 0
lea edi, [ebx + 0xc]
jl 0x494f39
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x494f39
push edx
call fcn.0048ce30
add esp, 4
mov dword [ebp - 0x38], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x494f31
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x38]
lea edi, [eax + 0x10]
mov dword [ebp - 0x2c], edi
jmp 0x494f48
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0044f440
mov edi, dword [ebp - 0x2c]
mov byte [ebp - 4], 5
or ebx, 0xffffffff
mov edx, dword [ebp - 0x4c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x494f69
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x50]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x494f8f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x494f8f
mov edi, dword [ebp - 0x2c]
or ebx, 0xffffffff
mov eax, dword [ebp - 0x40]
cmp dword [eax + 0x10], 0
je 0x494fa4
push edi
push esi
call fcn.004861f0
add esp, 8
jmp 0x494fae
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push eax
push str.CUninstallProcessor::HandleFile_copy:_d.
push 0x54bba8
call fcn.0048d420
add esp, 0xc
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x494fdc
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x40]
cmp dword [ebp - 0x3c], 0
je 0x495026
cmp dword [0x54f5ec], 0
mov dword [ebp - 0x3c], 0
jne 0x49501e
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x495015
push str.Wow64EnableWow64FsRedirection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x54f5ec], eax
cmp dword [0x54f5ec], 0
je 0x495026
push 1
call dword [0x54f5ec]
mov ecx, dword [ebp - 0x34]
mov edx, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov eax, dword [edi]
mov edi, eax
mov dword [ebp - 0x40], edi
cmp eax, dword [ecx + 0x1c]
jne 0x494cc0
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x49505b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
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.004dafe6
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x10], 0
je 0x49508d
push esi
call fcn.00487540
add esp, 4
jmp 0x494fdf
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
test eax, eax
je 0x494fdf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x494fdf
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x494fdf
cmp dword [edi + 0x10], 0
je 0x4951e8
test esi, esi
je 0x494fdf
mov ecx, esi
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x495100
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.0044a750
mov byte [ebp - 4], 3
cmp dword [ebp - 0x18], 0
je 0x495195
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push eax
call fcn.004e43a1
add esp, 8
cmp eax, 0xffffffff
je 0x495195
mov ecx, dword [ebp - 0x18]
cmp ecx, 1
jb 0x495180
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
movzx ecx, word [eax + ecx*2 - 2]
xor eax, eax
nop dword [eax + eax]
cmp cx, word [eax + 0x530e54]
je 0x495180
add eax, 2
cmp eax, 4
jb 0x495160
push 1
push 0x5329c0
lea ecx, [ebp - 0x28]
call fcn.0044ae60
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
mov edx, 1
cmovae ecx, dword [ebp - 0x28]
call fcn.00487c00
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4951cf
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4951c5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4951f8
push edx
push ecx
call fcn.004dafca
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
jmp 0x494fdf
push 1
push esi
call fcn.00487730
add esp, 8
jmp 0x494fdf
call fcn.004e002c
push 0x80004005
call fcn.00450130
int3