Function at 0x40d840
Capabilities:
Delete directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4805ed
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x496004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
xorps xmm0, xmm0
mov dword [ebp - 0x6c], 0
push 8
movlpd qword [ebp - 0x78], xmm0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x58], 0
mov word [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
call fcn.00436c01
xor ecx, ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], 0
add esp, 4
mov dword [ebp - 0x48], 3
mov word [eax], cx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x78]
push dword [edi]
call fcn.0040f070
test al, al
je 0x40d8fb
mov ebx, dword [ebp - 0x58]
mov eax, ebx
shr eax, 4
test al, 1
jne 0x40d91a
push 0x10b
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x50]
call fcn.00436a97
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x50]
shr ebx, 0xa
call fcn.00436a97
add esp, 4
test bl, 1
jne 0x40db53
mov esi, dword [edi + 4]
xor ecx, ecx
mov edx, 2
mov dword [ebp - 0x24], 0
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436c01
mov ecx, dword [edi + 4]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
lea ecx, [ecx*2 + 2]
push ecx
push dword [edi]
push eax
call fcn.00441f60
add esp, 0x10
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], ecx
jne 0x40d9a2
mov eax, ecx
add ecx, 0x10
shr eax, 1
add eax, ecx
lea ecx, [ebp - 0x24]
and eax, 0xfffffff0
dec eax
push eax
call fcn.00409aa0
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
mov edx, 0x5c
xor esi, esi
mov dword [ebp - 0x40], 0xffffffff
mov word [eax + ecx*2], dx
inc ecx
mov dword [ebp - 0x10], ecx
lea edx, [ecx + ecx]
mov word [edx + eax], si
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], ecx
mov byte [ebp - 4], 2
push 8
mov dword [ebp - 0x3c], esi
call fcn.00436c01
mov ebx, eax
mov dword [ebp - 0x38], esi
mov esi, 3
mov dword [ebp - 0x3c], ebx
xor eax, eax
mov dword [ebp - 0x34], esi
add esp, 4
mov word [ebx], ax
mov byte [ebp - 4], 3
mov edi, dword [ebp - 0x20]
cmp edi, esi
jbe 0x40da27
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00436c01
push ebx
mov esi, eax
call fcn.00436a97
mov ebx, esi
add esp, 8
mov esi, edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x34], esi
lea eax, [edi*2 + 2]
mov dword [ebp - 0x38], edi
push eax
push dword [ebp - 0x24]
push ebx
call fcn.00441f60
add esp, 0xc
cmp esi, edi
jne 0x40da5e
mov eax, edi
lea ecx, [ebp - 0x3c]
shr eax, 1
add edi, 0x10
add eax, edi
and eax, 0xfffffff0
dec eax
push eax
call fcn.00409aa0
mov edi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x3c]
xor ecx, ecx
mov eax, 0x2a
mov word [ebx + edi*2], ax
xorps xmm0, xmm0
lea eax, [edi + 1]
movlpd qword [ebp - 0x78], xmm0
mov word [ebx + eax*2], cx
push 8
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x58], ecx
mov word [ebp - 0x54], cx
call fcn.00436c01
add esp, 4
mov dword [ebp - 0x50], eax
xor ecx, ecx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 3
mov word [eax], cx
mov byte [ebp - 4], 4
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040fd70
test al, al
je 0x40db1c
nop dword [eax + eax]
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x50]
shr ebx, 4
and bl, 1
je 0x40db8a
test esi, esi
je 0x40db8a
cmp word [edi], 0x2e
jne 0x40db8a
cmp esi, 1
je 0x40db0c
cmp esi, 2
jne 0x40db8a
cmp word [edi + 2], 0x2e
jne 0x40db8a
lea eax, [ebp - 0x78]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040fd70
test al, al
jne 0x40dad0
push dword [ebp - 0x50]
call fcn.00436a97
push dword [ebp - 0x3c]
call fcn.00436a97
mov eax, dword [ebp - 0x40]
add esp, 8
cmp eax, 0xffffffff
je 0x40db3e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x24]
call fcn.00436a97
mov edi, dword [ebp - 0x18]
add esp, 4
cmp byte [0x498871], 0
mov eax, dword [edi]
jne 0x40dc2b
mov edx, eax
lea ecx, [ebp - 0x30]
call fcn.0040a910
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp - 0x30]
mov esi, eax
call fcn.00436a97
add esp, 4
test esi, esi
jmp 0x40dc36
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
cmp eax, ecx
jae 0x40dba6
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
mov word [ecx + eax], dx
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
sub eax, ecx
cmp esi, eax
jbe 0x40dbca
add ecx, esi
mov eax, ecx
add ecx, 0x10
shr eax, 1
add eax, ecx
lea ecx, [ebp - 0x24]
and eax, 0xfffffff0
dec eax
push eax
call fcn.00409aa0
mov ecx, dword [ebp - 0x20]
lea eax, [esi*2 + 2]
push eax
mov eax, dword [ebp - 0x24]
push edi
lea eax, [eax + ecx*2]
push eax
call fcn.00441f60
add dword [ebp - 0x20], esi
add esp, 0xc
test bl, bl
je 0x40dbf3
lea ecx, [ebp - 0x24]
call fcn.0040d840
jmp 0x40dbfb
mov ecx, dword [ebp - 0x24]
call fcn.0040d760
test al, al
jne 0x40dab8
push edi
call fcn.00436a97
push dword [ebp - 0x3c]
call fcn.00436a97
mov eax, dword [ebp - 0x40]
add esp, 8
cmp eax, 0xffffffff
je 0x40dc23
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x24]
jmp 0x40d8fe
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x40d906
cmp byte [0x498871], 0
mov eax, dword [edi]
jne 0x40dc82
mov edx, eax
lea ecx, [ebp - 0x3c]
call fcn.0040a910
push dword [eax]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push dword [ebp - 0x3c]
mov esi, eax
call fcn.00436a97
add esp, 4
test esi, esi
je 0x40d906
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x40d906
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret