Function at 0x405160
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431900
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push esi
push edi
mov eax, dword [0x43ec2c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push str.CControlDatFile::UpdateTargetValueInDriverList_r_n
push 0x442e1c
call fcn.004013e0
add esp, 8
xor esi, esi
push 0x4372b0
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], esi
call fcn.00401bf0
push 0x4372b0
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], esi
call fcn.00401bf0
mov byte [ebp - 4], 1
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
cmp eax, esi
je 0x4053c9
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
cmp dword [edx - 0xc], esi
je 0x4053c9
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
cmp dword [ecx - 0xc], esi
je 0x4053c9
lea edx, [ebp - 0x10]
push edx
call fcn.00402950
add esp, 4
cmp eax, esi
je 0x4053c9
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00401580
push str.EPSONSoftwareUpdater
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x24]
push edx
call fcn.004068c0
push 0x437228
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 2
call fcn.004068c0
push str.EPSDNMON.dat
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 3
call fcn.004068c0
add esp, 0x24
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 4
call fcn.00401580
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405275
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405298
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 - 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4052bb
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 - 0x1c]
push edx
call fcn.004068c0
push 0x437228
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 5
call fcn.004068c0
push str.EPSDNMON_backup_.dat
push eax
lea ecx, [ebp - 0x24]
push ecx
mov byte [ebp - 4], 6
call fcn.004068c0
add esp, 0x24
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call fcn.00401580
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405326
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405349
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 0x40536c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push ecx
push edx
call esi
mov edx, dword [edi]
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
push edi
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
jne 0x405427
push str.UpdateTargetValueInDriverList_Error_r_n
push 0x442e1c
call fcn.004013e0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add esp, 8
push 0
push edx
push eax
call esi
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [ebp - 0x18]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4053ec
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 0x405412
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x18], 1
jmp 0x4053bc