Function at 0x406520
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44ce55
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x45c00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
mov byte [eax], 1
call fcn.00405800
test eax, eax
jne 0x406baa
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0xd4]
mov byte [ebp - 0x2d], al
lea eax, [ebp - 0x2d]
push eax
mov ecx, dword [ecx]
push 0x15
call fcn.0040d690
add esp, 8
test eax, eax
jne 0x406baa
movzx eax, byte [edi + 0x8d]
lea esi, [edi + 0x80]
cmp dword [edi + 0x44], 3
mov dl, byte [edi + 0x35]
push eax
push esi
sete cl
call fcn.0040c3c0
xor eax, eax
lea ecx, [ebp - 0x28]
add esp, 8
mov dword [ebp - 0x28], eax
mov edx, esi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call fcn.0040c700
mov dword [ebp - 4], 0
cmp byte [ebp - 0x2d], 0
jne 0x4065d7
mov ecx, edi
call fcn.00405a30
mov ebx, dword [ebp - 0x24]
xor ecx, ecx
mov esi, 2
lea eax, [ebx + 1]
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
lea ecx, [ecx*2 + 2]
push ecx
push dword [ebp - 0x28]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x10
mov byte [ebp - 4], 1
cmp dword [edi + 0x44], 3
jne 0x40664d
mov edx, dword [ebp - 0x28]
movzx eax, word [edx]
mov ecx, eax
cmp eax, 0x5c
je 0x4066d0
cmp ecx, 0x2f
je 0x4066d0
or eax, 0x20
sub eax, 0x61
cmp eax, 0x19
ja 0x40664d
cmp word [edx + 2], 0x3a
je 0x4066d0
lea eax, [ebp - 0x1c]
push eax
lea edx, [edi + 0x5c]
lea ecx, [ebp - 0x4c]
call fcn.00405670
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 2
cmp eax, ecx
je 0x4066c1
mov eax, dword [eax + 4]
mov dword [ebp - 0x38], eax
cmp eax, ebx
jbe 0x4066a4
xor ecx, ecx
inc eax
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
push dword [ebp - 0x1c]
mov esi, eax
call fcn.00449b03
mov eax, dword [ebp - 0x38]
add esp, 8
mov dword [ebp - 0x1c], esi
mov esi, 2
mov dword [ebp - 0x14], eax
mov ebx, eax
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x18], ebx
push dword [eax]
push dword [ebp - 0x1c]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov byte [ebp - 4], 1
push dword [ebp - 0x4c]
call fcn.00449b03
add esp, 4
cmp byte [edi + 0x8c], 0
je 0x40675f
lea ecx, [edi + 0x94]
lea eax, [ebp - 0x1c]
cmp eax, ecx
je 0x40673c
cmp ebx, dword [ecx + 8]
jbe 0x40671e
xor ecx, ecx
lea eax, [ebx + 1]
mul esi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
push dword [edi + 0x94]
mov esi, eax
call fcn.00449b03
lea ecx, [edi + 0x94]
add esp, 8
mov dword [ecx], esi
mov dword [ecx + 8], ebx
lea eax, [ebx*2 + 2]
mov dword [ecx + 4], ebx
push eax
push dword [ebp - 0x1c]
push dword [ecx]
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea ecx, [edi + 0x94]
cmp byte [ebp - 0x2d], 0
je 0x406751
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
xor ebx, ebx
jmp 0x406b95
mov ecx, edi
call fcn.00407210
xor ebx, ebx
jmp 0x406b95
cmp byte [edi + 0x30], 0
jne 0x406788
mov esi, dword [ebp - 0x40]
lea eax, [ebp - 0x1c]
push esi
push eax
mov ecx, edi
call fcn.00405d00
mov ebx, eax
test ebx, ebx
jne 0x406b95
cmp byte [esi], al
jne 0x4067f2
mov ebx, dword [ebp - 0x18]
mov byte [esi], 1
lea ecx, [edi + 0x94]
lea eax, [ebp - 0x1c]
cmp eax, ecx
je 0x4067e6
cmp ebx, dword [ecx + 8]
jbe 0x4067ce
xor ecx, ecx
lea eax, [ebx + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00449b46
push dword [edi + 0x94]
mov esi, eax
call fcn.00449b03
lea ecx, [edi + 0x94]
add esp, 8
mov dword [ecx], esi
mov dword [ecx + 8], ebx
lea eax, [ebx*2 + 2]
mov dword [ecx + 4], ebx
push eax
push dword [ebp - 0x1c]
push dword [ecx]
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp byte [ebp - 0x2d], 0
je 0x4067f9
mov eax, dword [ebp - 0x40]
mov byte [eax], 0
xor ebx, ebx
jmp 0x406b95
push 0x18
call fcn.00449b08
mov ebx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x38], ebx
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 4], eax
mov dword [ebx], vtable.COutFileStream.0
mov dword [ebx + 8], 0xffffffff
mov byte [ebx + 0xc], al
mov dword [edi + 0xe8], ebx
mov byte [ebp - 4], 3
mov eax, dword [ebx]
push ebx
mov dword [ebp - 0x2c], ebx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4502ac]
call esi
mov byte [ebp - 4], 4
xor eax, eax
cmp byte [edi + 0x30], al
mov esi, dword [edi + 0xe8]
setne al
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
lea eax, [eax*2 + 2]
mov ecx, dword [esi + 8]
mov dword [ebp - 0x34], eax
cmp ecx, 0xffffffff
je 0x40688a
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4068ac
mov eax, dword [ebp - 0x34]
mov dword [esi + 8], 0xffffffff
push 0
push 0x80
push eax
push 0
push 1
push 0x40000000
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x4068c3
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
push str.Cannot_open_output_file
call fcn.00405520
mov ebx, eax
jmp 0x406b7e
mov cl, byte [edi + 0x3b]
mov byte [edi + 0x38], 1
test cl, cl
je 0x406a4a
mov edx, dword [edi + 0xdc]
mov eax, dword [edi + 0xd8]
test edx, edx
jne 0x4068ec
test eax, eax
je 0x406a4a
test edx, edx
ja 0x406a4a
jb 0x4068ff
cmp eax, 0x1000
jae 0x406a4a
cmp byte [edi + 0xd0], 0
je 0x406a4a
mov eax, dword [edi + 0xcc]
and eax, 0xf0000000
cmp eax, 0xa0000000
jne 0x406922
mov al, 1
jmp 0x406934
test dword [edi + 0xcc], 0x400
je 0x406a4a
xor al, al
mov edx, 0x37
mov ecx, edi
mov byte [ecx + edx], al
mov esi, dword [edi + 0xd8]
cmp esi, dword [edi + 0xf4]
je 0x40698c
mov eax, dword [edi + 0xf0]
test eax, eax
je 0x406969
push eax
call fcn.00449b03
add esp, 4
mov dword [edi + 0xf0], 0
mov dword [edi + 0xf4], 0
test esi, esi
je 0x40698c
push esi
call fcn.00449b46
add esp, 4
mov dword [edi + 0xf0], eax
mov dword [edi + 0xf4], esi
push 0x14
call fcn.00449b08
mov ecx, eax
add esp, 4
xor eax, eax
mov dword [ebp - 0x34], ecx
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 4], eax
mov dword [ecx], vtable.CBufPtrSeqOutStream.0
mov dword [edi + 0xf8], ecx
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4502ac]
call esi
mov ecx, dword [edi + 0xfc]
test ecx, ecx
je 0x4069df
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4502ac]
call esi
mov eax, dword [ebp - 0x34]
mov dword [edi + 0xfc], eax
mov edx, dword [edi + 0xf8]
mov ecx, dword [edi + 0xf4]
mov eax, dword [edi + 0xf0]
mov dword [edx + 8], eax
mov dword [edx + 0x10], 0
mov dword [edx + 0xc], ecx
mov ecx, dword [edi + 0xfc]
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x406a24
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4502ac]
call esi
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
test ecx, ecx
je 0x406a3d
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4502ac]
call esi
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x34]
mov dword [ecx], eax
jmp 0x406b46
cmp byte [edi + 0x2d], 0
je 0x406ae6
cmp byte [edi + 0x30], 0
jne 0x406aec
test cl, cl
je 0x406ae6
mov edx, dword [edi + 0xdc]
mov eax, dword [edi + 0xd8]
test edx, edx
jne 0x406a7d
cmp eax, 0x1000
jbe 0x406ae6
mov ecx, dword [edi + 0xe8]
push edx
add ecx, 8
mov dword [edi + 0xe0], eax
push eax
mov dword [edi + 0xe4], edx
call fcn.00424790
mov byte [edi + 0x3c], al
test al, al
jne 0x406aba
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
push str.Cannot_set_length_for_output_file
call fcn.00405520
mov ebx, eax
test ebx, ebx
jne 0x406b7e
mov ecx, dword [edi + 0xe8]
lea ecx, [ecx + 8]
call fcn.00424690
test al, al
jne 0x406ae6
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
push str.Cannot_seek_to_begin_of_file
call fcn.00405520
mov ebx, eax
test ebx, ebx
jne 0x406b7e
cmp byte [edi + 0x30], 0
je 0x406b15
mov ecx, dword [ebp - 0x38]
push 0
push 0
push dword [edi + 0xa4]
mov eax, dword [ecx]
push dword [edi + 0xa0]
push ecx
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x4502ac]
call esi
mov ebx, eax
test ebx, ebx
jne 0x406b7e
mov ebx, dword [ebp - 0x38]
push ebx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4502ac]
call esi
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax]
test ecx, ecx
je 0x406b44
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4502ac]
call esi
mov eax, dword [ebp - 0x3c]
mov dword [eax], ebx
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4502ac]
call esi
mov ecx, dword [edi + 0xec]
test ecx, ecx
je 0x406b70
mov eax, dword [ecx]
push ecx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4502ac]
call esi
mov eax, dword [ebp - 0x40]
mov dword [edi + 0xec], ebx
xor ebx, ebx
mov byte [eax], 0
mov ecx, dword [ebp - 0x38]
mov byte [ebp - 4], 5
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x4502ac]
call esi
push dword [ebp - 0x1c]
call fcn.00449b03
push dword [ebp - 0x28]
call fcn.00449b03
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00449a40
mov esp, ebp
pop ebp
ret 8