Function at 0x10021630
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004fe04
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push esi
push edi
push 0
push 0x10053860
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0xf
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x38], 0
call fcn.10001a10
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x38]
push eax
push esi
mov dword [ebp - 4], 0
call sym.KwLib.dll_int___cdecl_KwLib::Dir::ClearDir_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
test eax, eax
sete al
cmp dword [ebp - 0x24], 0x10
mov byte [ebp - 0x11], al
jb 0x100216ac
push dword [ebp - 0x38]
call ebx
mov al, byte [ebp - 0x11]
add esp, 4
test al, al
je 0x100216c3
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
push 1
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 1
push esi
push eax
call sym.KwLib.dll_int___cdecl_KwLib::Dir::FindDirs_class_std::vector_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____class_std::allocator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_______class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int_
mov edi, dword [ebp - 0x1c]
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x20]
je 0x10021809
mov esi, eax
cmp eax, edi
je 0x1002171a
push esi
call sym.KwLib.dll_int___cdecl_KwLib::Dir::DeleteDir_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 4
test eax, eax
je 0x10021809
add esi, 0x18
cmp esi, edi
jne 0x10021702
mov eax, dword [0x1006e3e8]
cmp eax, 0xffffffff
jne 0x1002175d
lea eax, [ebp - 0x34]
push eax
push 0xd698
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x10021753
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x10021753
mov dword [0x1006e3e8], 0x3a8
mov eax, 0x3a8
jmp 0x1002175d
mov eax, 0xd698
mov dword [0x1006e3e8], eax
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x68]
push eax
call fcn.10008690
add esp, 4
mov edx, eax
mov byte [ebp - 4], 2
cmp dword [edx + 0x14], 8
jb 0x1002177a
mov edx, dword [edx]
xor eax, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], ax
cmp word [edx], ax
jne 0x10021797
xor ecx, ecx
jmp 0x100217af
mov ecx, edx
lea esi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100217a0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x50]
call fcn.100026d0
cmp dword [ebp - 0x54], 8
jb 0x100217c7
push dword [ebp - 0x68]
call ebx
add esp, 4
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
cmovae eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ebx, eax
neg ebx
sbb ebx, ebx
neg ebx
cmp dword [ebp - 0x3c], 8
jb 0x100217f3
push dword [ebp - 0x50]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor eax, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], ax
jmp 0x1002180b
xor ebx, ebx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x1002184e
mov esi, eax
cmp eax, edi
je 0x10021844
cmp dword [esi + 0x14], 0x10
jb 0x10021829
push dword [esi]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
add esi, 0x18
cmp esi, edi
jne 0x10021818
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret