Function at 0x401310
Capabilities:
Set file attributes

Disassembly:
mov eax, 0x12b0
call fcn.0040da20
mov eax, dword [0x41605c]
xor eax, esp
mov dword [esp + 0x12ac], eax
mov eax, dword [esp + 0x12c4]
mov edx, dword [esp + 0x12b4]
push ebx
push ebp
mov ebp, dword [esp + 0x12c4]
push esi
mov esi, dword [esp + 0x12cc]
mov dword [esp + 0x34], eax
xor eax, eax
mov ebx, 1
push edi
mov edi, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edi
mov ecx, 0x10
lea eax, [esp + 0x28]
mov edi, edi
mov byte [eax], 0
add eax, ebx
sub ecx, ebx
jne 0x401370
lea ecx, [esp + 0x44]
push ecx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov eax, dword [esp + 0x14]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test ebp, ebp
je 0x401426
test esi, esi
je 0x401426
test byte [esi + 0x105c], bl
je 0x401426
mov eax, dword [esp + 0x14]
mov edx, esi
mov dword [esi + 0x1060], ebx
mov dword [esi + 0x103c], ebx
call fcn.00401060
movzx ecx, word [esp + 0x34]
movzx edx, word [esp + 0x32]
movzx eax, word [esp + 0x30]
push ecx
movzx ecx, word [esp + 0x2c]
push edx
movzx edx, word [esp + 0x36]
push eax
movzx eax, word [esp + 0x36]
push ecx
push edx
push eax
push str._u__u__u__u:_u:_u
lea ebx, [esi + 0x1000]
mov eax, 0x3c
call section..text
add esp, 0x1c
push esi
mov dword [esi + 0x1058], edi
call ebp
add esp, 4
cmp dword [esi + 0x1064], 0
je 0x401436
xor eax, eax
jmp 0x401611
mov ecx, dword [esp + 0x14]
push ecx
push str._s
mov eax, 0x1000
lea ebx, [esp + 0x2c0]
call section..text
add esp, 8
lea edx, [esp + 0x68]
push edx
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x401546
nop
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCmpW]
push 0x412d5c
lea ecx, [esp + 0x98]
push ecx
call ebx
test eax, eax
je 0x401516
push 0x412d60
lea edx, [esp + 0x98]
push edx
call ebx
test eax, eax
je 0x401516
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x94]
push eax
push ecx
push str._s_s
mov eax, 0x1000
lea ebx, [esp + 0x2c4]
call section..text
add esp, 0xc
test byte [esp + 0x68], 0x10
je 0x4014f2
cmp dword [esi + 0x1068], 0
jne 0x401516
mov eax, dword [esp + 0x12c8]
lea edx, [esp + 0x18]
push edx
push esi
push ebp
push eax
mov ecx, ebx
push ecx
call fcn.00401310
add esp, 0x14
jmp 0x401514
mov edx, dword [esp + 0x88]
add dword [esp + 0x18], edx
push ebp
mov edx, esi
adc dword [esp + 0x20], 0
lea ecx, [esp + 0x2bc]
call fcn.004010c0
add esp, 4
and edi, eax
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x68]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x401537
cmp dword [esi + 0x1064], 0
je 0x401470
mov edx, dword [esp + 0x24]
push edx
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [esi + 0x1064], 0
jne 0x40142f
cmp dword [esi + 0x1068], 0
jne 0x40160f
cmp dword [esp + 0x12c8], 0
jne 0x4015ad
mov eax, dword [esp + 0x14]
push eax
lea edi, [esp + 0x2bc]
call fcn.00401630
add esp, 4
test eax, eax
je 0x4015a1
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and dword [esp + 0x10], eax
jne 0x4015a9
mov edx, dword [esp + 0x14]
push edx
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x4015a9
mov dword [esp + 0x10], 0
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
test edx, edx
je 0x4015c2
add dword [edx], ecx
adc dword [edx + 4], eax
test ebp, ebp
je 0x40160f
mov edx, 8
test byte [esi + 0x105c], dl
je 0x40160f
mov dword [esi + 0x1060], edx
mov dword [esi + 0x1054], eax
mov eax, dword [esp + 0x14]
mov edx, esi
mov dword [esi + 0x103c], 1
mov dword [esi + 0x1050], ecx
call fcn.00401060
mov ecx, edi
neg ecx
sbb ecx, ecx
and ecx, 2
push esi
mov dword [esi + 0x1058], ecx
call ebp
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x12bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405d7e
add esp, 0x12b0
ret