Function at 0x404150
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x874
mov eax, dword [0x4431cc]
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, ebp
push edi
mov dword [esp + 0x87c], eax
lea eax, [esp + 0x670]
push esi
push eax
call fcn.004145fa
lea ecx, [esp + 0x470]
push esi
push ecx
call fcn.004145fa
lea edx, [esp + 0x680]
push 0x4339c4
push edx
call fcn.004145d0
add esp, 0x18
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x674]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0xc], esi
jne 0x4041d6
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x870]
xor ecx, ebp
call fcn.00414a22
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esp, [esp]
push 1
lea edx, [esp + 0x40]
push 0x4339c0
push edx
call fcn.0041524b
add esp, 0xc
test eax, eax
je 0x4043a0
push 1
lea eax, [esp + 0x40]
push 0x4339b8
push eax
call fcn.0041524b
add esp, 0xc
test eax, eax
je 0x4043a0
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x260]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x468]
push ecx
lea edx, [esp + 0x264]
push edx
call fcn.004145fa
lea eax, [esp + 0x268]
push 0x4330e4
push eax
call fcn.004145d0
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x274]
push edx
call fcn.004145d0
add esp, 0x18
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x40428b
lea ecx, [esp + 0x260]
push ecx
call fcn.00404150
add esp, 4
jmp 0x40430e
lea edx, [esp + 0x3c]
push edx
mov ecx, 0x44d2d0
call fcn.00402680
push 0x80
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call ebx
test esi, esi
jne 0x4042ff
cmp eax, 2
je 0x4042ff
push 4
push esi
lea edx, [esp + 0x268]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
mov ecx, 0x44d2d0
je 0x4042f8
push str._:_file_deleted_r_n
call fcn.00402680
mov dword [0x44d2a0], 1
jmp 0x40430e
push str._:_failed_to_delete_file_r_n
jmp 0x404309
push str._:_file_deleted_r_n
mov ecx, 0x44d2d0
call fcn.00402680
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4041e0
call ebx
mov esi, eax
cmp esi, 0x12
jne 0x404389
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x80
lea eax, [esp + 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [esp + 0x468]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edi, eax
call ebx
test edi, edi
mov esi, eax
jne 0x404389
cmp esi, 2
je 0x404389
push 4
push edi
lea edx, [esp + 0x470]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x404389
mov dword [0x44d2a0], 1
mov ecx, dword [esp + 0x87c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414a22
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4041e0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x80
lea edx, [esp + 0x46c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x468]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov edi, eax
call ebx
test edi, edi
mov esi, eax
jne 0x404389
cmp esi, 2
je 0x404389
push 4
push edi
lea ecx, [esp + 0x470]
push ecx
jmp 0x404375