Function at 0x406280
Capabilities:
Copy file
Set file attributes

Disassembly:
sub esp, 0x71c
push ebx
push ebp
push esi
push edi
xor esi, esi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x116]
mov word [esp + 0x114], si
mov word [esp + 0x14], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x31c], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x31e]
mov dword [esp + 0x10], esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x744]
cmp eax, esi
je 0x406333
cmp word [eax], si
je 0x406333
push eax
lea eax, [esp + 0x118]
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esp + 0x750]
add esp, 8
cmp eax, esi
je 0x406333
mov cx, word [eax]
cmp cx, si
je 0x406333
cmp cx, 0x5c
je 0x40631e
lea ecx, [esp + 0x114]
push eax
push ecx
jmp 0x40632a
add eax, 2
lea edx, [esp + 0x114]
push eax
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 8
mov edi, dword [esp + 0x734]
cmp edi, esi
jle 0x406380
mov eax, edi
dec eax
je 0x40636f
sub eax, 7
je 0x406359
mov eax, 0xa
mov dword [0x4f0cd8], eax
mov dword [0x4f0cdc], eax
jmp 0x406395
mov dword [0x4f0cdc], 0xc
mov dword [0x4f0cd8], 0xd
jmp 0x406395
mov eax, 0xb
mov dword [0x4f0cd8], eax
mov dword [0x4f0cdc], eax
jmp 0x406395
neg edi
mov dword [esp + 0x734], edi
mov dword [0x4f0cd8], esi
mov dword [0x4f0cdc], esi
mov ebx, dword [esp + 0x73c]
mov esi, dword [esp + 0x738]
mov ebp, dword [esp + 0x730]
push 4
push esi
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
je 0x40656c
lea eax, [edi - 1]
cmp eax, 8
ja case.0x4063cb.7
jmp dword [eax*4 + 0x4067c8]
push ebx
push esi
push ebp
call fcn.004067f0
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.00406bf0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x406454
lea eax, [esp + 0x524]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov eax, dword [esp + 0x748]
push 0
push 0
push 0
push 0
xor ecx, ecx
push 0
push 0
test eax, eax
push 0
push 0
setl cl
push 0
dec ecx
lea edx, [esp + 0x140]
push 0
push 0
and ecx, edx
push 0
push ecx
push 0
push 0
lea eax, [esp + 0x568]
push 0x457720
push eax
push ebx
call fcn.00414a40
add esp, 0x50
jmp 0x4065fe
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
je case.0x4063cb.7
sub eax, esi
lea ecx, [esp + 0x31c]
sar eax, 1
push eax
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
lea edx, [esp + 0x328]
push 0x42a98c
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
lea eax, [esp + 0x330]
push ebx
push eax
push ebp
call fcn.00406bf0
mov edi, eax
add esp, 0x20
test edi, edi
je case.0x4063cb.7
push 0
lea ecx, [esp + 0x320]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea edx, [esp + 0x14]
push str.Restored_configuration.ini_from_.bk__Error:_file_not_readable
push edx
call dword [sym.imp.MSVCRT.dll_swprintf]
mov eax, dword [0x42e9f0]
lea ecx, [esp + 0x1c]
push eax
push 0x46b9e0
push ecx
push 0
push 0xffffffffffffffff
push 0
push 0x2ee
call fcn.004247e0
add esp, 0x24
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.004096c0
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.0040a510
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.00411210
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.00413dd0
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.00413f90
add esp, 0xc
mov edi, eax
jmp 0x4065fe
push ebx
push esi
push ebp
call fcn.0040c010
add esp, 0xc
mov edi, eax
jmp 0x4065fe
cmp edi, 2
jne case.0x4063cb.7
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
je case.0x4063cb.7
sub eax, esi
lea edx, [esp + 0x31c]
sar eax, 1
push eax
push esi
push edx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
lea eax, [esp + 0x328]
push 0x42a98c
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
lea ecx, [esp + 0x330]
push ebx
push ecx
push ebp
call fcn.00406bf0
mov edi, eax
add esp, 0x20
test edi, edi
je case.0x4063cb.7
push 0
lea edx, [esp + 0x320]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea eax, [esp + 0x14]
push str.Restored_configuration.ini_.bk__Error:_file_not_found
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
mov ecx, dword [0x42e9f0]
lea edx, [esp + 0x1c]
push ecx
push 0x46b9e0
push edx
jmp 0x4064e8
or edi, 0xffffffff
mov eax, dword [esp + 0x740]
cmp eax, 1
je 0x40660e
test eax, eax
jne 0x406665
cmp word [esp + 0x114], 0
je 0x406665
cmp edi, 1
jge 0x406665
cmp dword [esp + 0x10], 1
jge 0x406665
lea eax, [esp + 0x114]
push 1
push eax
push esi
call fcn.004041c0
add esp, 0xc
test eax, eax
je 0x406695
mov ecx, dword [0x42e9f0]
push ecx
push 0x46b9e0
push esi
push 0
push 0xffffffffffffffff
push 0
push 0x2ee
call fcn.004247e0
mov eax, dword [esp + 0x75c]
add esp, 0x1c
jmp 0x406669
inc dword [esp + 0x10]
mov edx, dword [esp + 0x10]
inc edx
cmp word [esp + 0x114], 0
mov dword [esp + 0x10], edx
je 0x4066e0
mov ecx, edx
cmp ecx, 2
jge 0x4066e0
cmp edi, 1
jge 0x4066e0
mov edi, dword [esp + 0x734]
jmp 0x4063aa
push 0
push esi
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x4066b3
push 0
push 0
push esi
call fcn.00405ff0
add esp, 0xc
mov edx, dword [0x42e9f0]
push edx
push 0x46b9e0
push esi
push 0
push 0xffffffffffffffff
push 0
push 0x2f0
call fcn.004247e0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
cmp edi, 0xffffffff
jne 0x406704
push 0
push 0
push esi
call fcn.00405ff0
add esp, 0xc
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
setg al
add esp, 0x71c
ret
test edi, edi
jle 0x406733
mov eax, dword [0x42e9f0]
mov ecx, dword [0x4f0cd8]
push eax
push 0x46b9e0
push 0
push 0
push 0xffffffffffffffff
push 7
push ecx
call fcn.004247e0
mov eax, dword [esp + 0x75c]
add esp, 0x1c
test edi, edi
jne 0x406773
cmp dword [esp + 0x734], 8
jne 0x4067b3
mov edx, dword [0x42e9f0]
mov eax, dword [0x4f0cdc]
push edx
push 0x46b9e0
push 0
push 0
push 0xffffffffffffffff
push 7
push eax
call fcn.004247e0
add esp, 0x1c
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
setg al
add esp, 0x71c
ret
jle 0x4067b3
cmp eax, 1
je 0x40677f
cmp eax, 2
jne 0x4067b3
cmp word [esp + 0x114], 0
je 0x4067b3
lea ecx, [esp + 0x114]
push 0
push ecx
push esi
call fcn.004041c0
add esp, 0xc
test eax, eax
jne 0x4067a8
push 0xea60
jmp 0x4067aa
push 0
push esi
call fcn.00419c30
add esp, 8
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
setg al
add esp, 0x71c
ret