Function at 0x40b8c0
Capabilities:
Delete directory

Disassembly:
push 0xffffffffffffffff
push 0x45f3b9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
push ebx
mov eax, dword [esp + 0x12c]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x120], ebx
jne 0x40b8f5
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
push esi
push edi
push eax
lea eax, [esp + 0x28]
push 0x471478
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x23], 0x5c
jne 0x40b933
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x23], bl
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x40ba31
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x138]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40b996
mov edi, dword [esp + 0x138]
mov ecx, ebp
mov edx, ecx
lea esi, [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x138]
mov dword [esp + 0x13c], ebp
mov byte [eax + ebp], bl
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
push 1
lea edx, [esp + 0x17]
mov byte [esp + 0x17], 0x5c
mov eax, dword [ecx]
lea ecx, [esp + 0x138]
push eax
push edx
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::rfind_char_const___unsigned_int__unsigned_int_const]
push eax
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x140]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::substr_unsigned_int__unsigned_int_]
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x40b9d8
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
lea ecx, [esp + 0x28]
push 0x471478
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp eax, ebx
je 0x40ba20
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x40ba17
cmp al, 0xff
je 0x40ba17
dec al
mov byte [ecx], al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jmp 0x40b933
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jmp 0x40b933
mov ecx, dword [esp + 0x138]
pop edi
pop esi
cmp ecx, ebx
pop ebp
je 0x40ba5b
mov al, byte [ecx - 1]
cmp al, bl
je 0x40ba51
cmp al, 0xff
je 0x40ba51
dec al
mov byte [ecx - 1], al
jmp 0x40ba5b
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x118]
pop ebx
mov dword fs:[0], ecx
add esp, 0x120
ret 0x10