Function at 0x40ce60
Capabilities:
Copy file
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x4399b7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x63c
push esi
push edi
mov esi, ecx
push str._ZUpdate__Move_patch_files.
mov dword [esp + 0x38], esi
call fcn.00402f00
mov eax, dword [esi + 8]
mov edi, dword [eax]
add esp, 4
cmp edi, eax
mov byte [esp + 0xb], 0
mov dword [esp + 0xc], edi
je 0x40d45e
push ebx
push ebp
or ebx, 0xffffffff
jmp 0x40ceb1
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 8]
mov cl, byte [eax + 0x10c]
test cl, cl
jne 0x40d449
mov cl, byte [eax + 0x10d]
test cl, cl
je 0x40d449
push 0x100
lea ecx, [esp + 0x50]
push ecx
add eax, 4
push eax
call dword [sym.imp.SHLWAPI.dll_PathSearchAndQualifyA]
mov eax, dword [edi + 8]
lea edx, [esp + 0x14c]
push edx
add eax, 4
push eax
call fcn.0040b8a0
lea ebp, [esi + 0xc60]
lea ecx, [esp + 0x154]
push ebp
push ecx
call fcn.0040c2d0
mov edx, dword [edi + 8]
mov ecx, dword [edx + 0x108]
add esp, 0x10
cmp ecx, eax
je 0x40d018
lea eax, [esp + 0x14c]
push eax
lea ecx, [esp + 0x4c]
push ecx
call fcn.0040c1a0
mov edx, dword [eax]
push edx
lea eax, [esp + 0x258]
push str._ZUpdate__ERROR_:_Invalid_CRC__s
push eax
call fcn.0041b463
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
lea ecx, [esp + 0x150]
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.0040c1a0
mov esi, eax
push str.STR_137
mov dword [esp + 0x664], 0
call fcn.004021b0
push str.STR_138
mov edi, eax
call fcn.004021b0
push eax
mov eax, dword [esi]
push eax
push edi
lea ecx, [esp + 0x26c]
push str._s_:__s_n______Tip___s_n
push ecx
call fcn.0041b463
mov eax, dword [esp + 0x6c]
add eax, 0xfffffff0
add esp, 0x28
mov dword [esp + 0x654], ebx
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40cfe7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40cff1
sub eax, edx
push eax
lea eax, [esp + 0x250]
push eax
mov ecx, ebp
call fcn.00405160
mov edi, dword [esp + 0x14]
mov byte [esp + 0x13], 1
jmp 0x40d449
lea ecx, [esp + 0x14c]
push ecx
call fcn.0040b920
add esp, 4
test al, al
je 0x40d08f
lea edx, [esp + 0x14c]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0040c1a0
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x258]
push str._ZUpdate__This_file_is_must_restart_:__s
push edx
call fcn.0041b463
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d073
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
add esp, 4
mov byte [esi + 0xc64], 1
jmp 0x40d449
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.0040c1a0
mov esi, eax
lea eax, [esp + 0x154]
push eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x664], 1
call fcn.0040c1a0
mov edx, dword [esi]
mov eax, dword [eax]
push edx
push eax
lea ecx, [esp + 0x264]
push str._ZUpdate__Copy_patch_file_from__s__to___s
push ecx
call fcn.0041b463
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
add esp, 0x20
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d0f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x654], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d119
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
lea ecx, [esp + 0x50]
push ecx
call fcn.0040dce0
add esp, 8
test al, al
jne 0x40d20f
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.0040c1a0
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x258]
push str._ZUpdate__WARNNING_:_This_file_cannot_made_path_:__s
push edx
call fcn.0041b463
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d17f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.0040c1a0
mov esi, eax
push str.STR_139
mov dword [esp + 0x664], 2
call fcn.004021b0
push str.STR_140
mov edi, eax
call fcn.004021b0
push eax
mov eax, dword [esi]
push eax
push edi
lea ecx, [esp + 0x26c]
push str._s_:__s_n______Tip___s_n
push ecx
call fcn.0041b463
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
add esp, 0x28
mov dword [esp + 0x654], ebx
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d1fc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
mov ecx, ebp
call fcn.00405770
mov edi, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40d341
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x400
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.0040c1a0
mov ecx, dword [esp + 0x20]
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x25c]
push str._ZUpdate__ERROR_:_File_copy_error_:__s_:__s
push eax
call fcn.0041b463
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
add esp, 0x18
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d297
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.0040c1a0
mov esi, eax
push str.STR_141
mov dword [esp + 0x664], 3
call fcn.004021b0
push str.STR_125
mov edi, eax
call fcn.004021b0
mov ecx, dword [esi]
push eax
mov eax, dword [esp + 0x30]
push eax
push ecx
push edi
lea edx, [esp + 0x270]
push str._s_:__s_:__s_n______Tip___s_n
push edx
call fcn.0041b463
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
add esp, 0x2c
mov dword [esp + 0x654], ebx
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d319
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
mov ecx, ebp
call fcn.00405770
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [esp + 0x14]
mov byte [esp + 0x13], 1
jmp 0x40d449
lea edx, [esp + 0x4c]
push ebp
push edx
call fcn.0040c2d0
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 0x108]
add esp, 8
cmp edx, eax
je 0x40d43b
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.0040c1a0
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x258]
push str._ZUpdate__ERROR_:_CRC_error__s
push edx
call fcn.0041b463
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
add esp, 0x14
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d3a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
call fcn.00402f00
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.0040c1a0
mov esi, eax
push str.STR_142
mov dword [esp + 0x664], 4
call fcn.004021b0
push str.STR_125
mov edi, eax
call fcn.004021b0
push eax
mov eax, dword [esi]
push eax
push edi
lea ecx, [esp + 0x26c]
push str._s_:__s_n______Tip___s_n
push ecx
call fcn.0041b463
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
add esp, 0x28
mov dword [esp + 0x654], ebx
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d421
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x24c]
push eax
mov ecx, ebp
call fcn.00405770
mov edi, dword [esp + 0x14]
mov byte [esp + 0x13], 1
jmp 0x40d449
lea ecx, [esp + 0x14c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [esp + 0x3c]
mov edi, dword [edi]
cmp edi, dword [esi + 8]
mov dword [esp + 0x14], edi
jne 0x40cead
pop ebp
pop ebx
push str._ZUpdate__Move_patch_files_successfully_complete.
call fcn.00402f00
mov al, byte [esp + 0xf]
mov ecx, dword [esp + 0x648]
add esp, 4
test al, al
pop edi
sete al
pop esi
mov dword fs:[0], ecx
add esp, 0x648
ret