Function at 0x401340
Capabilities:
Set file attributes

Disassembly:
mov eax, 0x12b0
call fcn.004118b0
mov eax, dword [0x41a07c]
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 0x4013a0
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 0x40145b
test esi, esi
je 0x40145b
test byte [esi + 0x105c], bl
je 0x40145b
mov eax, dword [esp + 0x14]
mov ecx, 0x800
mov edx, esi
mov dword [esi + 0x1060], ebx
mov dword [esi + 0x103c], ebx
call fcn.00401090
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 fcn.00401030
add esp, 0x1c
push esi
mov dword [esi + 0x1058], edi
call ebp
add esp, 4
cmp dword [esi + 0x1064], 0
je 0x40146b
xor eax, eax
jmp 0x40164a
mov ecx, dword [esp + 0x14]
push ecx
push str._s
mov eax, 0x1000
lea ebx, [esp + 0x2c0]
call fcn.00401030
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 0x40157a
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCmpW]
push 0x416d6c
lea ecx, [esp + 0x98]
push ecx
call ebx
test eax, eax
je 0x40154a
push 0x416d70
lea edx, [esp + 0x98]
push edx
call ebx
test eax, eax
je 0x40154a
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 fcn.00401030
add esp, 0xc
test byte [esp + 0x68], 0x10
je 0x401526
cmp dword [esi + 0x1068], 0
jne 0x40154a
mov eax, dword [esp + 0x12c8]
lea edx, [esp + 0x18]
push edx
push esi
push ebp
push eax
mov ecx, ebx
push ecx
call fcn.00401340
add esp, 0x14
jmp 0x401548
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.004010e0
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 0x40156b
cmp dword [esi + 0x1064], 0
je 0x4014a4
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 0x401464
cmp dword [esi + 0x1068], 0
jne 0x401648
cmp dword [esp + 0x12c8], 0
jne 0x4015e1
mov eax, dword [esp + 0x14]
push eax
lea edi, [esp + 0x2bc]
call fcn.00401670
add esp, 4
test eax, eax
je 0x4015d5
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
and dword [esp + 0x10], eax
jne 0x4015dd
mov edx, dword [esp + 0x14]
push edx
mov eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x4015dd
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 0x4015f6
add dword [edx], ecx
adc dword [edx + 4], eax
test ebp, ebp
je 0x401648
mov edx, 8
test byte [esi + 0x105c], dl
je 0x401648
mov dword [esi + 0x1060], edx
mov dword [esi + 0x1050], ecx
mov dword [esi + 0x1054], eax
mov eax, dword [esp + 0x14]
mov ecx, 0x800
mov edx, esi
mov dword [esi + 0x103c], 1
call fcn.00401090
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.00408c7e
add esp, 0x12b0
ret