Function at 0x406920
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x429d8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x61c
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x63c]
mov dword [esp + 0x634], 1
push eax
push str._SafeExtractOrCopyFile__MoveType:__d__0:EXTRACT_1:COPY_
push 1
call fcn.004036f0
xor ebx, ebx
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x125]
mov byte [esp + 0x124], bl
mov byte [esp + 0x534], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x535]
mov byte [esp + 0x430], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x431]
mov byte [esp + 0x32c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x32d]
mov byte [esp + 0x228], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x229]
add esp, 0xc
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x21c]
lea edx, [esp + 0x320]
stosb byte es:[edi], al
push ecx
lea eax, [esp + 0x428]
push edx
lea ecx, [esp + 0x530]
push eax
push ecx
lea ecx, [esp + 0x654]
xor ebp, ebp
call fcn.00401650
push eax
call fcn.0041a2c7
lea edx, [esp + 0x24]
push edx
call fcn.00403cd0
add esp, 0x18
push str.rename_bak
lea ecx, [esp + 0x14]
mov byte [esp + 0x638], 2
call fcn.00401b30
lea ecx, [esp + 0x10]
call fcn.00401650
push eax
call fcn.004068e0
add esp, 4
test eax, eax
jne 0x406a7c
lea ecx, [esp + 0x10]
call fcn.00401650
push eax
call fcn.004041b0
add esp, 4
test eax, eax
jne 0x406a7c
push str._SafeExtractOrCopyFile__We_can_not_create_rename_bak_directory
push 1
call fcn.004036f0
add esp, 8
jmp 0x406baa
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor esi, esi
lea eax, [esp + 0x21c]
lea ecx, [esp + 0x320]
push eax
push esi
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401650
push eax
lea edx, [esp + 0x24]
push str._s_s__d__s.bak
push edx
call fcn.00419629
lea eax, [esp + 0x2c]
push eax
call fcn.004068e0
add esp, 0x1c
test eax, eax
je 0x406ae2
xor eax, eax
inc esi
mov ecx, 0x41
lea edi, [esp + 0x14]
cmp esi, 0xa
rep stosd dword es:[edi], eax
jl 0x406a92
jmp 0x406ae7
cmp esi, 0xa
jl 0x406afe
push esi
push 0xa
push str._SafeExtractOrCopyFile_bak_numbering___fail__MAX:__d__COUNT:__d_
push 1
call fcn.004036f0
add esp, 0x10
jmp 0x406baa
lea ecx, [esp + 0x644]
call fcn.00401650
push eax
call fcn.004068e0
add esp, 4
test eax, eax
je 0x406c08
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x648]
call fcn.00401650
push eax
call fcn.0041ac65
add esp, 8
cmp eax, ebx
je 0x406bec
sub eax, 2
je 0x406b71
sub eax, 0xb
je 0x406b62
sub eax, 9
je 0x406b53
push str.default
jmp 0x406b76
lea eax, [esp + 0x118]
push str.EINVAL
push eax
jmp 0x406b7e
lea ecx, [esp + 0x118]
push str.EACCES
push ecx
jmp 0x406b7e
push str.ENOENT
lea edx, [esp + 0x11c]
push edx
call fcn.00419629
mov edx, dword [esp + 0x64c]
add esp, 8
lea eax, [esp + 0x118]
lea ecx, [esp + 0x14]
push eax
push ecx
push edx
push str._SafeExtractOrCopyFile_rename___fail____s_____s__ErrMsg:__s
push 1
call fcn.004036f0
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x634], 1
call fcn.00401090
lea ecx, [esp + 0x640]
mov byte [esp + 0x634], bl
call fcn.00401090
lea ecx, [esp + 0x644]
mov dword [esp + 0x634], 0xffffffff
call fcn.00401090
xor eax, eax
jmp 0x406d3e
mov ecx, dword [esp + 0x644]
lea eax, [esp + 0x14]
push eax
push ecx
push str._SafeExtractOrCopyFile_rename___success____s_____s_
push 1
call fcn.004036f0
add esp, 0x10
mov eax, dword [esp + 0x63c]
cmp eax, 1
jne 0x406c59
push ebx
lea ecx, [esp + 0x648]
call fcn.00401650
push eax
lea ecx, [esp + 0x648]
call fcn.00401650
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ebp, eax
cmp ebp, ebx
jne 0x406cab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x644]
push eax
mov eax, dword [esp + 0x644]
push edx
push eax
push str._SafeExtractOrCopyFile_CopyFile___fail____s_____s___GetLastError___d_
jmp 0x406ca1
cmp eax, ebx
jne 0x406cab
lea ecx, [esp + 0x644]
call fcn.00401650
push eax
lea ecx, [esp + 0x644]
call fcn.00401650
push eax
call fcn.00404170
mov ebp, eax
add esp, 8
cmp ebp, ebx
jne 0x406cab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x644]
mov edx, dword [esp + 0x640]
push eax
push ecx
push edx
push str._SafeExtractOrCopyFile_Extract___fail____s_____s___GetLastError___d_
push 1
call fcn.004036f0
add esp, 0x14
lea ecx, [esp + 0x10]
call fcn.00401650
push eax
call fcn.004068e0
add esp, 4
test eax, eax
je 0x406cd3
lea ecx, [esp + 0x10]
call fcn.00401650
push eax
call fcn.004049a0
add esp, 4
cmp ebp, ebx
mov eax, str.success
jne 0x406ce1
mov eax, str.fail
mov ecx, dword [esp + 0x644]
mov edx, dword [esp + 0x640]
push ecx
push edx
push eax
push str._SafeExtractOrCopyFile____s____s_____s_
push 1
call fcn.004036f0
add esp, 0x14
lea ecx, [esp + 0x10]
mov byte [esp + 0x634], 1
call fcn.00401090
lea ecx, [esp + 0x640]
mov byte [esp + 0x634], bl
call fcn.00401090
lea ecx, [esp + 0x644]
mov dword [esp + 0x634], 0xffffffff
call fcn.00401090
mov eax, ebp
mov ecx, dword [esp + 0x62c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x628
ret