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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5fcb3f
mov eax, dword fs:[0]
push eax
sub esp, 0x320
mov eax, dword [0x66d060]
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 eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x304], eax
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
push 8
mov dword [ebp - 4], eax
mov dword [ebp - 0x2f4], eax
mov dword [ebp - 0x2f0], eax
mov dword [ebp - 0x2ec], eax
mov dword [ebp - 0x2e8], eax
mov dword [ebp - 0x2e4], eax
call fcn.005540f2
add esp, 4
test eax, eax
jne 0x5831f2
call fcn.005ddebe
mov dword [ebp - 0x2f4], eax
lea ecx, [ebp - 0x2f4]
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebp - 0x2f4]
mov dword [eax], ecx
mov dword [ebp - 0x310], 0
mov dword [ebp - 0x30c], 0
mov dword [ebp - 0x308], 0
mov dword [ebp - 0x300], 0
mov dword [ebp - 0x2fc], 0
mov dword [ebp - 0x2f8], 0
push esi
mov byte [ebp - 4], 3
call fcn.00583f30
add esp, 4
test al, al
jne 0x583267
xor bl, bl
jmp 0x583a68
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov byte [ebp - 4], 4
cmp word [esi], ax
jne 0x583288
xor ecx, ecx
jmp 0x58329f
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x583290
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.00478000
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x2f4]
call fcn.004af430
push dword [ebp - 0x2e0]
lea eax, [ebp - 0x2d9]
push eax
push 0
push 0
call fcn.004794b0
push dword [ebp - 0x2e0]
lea eax, [ebp - 0x2d9]
xor ebx, ebx
push eax
push ebx
push ebx
mov dword [ebp - 0x30c], ebx
call fcn.004794b0
add esp, 0x20
mov dword [ebp - 0x2fc], ebx
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0x300]
push eax
call fcn.00477740
mov edi, dword [ebp - 0x2fc]
cmp dword [ebp - 0x2e4], ebx
je 0x583944
push 1
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x32c]
push eax
lea ecx, [ebp - 0x2f4]
call fcn.00461db0
mov ecx, eax
call fcn.00461dd0
mov edx, eax
mov eax, dword [edx]
test eax, eax
je 0x583340
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
dec ecx
and ecx, dword [edx + 8]
mov eax, dword [eax + ecx*4]
lea ecx, [ebp - 0x40]
cmp ecx, eax
je 0x58335e
push 0xffffffffffffffff
push 0
push eax
call fcn.00477ee0
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00491720
push 0x631c4c
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 5
push eax
call fcn.00491230
mov esi, eax
add esp, 0x18
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x5833fc
cmp dword [ebp - 0x44], 8
jb 0x5833a0
push dword [ebp - 0x58]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp dword [esi + 0x14], 8
jae 0x5833d2
mov eax, dword [esi + 0x10]
inc eax
je 0x5833dd
add eax, eax
push eax
lea eax, [ebp - 0x58]
push esi
push eax
call fcn.00553630
add esp, 0xc
jmp 0x5833dd
mov eax, dword [esi]
mov dword [ebp - 0x58], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x48], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x14], 8
jb 0x58340d
push dword [ebp - 0x28]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp - 0x5c], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 4
jb 0x583436
push dword [ebp - 0x70]
call fcn.00496180
add esp, 4
mov eax, dword [ebp - 0x2e8]
mov ecx, dword [ebp - 0x2e4]
dec eax
mov edx, dword [ebp - 0x2ec]
add ecx, eax
mov eax, dword [ebp - 0x2f0]
dec edx
and edx, ecx
mov esi, dword [eax + edx*4]
cmp dword [esi + 0x14], 8
jb 0x583467
push dword [esi]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, 0
mov word [esi], ax
dec dword [ebp - 0x2e4]
mov eax, dword [ebp - 0x2e8]
cmove eax, ecx
cmp dword [ebp - 0x44], 8
mov dword [ebp - 0x2e8], eax
lea ecx, [ebp - 0x2d8]
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
mov dword [ebp - 0x2e0], ebx
cmp ebx, 0xffffffff
je 0x583972
mov edi, edi
mov edx, 0x6318e0
lea ecx, [ebp - 0x2ac]
jmp 0x5834d0
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x5834f6
test ax, ax
je 0x5834f2
mov ax, word [ecx + 2]
cmp ax, word [edx + 2]
jne 0x5834f6
add ecx, 4
add edx, 4
test ax, ax
jne 0x5834d0
xor eax, eax
jmp 0x5834fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x58382c
mov eax, 0x631c44
lea ecx, [ebp - 0x2ac]
mov edi, edi
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x583536
test dx, dx
je 0x583532
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x583536
add ecx, 4
add eax, 4
test dx, dx
jne 0x583510
xor eax, eax
jmp 0x58353b
sbb eax, eax
or eax, 1
test eax, eax
je 0x58382c
test byte [ebp - 0x2d8], 0x10
je 0x583839
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00491720
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 6
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00491230
add esp, 0x18
mov ebx, eax
mov ecx, dword [ebp - 0x2e4]
mov edx, dword [ebp - 0x2ec]
inc ecx
mov byte [ebp - 4], 7
cmp edx, ecx
ja 0x5835a4
push 1
lea ecx, [ebp - 0x2f4]
call fcn.004af590
mov edx, dword [ebp - 0x2ec]
mov ecx, dword [ebp - 0x2e8]
dec edx
mov eax, dword [ebp - 0x2e4]
and ecx, edx
mov esi, dword [ebp - 0x2f0]
add eax, ecx
and edx, eax
mov dword [ebp - 0x2e8], ecx
lea eax, [edx*4]
cmp dword [eax + esi], 0
mov dword [ebp - 0x314], eax
jne 0x5835ff
push 0x18
call fcn.005540f2
add esp, 4
test eax, eax
je 0x5831ed
mov edx, dword [ebp - 0x314]
mov ecx, dword [ebp - 0x2f0]
mov dword [edx + ecx], eax
mov eax, edx
mov esi, dword [ebp - 0x2f0]
mov esi, dword [eax + esi]
test esi, esi
je 0x58365d
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebx + 0x14], 8
jae 0x583634
mov eax, dword [ebx + 0x10]
inc eax
je 0x58363e
add eax, eax
push eax
push ebx
push esi
call fcn.00553630
add esp, 0xc
jmp 0x58363e
mov eax, dword [ebx]
mov dword [esi], eax
mov dword [ebx], 0
mov eax, dword [ebx + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [ebx + 0x14], 7
mov dword [ebx + 0x10], 0
mov word [ebx], ax
inc dword [ebp - 0x2e4]
cmp dword [ebp - 0x14], 8
jb 0x583674
push dword [ebp - 0x28]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp - 0x5c], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 4
jb 0x58369d
push dword [ebp - 0x70]
call fcn.00496180
add esp, 4
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00491720
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 8
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00491230
add esp, 0x18
mov esi, eax
mov byte [ebp - 4], 9
cmp esi, edi
jae 0x583717
mov eax, dword [ebp - 0x300]
cmp eax, esi
ja 0x583717
sub esi, eax
mov eax, 0x2aaaaaab
imul esi
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
cmp edi, dword [ebp - 0x2f8]
jne 0x583709
push 1
lea ecx, [ebp - 0x300]
call fcn.00477d60
mov edi, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0x300]
lea eax, [esi + esi*2]
lea esi, [ecx + eax*8]
jmp 0x583732
cmp edi, dword [ebp - 0x2f8]
jne 0x583732
push 1
lea ecx, [ebp - 0x300]
call fcn.00477d60
mov edi, dword [ebp - 0x2fc]
test edi, edi
je 0x58378d
mov dword [edi + 0x14], 7
xor eax, eax
mov dword [edi + 0x10], 0
mov word [edi], ax
cmp dword [esi + 0x14], 8
jae 0x583764
mov eax, dword [esi + 0x10]
inc eax
je 0x58376e
add eax, eax
push eax
push esi
push edi
call fcn.00553630
add esp, 0xc
jmp 0x58376e
mov eax, dword [esi]
mov dword [edi], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
add edi, 0x18
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x2fc], edi
jb 0x5837a7
push dword [ebp - 0x28]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp - 0x5c], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 4
jb 0x5837d0
push dword [ebp - 0x70]
call fcn.00496180
add esp, 4
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00491720
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 0xa
push ecx
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00491230
add esp, 0x18
mov byte [ebp - 4], 4
cmp dword [ebp - 0x5c], 8
jb 0x583812
push dword [ebp - 0x70]
call fcn.00496180
add esp, 4
cmp dword [ebp - 0x74], 8
jb 0x583826
push dword [ebp - 0x88]
call fcn.00496180
add esp, 4
mov ebx, dword [ebp - 0x2e0]
test byte [ebp - 0x2d8], 0x10
jne 0x583909
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00491720
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 0xb
push ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00491230
add esp, 0x18
push eax
lea ecx, [ebp - 0x310]
mov byte [ebp - 4], 0xc
call fcn.004af3b0
cmp dword [ebp - 0x14], 8
jb 0x583887
push dword [ebp - 0x28]
call fcn.00496180
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp - 0x74], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 4
jb 0x5838b3
push dword [ebp - 0x88]
call fcn.00496180
add esp, 4
push 0x62ffe8
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x88]
push eax
call fcn.00491720
lea ecx, [ebp - 0x2ac]
mov byte [ebp - 4], 0xd
push ecx
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00491230
add esp, 0x18
mov byte [ebp - 4], 4
cmp dword [ebp - 0x74], 8
jb 0x5838f8
push dword [ebp - 0x88]
call fcn.00496180
add esp, 4
cmp dword [ebp - 0x5c], 8
jb 0x583909
push dword [ebp - 0x70]
call fcn.00496180
add esp, 4
lea eax, [ebp - 0x2d8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x5834c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
cmp eax, 0x12
jne 0x58395a
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 0x2e4], 0
jne 0x583314
mov ebx, dword [ebp - 0x30c]
mov esi, dword [ebp - 0x310]
cmp esi, ebx
je 0x5839a7
mov edi, edi
cmp dword [esi + 0x14], 8
jb 0x58398f
mov eax, dword [esi]
jmp 0x583991
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [ebp - 0x30c]
mov byte [ebp - 0x2d9], 0
jmp 0x5839ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x304]
mov ebx, dword [ebp - 0x30c]
mov byte [ebp - 0x2d9], 0
mov dword [ecx], eax
jmp 0x5839ef
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x583aba
add esi, 0x18
cmp esi, ebx
jne 0x583950
push dword [ebp - 0x2e0]
push edi
push dword [ebp - 0x300]
call fcn.004af710
mov esi, dword [ebp - 0x300]
add esp, 0xc
cmp esi, edi
je 0x5839e8
cmp dword [esi + 0x14], 8
jb 0x5839d0
mov eax, dword [esi]
jmp 0x5839d2
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x583aba
add esi, 0x18
cmp esi, edi
jne 0x5839c6
mov byte [ebp - 0x2d9], 1
cmp dword [ebp - 0x2c], 8
jb 0x583a00
push dword [ebp - 0x40]
call fcn.00496180
add esp, 4
mov esi, dword [ebp - 0x300]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
test esi, esi
je 0x583a3b
push dword [ebp - 0x2e0]
lea eax, [ebp - 0x2da]
push eax
push edi
push esi
call fcn.004794b0
push esi
call fcn.00496180
add esp, 0x14
mov esi, dword [ebp - 0x310]
test esi, esi
je 0x583a62
push dword [ebp - 0x2e0]
lea eax, [ebp - 0x2da]
push eax
push ebx
push esi
call fcn.004794b0
push esi
call fcn.00496180
add esp, 0x14
mov bl, byte [ebp - 0x2d9]
lea ecx, [ebp - 0x2f4]
call fcn.004af4f0
push dword [ebp - 0x2f4]
call fcn.00496180
add esp, 4
mov dword [ebp - 0x2f4], 0
cmp dword [ebp - 0x44], 8
jb 0x583a9c
push dword [ebp - 0x58]
call fcn.00496180
add esp, 4
mov al, bl
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.0055337c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x304]
mov byte [ebp - 0x2d9], 0
mov dword [ecx], eax
jmp 0x5839ef