Function at 0x409890
Capabilities:
Check if file exists
Copy file
Delete file
Move file
Print debug messages
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c74b6
mov eax, dword fs:[0]
push eax
sub esp, 0x1a0
mov eax, dword [0x50545c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x184], ecx
mov dword [ebp - 4], 1
call fcn.0044fb81
push eax
lea ecx, [ebp - 0x14]
call fcn.00412940
mov byte [ebp - 4], 2
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x506c08
call fcn.00434880
mov dword [ebp - 0x188], eax
mov ecx, dword [ebp - 0x188]
mov dword [ebp - 0x18c], ecx
mov byte [ebp - 4], 3
lea edx, [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x18c]
push eax
lea ecx, [ebp - 0x10]
push ecx
call fcn.0040f190
add esp, 0xc
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x3c]
sub edx, 0x10
mov dword [ebp - 0x9c], edx
mov ecx, dword [ebp - 0x9c]
call fcn.004029d0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xa0], eax
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409956
push 0x80
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, 0x506c08
call fcn.0043cbb0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x4099a6
push 0
call fcn.0043cd80
add esp, 4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x409992
push str.DoUpdate_WowFsRedirection__FALSE__Succeed.
mov eax, dword [ebp - 0x184]
push eax
call fcn.00401a70
add esp, 8
jmp 0x4099a6
push str.DoUpdate_WowFsRedirection__FALSE__Fail.
mov ecx, dword [ebp - 0x184]
push ecx
call fcn.00401a70
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00452618
mov byte [ebp - 4], 6
push 0x4d33a8
lea ecx, [ebp - 0x44]
call fcn.00412370
mov byte [ebp - 4], 7
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x48]
push ecx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x190], eax
mov edx, dword [ebp - 0x190]
mov dword [ebp - 0xa8], edx
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov dword [ebp - 0xac], ecx
push 0
mov edx, dword [ebp - 0xac]
push edx
lea ecx, [ebp - 0x2c]
call fcn.004526d5
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x48]
sub eax, 0x10
mov dword [ebp - 0xb0], eax
mov ecx, dword [ebp - 0xb0]
call fcn.004029d0
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x44]
sub ecx, 0x10
mov dword [ebp - 0xb4], ecx
mov ecx, dword [ebp - 0xb4]
call fcn.004029d0
cmp dword [ebp - 0x40], 0
je 0x409b28
lea ecx, [ebp - 0x2c]
call fcn.00452139
push 0x4d33a8
lea ecx, [ebp - 0x4c]
call fcn.00412370
mov byte [ebp - 4], 9
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x50]
push ecx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 0xbc]
mov eax, dword [edx]
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0xc0]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x50]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x4c]
call fcn.004129d0
push 0x4d33a8
lea ecx, [ebp - 0x54]
call fcn.00412370
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x54]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x58]
push ecx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x194], eax
mov edx, dword [ebp - 0x194]
mov dword [ebp - 0x198], edx
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x198]
mov ecx, dword [eax]
push ecx
push str.ddd_UpdateMailLock_delete_file__s_success_n
lea edx, [ebp - 0x14]
push edx
call fcn.00413630
add esp, 0xc
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x58]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x54]
call fcn.004129d0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x60]
call fcn.00412370
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x64]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
mov edx, dword [ecx]
mov dword [ebp - 0xe0], edx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xe4], eax
mov ecx, dword [ebp - 0xe0]
push ecx
mov edx, dword [ebp - 0xe4]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x59], al
lea ecx, [ebp - 0x64]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x60]
call fcn.004129d0
movzx eax, byte [ebp - 0x59]
test eax, eax
je 0x409c2a
push 0x4d33a8
lea ecx, [ebp - 0x68]
call fcn.00412370
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x68]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x6c]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x19c], eax
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x1a0], ecx
mov byte [ebp - 4], 0xe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
push str.ddd_UpdateMailLock_move_file__s_to__s_fail_err_is__d_n
lea edx, [ebp - 0x14]
push edx
call fcn.00413630
add esp, 0x14
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x6c]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x68]
call fcn.004129d0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0xfc], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x100], edx
push 0
mov eax, dword [ebp - 0xfc]
push eax
mov ecx, dword [ebp - 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x409c7b
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
push str.UpdateMailLock_copy__s_to__s_success_n
lea ecx, [ebp - 0x14]
push ecx
call fcn.00413630
add esp, 0x10
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x409ca5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.UpdateMailLock_copy__s_to__s_failed__error_code:__d_n
lea edx, [ebp - 0x14]
push edx
call fcn.00413630
add esp, 0x14
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x74]
call fcn.00412370
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x74]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x78]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x1a4], eax
mov ecx, dword [ebp - 0x1a4]
mov dword [ebp - 0x110], ecx
mov byte [ebp - 4], 0x10
mov edx, dword [ebp - 0x110]
mov eax, dword [edx]
mov dword [ebp - 0x114], eax
push 0
mov ecx, dword [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.004526d5
mov dword [ebp - 0x70], eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x78]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x74]
call fcn.004129d0
cmp dword [ebp - 0x70], 0
je 0x409e91
lea ecx, [ebp - 0x2c]
call fcn.00452139
push 0x4d33a8
lea ecx, [ebp - 0x7c]
call fcn.00412370
mov byte [ebp - 4], 0x11
lea edx, [ebp - 0x7c]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x80]
push ecx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x1a8], eax
mov edx, dword [ebp - 0x1a8]
mov dword [ebp - 0x1ac], edx
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x1ac]
mov ecx, dword [eax]
push ecx
push str.ddd_UpdateMailLock_found_file__s__prepare_to_delete_n
lea edx, [ebp - 0x14]
push edx
call fcn.00413630
add esp, 0xc
mov byte [ebp - 4], 0x11
lea ecx, [ebp - 0x80]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x7c]
call fcn.004129d0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x88]
call fcn.00412370
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x88]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x8c]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x140], eax
mov ecx, dword [ebp - 0x140]
mov edx, dword [ecx]
mov dword [ebp - 0x144], edx
mov eax, dword [ebp - 0x144]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x81], al
lea ecx, [ebp - 0x8c]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x88]
call fcn.004129d0
movzx ecx, byte [ebp - 0x81]
test ecx, ecx
je 0x409e91
push 0x4d33a8
lea ecx, [ebp - 0x90]
call fcn.00412370
mov byte [ebp - 4], 0x14
lea edx, [ebp - 0x90]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x94]
push ecx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x164], eax
mov edx, dword [ebp - 0x164]
mov eax, dword [edx]
mov dword [ebp - 0x168], eax
push 4
push 0
mov ecx, dword [ebp - 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x94]
call fcn.004129d0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x90]
call fcn.004129d0
cmp dword [ebp - 0x30], 0
je 0x409ed4
push 1
call fcn.0043cd80
add esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x409ec0
push str.DoUpdate_WowFsRedirection__TRUE__Succeed.
mov edx, dword [ebp - 0x184]
push edx
call fcn.00401a70
add esp, 8
jmp 0x409ed4
push str.DoUpdate_WowFsRedirection__TRUE__Fail.
mov eax, dword [ebp - 0x184]
push eax
call fcn.00401a70
add esp, 8
mov dword [ebp - 0x98], 1
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2c]
call fcn.00452641
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
call fcn.004129d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
call fcn.004129d0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.004129d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.004129d0
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 8