Function at 0x406683
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x412604
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x288
push ebx
push esi
push edi
mov edi, ecx
mov bl, dl
mov ecx, dword [edi]
mov byte [esp + 0x13], bl
call fcn.00403cbe
test al, al
je 0x4068df
push edi
lea ecx, [esp + 0x20]
call fcn.0040525c
xor ebx, ebx
mov dword [esp + 0x29c], ebx
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x32
jle 0x4066f9
push ebx
push 0x42c7ec
push 0x42c7f4
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp + 8]
lea ecx, [esp + 0x20]
call fcn.004054fc
mov eax, dword [0x471d5c]
test eax, eax
je 0x40671d
lea ecx, [esp + 0x40]
push ecx
push dword [esp + 0x20]
call eax
mov esi, eax
jmp 0x40671f
mov esi, ebx
test esi, esi
je 0x4068a6
cmp esi, 0xffffffff
je 0x4068a6
push 0x2e
mov byte [esp + 0x16], 1
mov dword [esp + 0x18], 0x15
pop ecx
cmp word [esp + 0x6c], cx
jne 0x406753
cmp word [esp + 0x6e], 0
je 0x406825
mov ecx, dword [0x42bf80]
xor edx, edx
mov eax, ecx
div dword [esp + 0x14]
push 0x2e
mov dword [edx*4 + 0x42bf80], ecx
inc dword [0x42bf80]
pop ecx
cmp word [esp + 0x6c], cx
jne 0x40678b
cmp word [esp + 0x6e], cx
jne 0x40678b
cmp word [esp + 0x70], 0
je 0x406825
push edi
lea ecx, [esp + 0x2c]
call fcn.0040525c
push 2
pop ecx
mov byte [esp + 0x29c], cl
push 0xffffffffffffffff
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x3c]
call fcn.004052a7
mov byte [esp + 0x29c], 3
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x2c]
call fcn.004054fc
push 2
pop eax
mov byte [esp + 0x29c], al
lea ecx, [esp + 0x34]
call fcn.004055a6
mov dword [esp + 0x18], 1
mov eax, dword [esp + 0x18]
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x32
jle 0x406800
push ebx
push 0x42c7ec
push 0x42c7f4
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp + 8]
mov dl, byte [esp + 0x17]
lea ecx, [esp + 0x2c]
call fcn.00406683
and byte [esp + 0x16], al
pop ecx
mov byte [esp + 0x29c], bl
lea ecx, [esp + 0x28]
call fcn.004055a6
mov eax, dword [0x47310c]
test eax, eax
je 0x406838
lea ecx, [esp + 0x40]
push ecx
push esi
call eax
jmp 0x40683a
mov eax, ebx
push 0x2e
pop ecx
test eax, eax
jne 0x406740
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x4068c4
mov eax, dword [0x471974]
test eax, eax
je 0x40685c
push esi
call eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
lea ebx, [eax - 1]
neg ebx
sbb bl, bl
inc bl
je 0x40688b
mov ecx, dword [0x42bf80]
push 0x15
xor edx, edx
mov eax, ecx
pop esi
div esi
mov dword [edx*4 + 0x42bf80], ecx
inc dword [0x42bf80]
and byte [esp + 0x12], bl
jne 0x4068c8
mov eax, dword [0x42bf84]
push 2
cmp eax, 1
pop ecx
cmove eax, ecx
mov dword [0x42bf84], eax
jmp 0x4068c8
mov ecx, dword [0x42bf80]
push 0x15
xor edx, edx
mov eax, ecx
pop esi
div esi
mov bl, 1
mov dword [edx*4 + 0x42bf80], ecx
inc dword [0x42bf80]
mov byte [esp + 0x12], bl
or dword [esp + 0x29c], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.004055a6
mov al, byte [esp + 0x12]
jmp 0x4068e8
mov ecx, dword [edi]
mov dl, bl
call fcn.00406a74
mov ecx, dword [esp + 0x294]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret