Function at 0x406ae0
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 0x4c70ce
mov eax, dword fs:[0]
push eax
sub esp, 0x19c
mov eax, dword [0x50545c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x180], ecx
mov dword [ebp - 4], 0
call fcn.0044fb81
push eax
lea ecx, [ebp - 0x14]
call fcn.00412940
mov byte [ebp - 4], 1
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x506c08
call fcn.00434880
mov dword [ebp - 0x184], eax
mov ecx, dword [ebp - 0x184]
mov dword [ebp - 0x188], ecx
mov byte [ebp - 4], 2
push str.maillock.sys
mov edx, dword [ebp - 0x188]
push edx
lea eax, [ebp - 0x10]
push eax
call fcn.0040f270
add esp, 0xc
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3c]
sub ecx, 0x10
mov dword [ebp - 0x9c], ecx
mov ecx, dword [ebp - 0x9c]
call fcn.004029d0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x406ba7
push 0x80
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, 0x506c08
call fcn.0043cbb0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x406bf7
push 0
call fcn.0043cd80
add esp, 4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x406be3
push str.DoUpdate_WowFsRedirection__FALSE__Succeed.
mov edx, dword [ebp - 0x180]
push edx
call fcn.00401a70
add esp, 8
jmp 0x406bf7
push str.DoUpdate_WowFsRedirection__FALSE__Fail.
mov eax, dword [ebp - 0x180]
push eax
call fcn.00401a70
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00452618
mov byte [ebp - 4], 5
push 0x4d33a8
lea ecx, [ebp - 0x44]
call fcn.00412370
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x48]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x18c], eax
mov ecx, dword [ebp - 0x18c]
mov dword [ebp - 0xa8], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0xa8]
mov eax, dword [edx]
mov dword [ebp - 0xac], eax
push 0
mov ecx, dword [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.004526d5
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x48]
sub edx, 0x10
mov dword [ebp - 0xb0], edx
mov ecx, dword [ebp - 0xb0]
call fcn.004029d0
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x44]
sub eax, 0x10
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0xb4]
call fcn.004029d0
cmp dword [ebp - 0x40], 0
je 0x406d79
lea ecx, [ebp - 0x2c]
call fcn.00452139
push 0x4d33a8
lea ecx, [ebp - 0x4c]
call fcn.00412370
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x4c]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x50]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
mov edx, dword [ecx]
mov dword [ebp - 0xc0], edx
mov eax, dword [ebp - 0xc0]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x50]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4c]
call fcn.004129d0
push 0x4d33a8
lea ecx, [ebp - 0x54]
call fcn.00412370
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x58]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x194], ecx
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x194]
mov eax, dword [edx]
push eax
push str.ddd_UpdateMailLock_delete_file__s_success_n
lea ecx, [ebp - 0x14]
push ecx
call fcn.00413630
add esp, 0xc
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x58]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x54]
call fcn.004129d0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x60]
call fcn.00412370
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x64]
push edx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0xdc]
mov ecx, dword [eax]
mov dword [ebp - 0xe0], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xe4], edx
mov eax, dword [ebp - 0xe0]
push eax
mov ecx, dword [ebp - 0xe4]
push ecx
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], 5
lea ecx, [ebp - 0x60]
call fcn.004129d0
movzx edx, byte [ebp - 0x59]
test edx, edx
je 0x406e7b
push 0x4d33a8
lea ecx, [ebp - 0x68]
call fcn.00412370
mov byte [ebp - 4], 0xc
lea eax, [ebp - 0x68]
push eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x6c]
push edx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x198], eax
mov eax, dword [ebp - 0x198]
mov dword [ebp - 0x19c], eax
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x19c]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x10]
push eax
push str.ddd_UpdateMailLock_move_file__s_to__s_fail_err_is__d_n
lea ecx, [ebp - 0x14]
push ecx
call fcn.00413630
add esp, 0x14
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x6c]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x68]
call fcn.004129d0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x100], ecx
push 0
mov edx, dword [ebp - 0xfc]
push edx
mov eax, dword [ebp - 0x100]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x406ecc
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.UpdateMailLock_copy__s_to__s_success_n
lea eax, [ebp - 0x14]
push eax
call fcn.00413630
add esp, 0x10
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x406ef6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
push str.UpdateMailLock_copy__s_to__s_failed__error_code:__d_n
lea ecx, [ebp - 0x14]
push ecx
call fcn.00413630
add esp, 0x14
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x74]
call fcn.00412370
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x78]
push edx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x1a0], eax
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x110], eax
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x110]
mov edx, dword [ecx]
mov dword [ebp - 0x114], edx
push 0
mov eax, dword [ebp - 0x114]
push eax
lea ecx, [ebp - 0x2c]
call fcn.004526d5
mov dword [ebp - 0x70], eax
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x78]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x74]
call fcn.004129d0
cmp dword [ebp - 0x70], 0
je 0x4070e2
lea ecx, [ebp - 0x2c]
call fcn.00452139
push 0x4d33a8
lea ecx, [ebp - 0x7c]
call fcn.00412370
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x7c]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x80]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x1a4], eax
mov ecx, dword [ebp - 0x1a4]
mov dword [ebp - 0x1a8], ecx
mov byte [ebp - 4], 0x11
mov edx, dword [ebp - 0x1a8]
mov eax, dword [edx]
push eax
push str.ddd_UpdateMailLock_found_file__s__prepare_to_delete_n
lea ecx, [ebp - 0x14]
push ecx
call fcn.00413630
add esp, 0xc
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x80]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x7c]
call fcn.004129d0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4d33a8
lea ecx, [ebp - 0x88]
call fcn.00412370
mov byte [ebp - 4], 0x12
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x8c]
push edx
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
mov ecx, dword [eax]
mov dword [ebp - 0x144], ecx
mov edx, dword [ebp - 0x144]
push edx
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], 5
lea ecx, [ebp - 0x88]
call fcn.004129d0
movzx eax, byte [ebp - 0x81]
test eax, eax
je 0x4070e2
push 0x4d33a8
lea ecx, [ebp - 0x90]
call fcn.00412370
mov byte [ebp - 4], 0x13
lea ecx, [ebp - 0x90]
push ecx
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x94]
push eax
call fcn.0040f190
add esp, 0xc
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x164]
mov edx, dword [ecx]
mov dword [ebp - 0x168], edx
push 4
push 0
mov eax, dword [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [ebp - 0x94]
call fcn.004129d0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x90]
call fcn.004129d0
cmp dword [ebp - 0x30], 0
je 0x407125
push 1
call fcn.0043cd80
add esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x407111
push str.DoUpdate_WowFsRedirection__TRUE__Succeed.
mov ecx, dword [ebp - 0x180]
push ecx
call fcn.00401a70
add esp, 8
jmp 0x407125
push str.DoUpdate_WowFsRedirection__TRUE__Fail.
mov edx, dword [ebp - 0x180]
push edx
call fcn.00401a70
add esp, 8
mov dword [ebp - 0x98], 1
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00452641
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
call fcn.004129d0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.004129d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
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 4