Function at 0x140030870
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Get common file path
Set current directory

Disassembly:
push rdi
sub rsp, 0x6d0
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x6e8], rbx
mov rax, qword [0x140132280]
xor rax, rsp
mov qword [rsp + 0x6c0], rax
mov rdi, rcx
mov rdx, qword [rcx + 0xb0]
cmp byte [rdx + 0x2518], 0
je 0x140030b2f
add rdx, 0x2414
lea rcx, [rsp + 0x170]
sub rcx, rdx
nop word [rax + rax]
movzx eax, byte [rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400308d0
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030900
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x2518]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030910
lea rcx, [rsp + 0x170]
call fcn.140045f40
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030940
mov eax, dword [0x1401038d0]
mov dword [rcx], eax
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140030a70
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x4a0]
sub rdx, rcx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030990
lea rcx, [rsp + 0x4a0]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x4a0]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x1400309c0
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x2518]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400309d0
lea rcx, [rsp + 0x4a0]
call fcn.140045f40
lea rcx, [rsp + 0x4a0]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030a00
lea r8, [rsp + 0x5c]
xor edx, edx
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030a10
test byte [rsp + 0x30], 0x10
jne 0x140030a48
lea rcx, [rsp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x140030a48
xor edx, edx
lea rcx, [rsp + 0x4a0]
call fcn.140047940
xor edx, edx
mov r8d, 0x140
lea rcx, [rsp + 0x30]
call fcn.140065dd0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140030971
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x170]
sub rdx, rcx
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030a92
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
nop
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030ac0
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x2518]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030ad0
lea rdx, [rsp + 0x280]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [0x1400ba828]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor edx, edx
lea rcx, [rsp + 0x170]
call fcn.140047940
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, qword [rdi + 0xb0]
cmp byte [rcx + 0x8fe8], 0
je 0x140030f0f
add rcx, 0x2414
lea rdx, [rsp + 0x170]
sub rdx, rcx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030b60
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030b90
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x8fe8]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030ba0
lea rcx, [rsp + 0x170]
call fcn.140045f40
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030bd0
mov eax, dword [0x1401038d0]
mov dword [rcx], eax
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140030d52
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x390]
sub rdx, rcx
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030c20
lea rcx, [rsp + 0x390]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x390]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030c50
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x8fe8]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030c60
lea rcx, [rsp + 0x390]
call fcn.140045f40
lea rcx, [rsp + 0x390]
dec rcx
nop dword [rax]
inc rcx
cmp byte [rcx], 0
jne 0x140030c90
lea r8, [rsp + 0x5c]
xor edx, edx
nop
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030ca0
test byte [rsp + 0x30], 0x10
je 0x140030d09
movzx ecx, byte [rsp + 0x5c]
movzx eax, byte [rsp + 0x5d]
cmp cl, byte [0x140101908]
jne 0x140030cd1
cmp al, byte [0x140101909]
je 0x140030d2a
cmp cl, byte [0x1401038d4]
jne 0x140030cee
cmp al, byte [0x1401038d5]
jne 0x140030cee
movzx eax, byte [rsp + 0x5e]
cmp al, byte [0x1401038d6]
je 0x140030d2a
lea r8, [0x1401038d0]
lea rdx, [rsp + 0x390]
mov ecx, 1
call fcn.1400473d0
jmp 0x140030d17
lea rcx, [rsp + 0x390]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x140030d2a
xor edx, edx
lea rcx, [rsp + 0x390]
call fcn.140047940
xor edx, edx
mov r8d, 0x140
lea rcx, [rsp + 0x30]
call fcn.140065dd0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140030c01
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x170]
sub rdx, rcx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030d80
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030db0
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x8fe8]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030dc0
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030df3
xor edx, edx
nop
movzx eax, byte [r8 + rdx + 0x90ec]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030e00
lea rcx, [rsp + 0x170]
dec rcx
nop
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030e20
mov eax, dword [str..dat]
mov dword [rcx], eax
movzx eax, byte [0x1400ba830]
mov byte [rcx + 4], al
xor edx, edx
lea rcx, [rsp + 0x170]
call fcn.140047940
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x170]
sub rdx, rcx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030e70
lea rcx, [rsp + 0x170]
call fcn.140045f40
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
nop dword [rax]
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030ea0
xor edx, edx
nop dword [rax + rax]
movzx eax, byte [r8 + rdx + 0x8fe8]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030eb0
lea rdx, [rsp + 0x280]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [0x1400ba828]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor edx, edx
lea rcx, [rsp + 0x170]
call fcn.140047940
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
cmp byte [rcx], 0
je 0x14003110a
lea rdx, [rsp + 0x170]
sub rdx, rcx
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140030f31
lea rcx, [rsp + 0x170]
call fcn.140045f40
lea rcx, [rsp + 0x170]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030f57
movzx eax, word [0x1400ba834]
mov word [rcx], ax
movzx eax, byte [0x1400ba836]
mov byte [rcx + 2], al
mov r8, qword [rdi + 0xb0]
lea rcx, [rsp + 0x170]
dec rcx
lea rcx, [rcx + 1]
cmp byte [rcx], 0
jne 0x140030f86
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx + 0x261c]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140030fa0
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140031101
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
lea rdx, [rsp + 0x280]
sub rdx, rcx
nop dword [rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140031000
lea rcx, [rsp + 0x280]
call fcn.140045f40
lea rcx, [rsp + 0x280]
dec rcx
inc rcx
cmp byte [rcx], 0
jne 0x140031026
lea r8, [rsp + 0x5c]
xor edx, edx
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140031040
test byte [rsp + 0x30], 0x10
je 0x1400310bc
movzx ecx, byte [rsp + 0x5c]
movzx eax, byte [rsp + 0x5d]
cmp cl, byte [0x140101908]
jne 0x140031071
cmp al, byte [0x140101909]
je 0x1400310d9
cmp cl, byte [0x1401038d4]
jne 0x14003108e
cmp al, byte [0x1401038d5]
jne 0x14003108e
movzx eax, byte [rsp + 0x5e]
cmp al, byte [0x1401038d6]
je 0x1400310d9
lea r8, [0x1401038d0]
lea rdx, [rsp + 0x280]
mov ecx, 1
call fcn.1400473d0
test eax, eax
jne 0x1400310d9
xor edx, edx
lea rcx, [rsp + 0x280]
call fcn.140047940
jmp 0x1400310d9
xor edx, edx
lea rcx, [rsp + 0x280]
call fcn.140047940
lea rcx, [rsp + 0x280]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
xor edx, edx
mov r8d, 0x140
lea rcx, [rsp + 0x30]
call fcn.140065dd0
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140030fe0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x1cc
xor edx, edx
call fcn.140047940
lea rdx, [rsp + 0x5b0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rcx, [0x1400ba828]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov rcx, qword [rdi + 0xb0]
add rcx, 0x2414
xor edx, edx
call fcn.140047940
lea rcx, [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
nop
mov rcx, qword [rsp + 0x6c0]
xor rcx, rsp
call fcn.140063ed0
mov rbx, qword [rsp + 0x6e8]
add rsp, 0x6d0
pop rdi
ret