Function at 0x406010
Capabilities:
Check if file exists
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431860
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push edi
mov eax, dword [0x43ec2c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.CControlDatFile_:_UpdateAppList_r_n
push 0x442e1c
call fcn.004013e0
add esp, 8
xor edi, edi
push 0x4372b0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x24], edi
call fcn.00401bf0
push 0x4372b0
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call fcn.00401bf0
push 0x4372b0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call fcn.00401bf0
push 0x4372b0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.00401bf0
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 3
push eax
mov dword [ebp - 0x20], edi
call fcn.00402950
add esp, 4
cmp eax, edi
je 0x40641d
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00401580
push str.EPSONSoftwareUpdater
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x30]
push eax
call fcn.004068c0
push 0x437228
push eax
lea ecx, [ebp - 0x2c]
push ecx
mov byte [ebp - 4], 4
call fcn.004068c0
push str.EPSDNMAL.dat
push eax
lea edx, [ebp - 0x28]
mov bl, 5
push edx
mov byte [ebp - 4], bl
call fcn.004068c0
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.00401580
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40611f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406142
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406165
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.EPSONSoftwareUpdater
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.004068c0
push 0x437228
push eax
lea eax, [ebp - 0x2c]
push eax
mov byte [ebp - 4], 7
call fcn.004068c0
push str.EPSDNMAL_backup_.dat
push eax
lea ecx, [ebp - 0x30]
mov bl, 8
push ecx
mov byte [ebp - 4], bl
call fcn.004068c0
add esp, 0x24
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 9
call fcn.00401580
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4061d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4061f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406216
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, edi
jne 0x406260
mov edx, dword [ebp - 0x10]
push str.a__ccsUTF_16LE
push edx
lea eax, [ebp - 0x20]
push eax
call fcn.004187a1
mov eax, dword [ebp - 0x20]
add esp, 0xc
cmp eax, edi
jne 0x406257
push str.CControlDatFile_:_ERROR__wfopen_s_r_n
push 0x442e1c
call fcn.004013e0
add esp, 8
jmp 0x40641d
push eax
call fcn.004189b1
add esp, 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov eax, dword [esi + 0x18]
cmp eax, edi
mov dword [ebp - 0x34], eax
jle 0x406404
xor ebx, ebx
nop
test edi, edi
jl 0x4063fd
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
add eax, edi
mov eax, dword [eax + 4]
push str.Error
push eax
call fcn.00418d73
add esp, 8
test eax, eax
je 0x4062e6
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + edi + 4]
add eax, edi
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
push edx
push ecx
add eax, edi
mov eax, dword [eax]
push str.Name
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x406402
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
add eax, edi
mov eax, dword [eax + 8]
push str.Error
push eax
call fcn.00418d73
add esp, 8
test eax, eax
je 0x406344
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + edi + 8]
add eax, edi
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
push edx
push ecx
add eax, edi
mov eax, dword [eax]
push str.LastCheck
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x406402
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
add eax, edi
cmp dword [eax + 0xc], 0xffffffff
je 0x40639f
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
add eax, edi
mov eax, dword [eax + 0xc]
push eax
lea ecx, [ebp - 0x1c]
push 0x437b9c
push ecx
call fcn.00402260
add esp, 0xc
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0x1c]
push edx
push ecx
add eax, edi
mov eax, dword [eax]
push str.Category
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x406402
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov eax, dword [esi + 0x14]
xor edx, edx
add eax, edi
cmp dword [eax + 0x10], edx
lea eax, [ebp - 0x18]
setne dl
push edx
push 0x437b9c
push eax
call fcn.00402260
add esp, 0xc
cmp ebx, dword [esi + 0x18]
jge 0x4063fd
mov ecx, dword [ebp - 0x10]
mov eax, dword [esi + 0x14]
mov edx, dword [ebp - 0x18]
push ecx
push edx
add eax, edi
mov eax, dword [eax]
push str.Monitor
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x406402
inc ebx
add edi, 0x18
cmp ebx, dword [ebp - 0x34]
jl 0x406280
mov dword [ebp - 0x24], 1
jmp 0x406413
call fcn.0040d813
xor edi, edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406440
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406463
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406486
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4064ac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret