Function at 0x402580
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4556c0
mov eax, dword fs:[0]
push eax
sub esp, 0x160
push ebx
push esi
push edi
mov eax, dword [0x46b664]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
mov eax, dword [ecx + 0x1c]
mov edx, dword [eax]
add ecx, 0x1c
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
cmp edx, eax
je 0x4028ec
or edi, 0xffffffff
mov ebx, dword [esp + 0x14]
add ebx, 8
mov ecx, ebx
call fcn.00416f40
test al, al
je 0x4028d6
cmp dword [ebx + 0x14], 8
jb 0x4025ed
mov eax, dword [ebx]
jmp 0x4025ef
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x402746
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x46f734], 0
mov esi, eax
je 0x402646
push 0x46f710
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x20
mov dword [0x46f6e8], esi
mov dword [0x46f6ec], 0x45baac
mov dword [0x46f6f0], 1
mov word [0x46f6f4], ax
mov byte [0x46f6f6], 0
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040ddf0
add esp, 4
mov dword [esp + 0x178], 0
test eax, eax
je 0x402667
add eax, 0x10
jmp 0x402669
xor eax, eax
push str.Removing_directory_
push eax
call fcn.0040de50
mov esi, eax
push ebx
push esi
call fcn.0040e870
push 0x45bb14
push esi
call fcn.0040de50
mov dword [esp + 0x190], 1
lea edx, [esp + 0x34]
push edx
call fcn.00424d80
add esp, 0x1c
mov dword [esp + 0x178], edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x7c]
mov dword [esp + 0x10], eax
mov dword [esp + edx + 0x1c], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x178], 2
lea ecx, [esp + 0x34]
call fcn.0040dab0
mov dword [esp + 0x178], edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + edx + 0x1c], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], 4
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
mov dword [esp + ecx + 0x2c], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], edi
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x7c]
mov dword [esp + eax + 0x1c], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x10], ecx
mov dword [esp + 0x7c], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], edi
mov dword [esp + 0x7c], vtable.std::ios_base.0
mov edx, ecx
jmp 0x4028cd
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x46f734], 0
mov esi, eax
je 0x40278e
push 0x46f710
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, 0x45
mov dword [0x46f6e8], esi
mov dword [0x46f6ec], 0x45baac
mov dword [0x46f6f0], 1
mov word [0x46f6f4], ax
mov byte [0x46f6f6], 0
lea ecx, [esp + 0xc4]
push ecx
call fcn.0040ddf0
add esp, 4
mov dword [esp + 0x178], 7
test eax, eax
je 0x4027b2
add eax, 0x10
jmp 0x4027b4
xor eax, eax
push str.Removing_directory_failed_for_
push eax
call fcn.0040de50
mov esi, eax
push ebx
push esi
call fcn.0040e870
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
push str.:_EC
push esi
call fcn.0040de50
add esp, 0xc
push eax
call fcn.004050d0
mov dword [esp + 0x178], 8
lea edx, [esp + 0xc4]
push edx
call fcn.00424d80
add esp, 4
mov dword [esp + 0x178], edi
mov ecx, dword [esp + 0xc4]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x124]
mov dword [esp + 0x10], eax
mov dword [esp + edx + 0xc4], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x178], 9
lea ecx, [esp + 0xdc]
call fcn.0040dab0
mov dword [esp + 0x178], edi
mov ecx, dword [esp + 0xc4]
mov edx, dword [ecx + 4]
lea eax, [esp + 0xdc]
mov dword [esp + 0x10], eax
mov dword [esp + edx + 0xc4], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], 0xb
mov eax, dword [esp + 0xd4]
mov ecx, dword [eax + 4]
mov dword [esp + ecx + 0xd4], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], edi
mov edx, dword [esp + 0xc4]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x124]
mov dword [esp + eax + 0xc4], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x10], ecx
mov dword [esp + method.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x178], edi
mov dword [esp + method.std::ios_base.virtual_0], vtable.std::ios_base.0
mov edx, ecx
push edx
call fcn.0042fd7b
add esp, 4
mov eax, dword [esp + 0x14]
mov eax, dword [eax]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
cmp eax, dword [ecx]
jne 0x4025cd
push ecx
call fcn.004055b0
mov ecx, dword [esp + 0x170]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret