Function at 0x40d8c0
Capabilities:
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x4217fc]
push ebx
mov ebx, dword [ebp + 8]
xor eax, ebp
push esi
push edi
mov dword [esp + 0x264], eax
mov byte [esp + 0x158], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x159]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
mov dword [esp + 0x14], ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x40d938
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
neg eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call esi
test eax, eax
je 0x40db0b
push ebx
call esi
cmp eax, 0xff
jbe 0x40d972
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
push 0x103
lea eax, [esp + 0x15c]
push ebx
push eax
call fcn.00412bd0
add esp, 0xc
lea ecx, [esp + 0x158]
push ecx
call esi
lea edx, [esp + 0x158]
push 0x5c
push edx
lea edi, [esp + eax + 0x160]
call fcn.00413410
add esp, 8
cmp eax, edi
je 0x40d9c8
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d9b7
mov ax, word [0x41d38c]
mov word [edi], ax
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d9d0
mov ecx, dword [0x41dc08]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x15c]
push eax
mov dword [edi], ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40db0b
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esp + 0x10]
push 0x103
push ecx
lea edx, [esp + 0x160]
push edx
call fcn.00412bd0
add esp, 0xc
lea eax, [esp + 0x44]
push eax
call esi
lea ecx, [esp + 0x158]
push ecx
mov edi, eax
call esi
add edi, eax
cmp edi, 0x103
ja 0x40da8f
lea edi, [esp + 0x158]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40da42
mov dx, word [0x41d38c]
lea eax, [esp + 0x44]
mov word [edi], dx
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40da60
lea edi, [esp + 0x158]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40da71
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
test byte [esp + 0x18], 0x10
je 0x40dabc
cmp byte [esp + 0x44], 0x2e
je 0x40dae1
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40dae1
push ebx
push eax
lea eax, [esp + 0x160]
push eax
call fcn.0040d8c0
add esp, 0xc
test eax, eax
je 0x40db0b
jmp 0x40dae1
push 0x80
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test ebx, ebx
jne 0x40dae1
lea edx, [esp + 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40da03
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
push edi
je 0x40db22
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, ebp
call fcn.0041277f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40db0b
mov esi, dword [esp + 0x10]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov ecx, dword [esp + 0x264]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041277f
mov esp, ebp
pop ebp
ret