Function at 0x406f60
Capabilities:
Delete directory
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52c94d
mov eax, dword fs:[0]
push eax
sub esp, 0x310
mov eax, dword [0x56fcac]
xor eax, esp
mov dword [esp + 0x308], eax
push ebx
push esi
push edi
mov eax, dword [0x56fcac]
xor eax, esp
push eax
lea eax, [esp + 0x320]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
push 0xffffffffffffffff
push esi
mov edi, 7
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], esi
mov word [esp + 0x54], si
call fcn.00403310
push 0x548004
lea ebx, [esp + 0x48]
mov dword [esp + 0x32c], esi
call fcn.00404bb0
xor ebx, ebx
add esp, 4
cmp dword [esp + 0x58], ebx
je 0x406ff7
push 0x5c
lea esi, [esp + 0x48]
call fcn.004081b0
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xbc], edi
mov dword [esp + 0xb8], ebx
mov word [esp + 0xa8], bx
push 4
mov byte [esp + 0x32c], 2
call fcn.004aaa2e
add esp, 4
cmp eax, ebx
je 0x40704a
mov esi, eax
mov dword [eax], 0xffffffff
mov dword [esp + 0x20], esi
jmp 0x407050
mov dword [esp + 0x20], ebx
mov esi, ebx
mov dword [esp + 0x24], esi
push 0x547fd4
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x30]
push ecx
mov byte [esp + 0x334], 3
call fcn.00408600
add esp, 0xc
lea edx, [esp + 0x7c]
mov ecx, eax
mov edi, esi
mov byte [esp + 0x328], 4
call fcn.00406330
mov edi, 8
mov byte [esp + 0x328], 3
cmp dword [esp + 0x40], edi
mov bl, al
jb 0x4070aa
mov edx, dword [esp + 0x2c]
push edx
call fcn.004aaa59
add esp, 4
test bl, bl
je 0x407312
lea ecx, [esp + 0x7c]
call fcn.004089e0
test al, al
jne 0x40716e
mov eax, dword [esp + 0x9c]
and eax, 0x10
xor ecx, ecx
or eax, ecx
je 0x40712b
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.004086c0
add esp, 0xc
push eax
mov byte [esp + 0x32c], 5
call fcn.00406f60
add esp, 4
mov ebx, eax
mov byte [esp + 0x328], 3
cmp dword [esp + 0x40], edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edx
jb 0x407172
mov eax, dword [esp + 0x2c]
push eax
call fcn.004aaa59
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 4
jmp 0x407186
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.004086c0
add esp, 0xc
lea edi, [esp + 0x28]
call fcn.00406f10
cmp dword [esp + 0x40], 8
movzx eax, al
cdq
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
jb 0x40716e
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004aaa59
add esp, 4
mov ebx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x407186
call fcn.004aaa59
add esp, 4
mov esi, dword [esp + 0x20]
mov eax, dword [esi]
lea edx, [esp + 0xc4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
setne al
test al, al
je 0x40730e
lea esi, [esp + 0x7c]
lea ecx, [esp + 0xc4]
call fcn.00406440
mov edx, dword [esp + 0x9c]
mov eax, edx
and eax, 0x10
xor ecx, ecx
or eax, ecx
je 0x407234
mov ecx, dword [esp + 0xb8]
test ecx, ecx
je 0x407234
mov eax, dword [esp + 0xa8]
mov esi, 8
cmp dword [esp + 0xbc], esi
jae 0x4071ed
lea eax, [esp + 0xa8]
cmp word [eax], 0x2e
jne 0x407239
cmp ecx, 1
je 0x407182
jae 0x40720d
call fcn.004ec14b
mov ecx, dword [esp + 0xb8]
mov edx, dword [esp + 0x9c]
cmp dword [esp + 0xbc], esi
mov eax, dword [esp + 0xa8]
jae 0x407224
lea eax, [esp + 0xa8]
cmp word [eax + 2], 0x2e
jne 0x407239
cmp ecx, 2
je 0x407182
mov esi, 8
and edx, 0x10
mov eax, edx
xor ecx, ecx
or eax, ecx
je 0x407291
lea ecx, [esp + 0xa4]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x30]
push eax
call fcn.004086c0
add esp, 0xc
push eax
mov byte [esp + 0x32c], 6
call fcn.00406f60
add esp, 4
add ebx, eax
adc dword [esp + 0x18], edx
mov byte [esp + 0x328], 3
cmp dword [esp + 0x40], esi
jb 0x407182
mov ecx, dword [esp + 0x2c]
push ecx
jmp 0x40717a
lea edx, [esp + 0xa4]
push edx
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x30]
push ecx
call fcn.004086c0
mov eax, dword [esp + 0x38]
add esp, 0xc
cmp dword [esp + 0x40], esi
jae 0x4072b9
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, dword [esp + 0x2c]
and eax, 0xfffffffe
cmp dword [esp + 0x40], esi
jae 0x4072d1
lea ecx, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x40], esi
mov eax, dword [esp + 0x2c]
jae 0x4072e7
lea eax, [esp + 0x2c]
push eax
call edi
cmp eax, 1
sete dl
movzx eax, dl
cdq
add ebx, eax
adc dword [esp + 0x18], edx
cmp dword [esp + 0x40], esi
jb 0x407182
mov eax, dword [esp + 0x2c]
push eax
jmp 0x40717a
mov dword [esp + 0x14], ebx
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40732a
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x40732a
mov dword [esi], 0xffffffff
push 0x548004
lea ebx, [esp + 0x48]
call fcn.00404bb0
xor ebx, ebx
add esp, 4
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
lea ecx, [esp + 0x60]
mov byte [esp + 0x328], 8
call fcn.0043de00
test al, al
je 0x4073dc
push 0x548004
lea ebx, [esp + 0x64]
call fcn.00404bb0
mov eax, dword [esp + 0x4c]
add esp, 4
cmp dword [esp + 0x5c], 8
jae 0x407383
lea eax, [esp + 0x48]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x74]
push ecx
push eax
push edx
push 0
lea ecx, [esp + 0x70]
call fcn.00405e60
test eax, eax
jne 0x4073da
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
call fcn.004091d0
mov ebx, 8
add esp, 4
cmp dword [eax + 0x18], ebx
jb 0x4073bd
mov eax, dword [eax + 4]
jmp 0x4073c0
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp dword [esp + 0x40], ebx
jb 0x4073da
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004aaa59
add esp, 4
xor ebx, ebx
mov eax, dword [esp + 0x48]
mov edi, 8
cmp dword [esp + 0x5c], edi
jae 0x4073ef
lea eax, [esp + 0x48]
push 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x5c], edi
mov eax, dword [esp + 0x48]
jae 0x407406
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
mov edi, dword [esp + 0x14]
je 0x40741c
add edi, 1
adc dword [esp + 0x18], ebx
cmp dword [esp + 0x78], 8
jb 0x407430
mov edx, dword [esp + 0x64]
push edx
call fcn.004aaa59
add esp, 4
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], bx
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x407459
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x407459
mov dword [esi], 0xffffffff
push esi
call fcn.004aaa59
mov esi, 8
add esp, 4
cmp dword [esp + 0xbc], esi
jb 0x407480
mov eax, dword [esp + 0xa8]
push eax
call fcn.004aaa59
add esp, 4
cmp dword [esp + 0x5c], esi
mov dword [esp + 0xbc], 7
mov dword [esp + 0xb8], ebx
mov word [esp + 0xa8], bx
jb 0x4074ad
mov ecx, dword [esp + 0x48]
push ecx
call fcn.004aaa59
add esp, 4
mov edx, dword [esp + 0x18]
mov eax, edi
mov ecx, dword [esp + 0x320]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x308]
xor ecx, esp
call fcn.004ead41
mov esp, ebp
pop ebp
ret