Function at 0x413260
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 0x413313
cmp word [eax], si
je 0x413313
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 0x413313
mov cx, word [eax]
cmp cx, si
je 0x413313
cmp cx, 0x5c
je 0x4132fe
lea ecx, [esp + 0x114]
push eax
push ecx
jmp 0x41330a
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 0x413360
mov eax, edi
dec eax
je 0x41334f
sub eax, 7
je 0x413339
mov eax, 0xa
mov dword [0x518a04], eax
mov dword [0x518a08], eax
jmp 0x413375
mov dword [0x518a08], 0xc
mov dword [0x518a04], 0xd
jmp 0x413375
mov eax, 0xb
mov dword [0x518a04], eax
mov dword [0x518a08], eax
jmp 0x413375
neg edi
mov dword [esp + 0x734], edi
mov dword [0x518a04], esi
mov dword [0x518a08], 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 0x413566
lea eax, [edi - 1]
cmp eax, 8
ja case.0x4133ab.7
jmp dword [eax*4 + 0x4137ac]
push ebx
push esi
push ebp
call fcn.004137d0
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.00413bd0
mov edi, eax
add esp, 0xc
test edi, edi
je 0x413434
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 0x4fafb4
push eax
push ebx
call fcn.004229c0
add esp, 0x50
jmp 0x4135f8
cmp dword [esp + 0x740], 0xffffffff
je case.0x4133ab.7
mov eax, dword [esp + 0x10]
test eax, eax
jle case.0x4133ab.7
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
je case.0x4133ab.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 0x433258
push edx
call dword [sym.imp.MSVCRT.dll_wcscat]
lea eax, [esp + 0x330]
push ebx
push eax
push ebp
call fcn.00413bd0
mov edi, eax
add esp, 0x20
test edi, edi
je case.0x4133ab.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 [0x4319a0]
lea ecx, [esp + 0x1c]
push eax
push 0x476a20
push ecx
push 0
push 0xffffffffffffffff
push 0
push 0x2ee
call fcn.004257a0
add esp, 0x24
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.00416d60
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.00417f00
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.0041edb0
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.004219a0
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.00421d20
add esp, 0xc
mov edi, eax
jmp 0x4135f8
push ebx
push esi
push ebp
call fcn.00419b70
add esp, 0xc
mov edi, eax
jmp 0x4135f8
cmp edi, 2
jne case.0x4133ab.7
push 0x2e
push esi
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
je case.0x4133ab.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 0x433258
push eax
call dword [sym.imp.MSVCRT.dll_wcscat]
lea ecx, [esp + 0x330]
push ebx
push ecx
push ebp
call fcn.00413bd0
mov edi, eax
add esp, 0x20
test edi, edi
je case.0x4133ab.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 [0x4319a0]
lea edx, [esp + 0x1c]
push ecx
push 0x476a20
push edx
jmp 0x4134e2
or edi, 0xffffffff
mov eax, dword [esp + 0x740]
cmp eax, 1
je 0x413608
test eax, eax
jne 0x413656
cmp word [esp + 0x114], 0
je 0x413656
cmp edi, 1
jge 0x413656
cmp dword [esp + 0x10], 1
jge 0x413656
lea eax, [esp + 0x114]
push 1
push eax
push esi
call fcn.00411020
add esp, 0xc
test eax, eax
je 0x41368c
mov ecx, dword [0x4319a0]
push ecx
push 0x476a20
push esi
push 0
push 0xffffffffffffffff
push 0
push 0x2ee
call fcn.004257a0
add esp, 0x1c
mov ecx, dword [esp + 0x10]
inc ecx
cmp word [esp + 0x114], 0
mov dword [esp + 0x10], ecx
jne 0x413674
cmp dword [esp + 0x734], 2
jne 0x4136d7
cmp dword [esp + 0x10], 2
jge 0x4136d7
cmp edi, 1
jge 0x4136d7
mov edi, dword [esp + 0x734]
jmp 0x41338a
push 0
push esi
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
jne 0x4136aa
push 0
push 0
push esi
call fcn.00412fd0
add esp, 0xc
mov edx, dword [0x4319a0]
push edx
push 0x476a20
push esi
push 0
push 0xffffffffffffffff
push 0
push 0x2f0
call fcn.004257a0
add esp, 0x1c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x71c
ret
cmp edi, 0xffffffff
jne 0x4136fb
push 0
push 0
push esi
call fcn.00412fd0
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 0x413723
mov eax, dword [0x4319a0]
mov ecx, dword [0x518a04]
push eax
push 0x476a20
push 0
push 0
push 0xffffffffffffffff
push 7
push ecx
call fcn.004257a0
add esp, 0x1c
test edi, edi
jl 0x41379a
cmp dword [esp + 0x734], 8
jne 0x413751
mov edx, dword [0x4319a0]
mov eax, dword [0x518a08]
push edx
push 0x476a20
push 0
push 0
push 0xffffffffffffffff
push 7
push eax
call fcn.004257a0
add esp, 0x1c
test edi, edi
jle 0x41379a
mov eax, dword [esp + 0x740]
cmp eax, 1
je 0x413766
cmp eax, 2
jne 0x41379a
cmp word [esp + 0x114], 0
je 0x41379a
lea ecx, [esp + 0x114]
push 0
push ecx
push esi
call fcn.00411020
add esp, 0xc
test eax, eax
jne 0x41378f
push 0xea60
jmp 0x413791
push 0
push esi
call fcn.00410090
add esp, 8
xor eax, eax
test edi, edi
pop edi
pop esi
pop ebp
pop ebx
setg al
add esp, 0x71c
ret