Function at 0x407270
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 0x4bef1e
mov eax, dword fs:[0]
push eax
sub esp, 0x19c
mov eax, dword [0x4f7458]
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.00447437
push eax
lea ecx, [ebp - 0x14]
call fcn.00411850
mov byte [ebp - 4], 1
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x4f89c8
call fcn.0042d1d0
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.0040f970
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.00403de0
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 0x407337
push 0x80
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, 0x4f89c8
call fcn.00434fb0
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x407387
push 0
call fcn.00435150
add esp, 4
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x407373
push str.DoUpdate_WowFsRedirection__FALSE__Succeed.
mov edx, dword [ebp - 0x180]
push edx
call fcn.004028d0
add esp, 8
jmp 0x407387
push str.DoUpdate_WowFsRedirection__FALSE__Fail.
mov eax, dword [ebp - 0x180]
push eax
call fcn.004028d0
add esp, 8
lea ecx, [ebp - 0x2c]
call fcn.00449fa0
mov byte [ebp - 4], 5
push 0x4c9f28
lea ecx, [ebp - 0x44]
call fcn.00411370
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.0040f890
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.0044a05d
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.00403de0
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.00403de0
cmp dword [ebp - 0x40], 0
je 0x407509
lea ecx, [ebp - 0x2c]
call fcn.00449ad8
push 0x4c9f28
lea ecx, [ebp - 0x4c]
call fcn.00411370
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.0040f890
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.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4c]
call fcn.00402470
push 0x4c9f28
lea ecx, [ebp - 0x54]
call fcn.00411370
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.0040f890
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.004024b0
add esp, 0xc
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x58]
call fcn.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x54]
call fcn.00402470
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4c9f28
lea ecx, [ebp - 0x60]
call fcn.00411370
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.0040f890
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.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x60]
call fcn.00402470
movzx edx, byte [ebp - 0x59]
test edx, edx
je 0x40760b
push 0x4c9f28
lea ecx, [ebp - 0x68]
call fcn.00411370
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.0040f890
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.004024b0
add esp, 0x14
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x6c]
call fcn.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x68]
call fcn.00402470
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 0x40765c
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.004024b0
add esp, 0x10
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x407686
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.004024b0
add esp, 0x14
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4c9f28
lea ecx, [ebp - 0x74]
call fcn.00411370
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.0040f890
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.0044a05d
mov dword [ebp - 0x70], eax
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x78]
call fcn.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x74]
call fcn.00402470
cmp dword [ebp - 0x70], 0
je 0x407872
lea ecx, [ebp - 0x2c]
call fcn.00449ad8
push 0x4c9f28
lea ecx, [ebp - 0x7c]
call fcn.00411370
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.0040f890
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.004024b0
add esp, 0xc
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0x80]
call fcn.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x7c]
call fcn.00402470
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x4c9f28
lea ecx, [ebp - 0x88]
call fcn.00411370
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.0040f890
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.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x88]
call fcn.00402470
movzx eax, byte [ebp - 0x81]
test eax, eax
je 0x407872
push 0x4c9f28
lea ecx, [ebp - 0x90]
call fcn.00411370
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.0040f890
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.00402470
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x90]
call fcn.00402470
cmp dword [ebp - 0x30], 0
je 0x4078b5
push 1
call fcn.00435150
add esp, 4
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x4078a1
push str.DoUpdate_WowFsRedirection__TRUE__Succeed.
mov ecx, dword [ebp - 0x180]
push ecx
call fcn.004028d0
add esp, 8
jmp 0x4078b5
push str.DoUpdate_WowFsRedirection__TRUE__Fail.
mov edx, dword [ebp - 0x180]
push edx
call fcn.004028d0
add esp, 8
mov dword [ebp - 0x98], 1
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00449fc9
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10]
call fcn.00402470
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
call fcn.00402470
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.00402470
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4