Function at 0x407ec0
Capabilities:
Delete directory
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x284
mov eax, dword [0x451430]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
lea edx, [ebp - 0xc]
push edx
push eax
mov dword [ebp - 0x270], ecx
call fcn.00423420
mov esi, eax
add esp, 8
mov dword [ebp - 0x27c], esi
mov byte [ebp - 0x25d], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407f01
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 0xc]
push eax
call fcn.0042e047
mov edi, eax
mov edx, edi
add esp, 4
mov dword [ebp - 0x268], edi
mov eax, esi
sub edx, esi
jmp 0x407f30
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x407f30
mov eax, edi
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x407f44
mov ecx, dword [0x440728]
mov dword [eax], ecx
mov edx, dword [0x44072c]
mov dword [eax + 4], edx
mov cx, word [0x440730]
mov word [eax + 8], cx
mov dword [ebp - 0x264], edi
mov dword [ebp - 0x274], 1
jmp 0x407f86
mov edi, dword [ebp - 0x264]
lea edx, [ebp - 0x25c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x26c], esi
mov byte [ebp - 0x25e], 0
je 0x408342
lea esp, [esp]
mov ecx, 0x440724
lea eax, [ebp - 0x230]
jmp 0x407fc0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407fe6
test dx, dx
je 0x407fe2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407fe6
add eax, 4
add ecx, 4
test dx, dx
jne 0x407fc0
xor eax, eax
jmp 0x407feb
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40831c
mov ecx, 0x44071c
lea eax, [ebp - 0x230]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x408026
test dx, dx
je 0x408022
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x408026
add eax, 4
add ecx, 4
test dx, dx
jne 0x408000
xor eax, eax
jmp 0x40802b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40831c
mov eax, edi
mov byte [ebp - 0x25e], 1
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408040
sub eax, edx
sar eax, 1
mov edx, eax
lea eax, [ebp - 0x230]
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408060
sub eax, esi
sar eax, 1
lea esi, [eax + edx]
lea esi, [esi + esi + 0xc]
push esi
call fcn.0042e047
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4083ec
push esi
push 0
push ebx
call fcn.0042d860
mov eax, edi
add esp, 0xc
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4080a0
sub eax, edx
sar eax, 1
add eax, 0xfffffffc
push eax
push edi
push ebx
call fcn.0042e589
push ebx
call fcn.00420840
add esp, 0x10
cmp word [ebx + eax*2 - 2], 0x5c
je 0x4080e3
mov edi, ebx
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4080d0
mov eax, dword [0x43fd14]
mov dword [edi], eax
lea eax, [ebp - 0x230]
mov edx, eax
jmp 0x4080f0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4080f0
mov edi, ebx
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x408102
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test byte [ebp - 0x25c], 0x10
je 0x40825e
push ebx
call fcn.00401c40
test al, al
jne 0x408244
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..WGUARDNT
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x408183
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..GlobalWGUARDNT
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x408183
xor esi, esi
jmp 0x4081a9
test esi, esi
je 0x4081a9
cmp esi, 0xffffffff
je 0x4081a9
push 0
lea ecx, [ebp - 0x284]
push ecx
push 0
push 0
push 0
push 0
push 0x9edb6510
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x4082f7
mov eax, ebx
add eax, 0xfffffffe
lea ecx, [ecx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x4081c0
mov ecx, dword [0x440728]
mov dword [eax], ecx
mov edx, dword [0x44072c]
mov dword [eax + 4], edx
mov cx, word [0x440730]
mov word [eax + 8], cx
mov eax, dword [ebp - 0x264]
cmp eax, dword [ebp - 0x268]
je 0x4081ff
push eax
call fcn.0042df6a
add esp, 4
push ebx
push str.DeleteDirectory_new_walk_dir__S_n
mov dword [ebp - 0x264], ebx
call fcn.0040c2f0
mov edx, dword [ebp - 0x26c]
add esp, 8
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
mov byte [ebp - 0x25d], 0
je 0x40845a
cmp esi, 0xffffffff
je 0x40845a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40845a
push ebx
push str.DeleteDirectory_dir__S_is_already_scheduled_n
call fcn.0040c2f0
add esp, 8
mov byte [ebp - 0x25d], 1
jmp 0x408307
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..WGUARDNT
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4082a8
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..GlobalWGUARDNT
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4082a8
xor esi, esi
jmp 0x4082ce
test esi, esi
je 0x4082ce
cmp esi, 0xffffffff
je 0x4082ce
push 0
lea edx, [ebp - 0x280]
push edx
push 0
push 0
push 0
push 0
push 0x9edb6510
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4082f7
push ebx
call fcn.00401c40
test al, al
jne 0x4082f0
mov eax, dword [ebp - 0x270]
push eax
push ebx
call fcn.004028c0
mov byte [ebp - 0x25d], 1
test esi, esi
je 0x408307
cmp esi, 0xffffffff
je 0x408307
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0042df6a
mov edi, dword [ebp - 0x264]
mov esi, dword [ebp - 0x26c]
add esp, 4
lea ecx, [ebp - 0x25c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x407fb0
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp byte [ebp - 0x25e], 0
jne 0x408349
mov byte [ebp - 0x25d], 1
mov eax, dword [ebp - 0x268]
cmp edi, eax
je 0x408496
mov bl, byte [ebp - 0x25d]
movzx eax, bl
push edi
push eax
push str.DeleteDirectory:_walk_end__rename__u__dir__S_n
call fcn.0040c2f0
add esp, 0xc
test bl, bl
je 0x40843e
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408380
sub eax, edx
sar eax, 1
push edi
mov word [edi + eax*2 - 8], cx
call fcn.00401c40
test al, al
jne 0x40843e
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..WGUARDNT
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4083fb
push 0
push 0x40000000
push 3
push 0
push 0
push SysReAllocString
push str..GlobalWGUARDNT
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4083fb
xor esi, esi
jmp 0x408421
mov edx, dword [ebp - 0x26c]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40844e
test esi, esi
je 0x408421
cmp esi, 0xffffffff
je 0x408421
push 0
lea ecx, [ebp - 0x278]
push ecx
push 0
push 0
push 0
push 0
push 0x9edb6510
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edx, dword [ebp - 0x270]
push edx
push edi
call fcn.004028c0
test esi, esi
je 0x40843e
cmp esi, 0xffffffff
je 0x40843e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0042df6a
add esp, 4
mov byte [ebp - 0x25d], 0
mov eax, dword [ebp - 0x268]
mov dword [ebp - 0x264], eax
mov eax, dword [ebp - 0x274]
add eax, 1
cmp eax, 0x3e8
mov dword [ebp - 0x274], eax
jne 0x407f80
push str.Giving_up_on_directory_deletion_after_1000_cycles_n
call fcn.0040c2f0
add esp, 4
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042d845
mov esp, ebp
pop ebp
ret 8
push eax
call fcn.0042df6a
add esp, 4
call fcn.00401000
mov esi, eax
test esi, esi
je 0x4084cc
cmp esi, 0xffffffff
je 0x4084cc
push 0
lea ecx, [ebp - 0x278]
push ecx
push 0
push 0
push 0
push 0
push 0x9edb6510
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edx, dword [ebp - 0x270]
mov eax, dword [ebp - 0x27c]
push edx
push eax
call fcn.004028c0
test esi, esi
mov bl, al
je 0x4084f1
cmp esi, 0xffffffff
je 0x4084f1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.0042d845
mov esp, ebp
pop ebp
ret 8