Function at 0x1400057c1
Capabilities:
Delete directory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x260
mov rbx, rcx
mov ebp, edx
mov rsi, r8
mov dword [rsp + 0x25c], 0
test rcx, rcx
je 0x140005834
call sub.msvcrt.dll_strlen
cmp rax, 0x103
ja 0x140005868
test ebp, ebp
jne 0x140005890
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x140005868
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x25c], eax
mov dword [rsp + 0x20], eax
mov r9d, ebp
mov r8, rbx
lea rdx, str.fs_dir_delete
lea rcx, str._E____s_____RemoveDirectoryA_failed_path_s_recursive_d_gle_lu__n
call fcn.140002ef2
jmp 0x140005868
mov dword [rsp + 0x20], 0x12a
lea r9, str.C:_Projects_rdp_bot_codebase_fs.c
lea r8, str._path___NULL_
lea rdx, str.fs_dir_delete
lea rcx, [0x1400113e0]
call fcn.140002ef2
mov dword [rsp + 0x25c], 0xa0
mov eax, dword [rsp + 0x25c]
cmp eax, 0x20
ja 0x140005aae
ja case.0x14000588e.1
mov edx, eax
lea rcx, [0x1400121bc]
movsxd rdx, dword [rcx + rdx*4]
add rdx, rcx
jmp rdx
lea rdi, [rsp + 0x40]
mov eax, 0
mov ecx, 0x20
rep stosq qword [rdi], rax
mov dword [rdi], 0
lea rdi, [rsp + 0x150]
mov ecx, 0x20
rep stosq qword [rdi], rax
mov dword [rdi], 0
mov qword [rsp + 0x38], 0
lea rdi, [rsp + 0x40]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcpy
mov rcx, rdi
call sub.msvcrt.dll_strlen
movzx edx, byte [rsp + rax + 0x3f]
cmp dl, 0x5c
je 0x1400058ff
cmp dl, 0x2f
je 0x1400058ff
mov byte [rsp + rax + 0x41], 0
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov byte [rdi + rax], 0x5c
lea rdi, [rsp + 0x40]
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov word [rsp + rax + 0x40], 0x2a
lea rdi, [rsp + 0x150]
mov rdx, rbx
mov rcx, rdi
call sub.msvcrt.dll_strcpy
mov rcx, rdi
call sub.msvcrt.dll_strlen
movzx edx, byte [rsp + rax + 0x14f]
cmp dl, 0x5c
je 0x140005954
cmp dl, 0x2f
je 0x140005954
mov byte [rsp + rax + 0x151], 0
mov rcx, rdi
call sub.msvcrt.dll_strlen
mov byte [rdi + rax], 0x5c
lea rdi, [rsp + 0x150]
mov rcx, rdi
call sub.msvcrt.dll_strlen
add rdi, rax
cmp dword [rsp + 0x25c], 0
jne 0x140005a38
lea rcx, [rsp + 0x40]
lea r9, [rsp + 0x25c]
lea r8, [rsp + 0x38]
mov rdx, rdi
call fcn.1400047f3
test eax, eax
jne 0x140005a38
lea rdx, [0x14001218b]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140005967
lea rdx, [0x14001218d]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140005967
lea r12, [rsp + 0x150]
mov r9, r12
lea r8, [rsp + 0x40]
lea rdx, str.fs_dir_delete
lea rcx, str._D____s_____Delete_path_wc_s_f_path_s__n
call fcn.140002ef2
lea rdx, [rsp + 0x34]
lea r8, [rsp + 0x25c]
mov rcx, r12
call fcn.140004349
test eax, eax
jne 0x140005967
test byte [rsp + 0x34], 0x10
je 0x140005a1e
mov rcx, r12
lea r8, [rsp + 0x25c]
mov edx, 1
call fcn.1400057c1
jmp 0x140005967
lea rdx, [rsp + 0x25c]
lea rcx, [rsp + 0x150]
call fcn.1400055fd
jmp 0x140005967
mov rcx, qword [rsp + 0x38]
call fcn.1400047d8
cmp dword [rsp + 0x25c], 0x12
je 0x140005a9a
cmp dword [rsp + 0x25c], 0
jne 0x140005868
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x140005868
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x25c], eax
mov dword [rsp + 0x20], eax
mov r9d, ebp
mov r8, rbx
lea rdx, str.fs_dir_delete
lea rcx, str._E____s_____RemoveDirectoryA_failed_path_s_recursive_d_gle_lu__n
call fcn.140002ef2
jmp 0x140005868
mov dword [rsp + 0x25c], 0
jmp 0x140005a4c
mov edi, eax
jmp 0x140005b30
cmp eax, 0x94
je 0x140005b7b
jbe 0x140005adf
cmp eax, 0xb7
je 0x140005b97
cmp eax, 0x80070005
je 0x140005b9e
cmp eax, 0xaa
je 0x140005b0f
mov edi, 0x40000001
jmp 0x140005b30
cmp eax, 0x7f
ja 0x140005afd
cmp eax, 0x7e
jae 0x140005b82
cmp eax, 0x50
jne 0x140005b89
mov edi, 0x40000007
jmp 0x140005b30
cmp eax, 0x91
jne 0x140005b90
mov edi, 0x4000000d
jmp 0x140005b30
mov edi, 0x4000000d
jmp 0x140005b30
mov edi, 0x40000003
jmp 0x140005b30
mov edi, 0x40000009
jmp 0x140005b30
mov edi, 0x4000000d
jmp 0x140005b30
mov edi, 0x40000001
test rsi, rsi
je 0x140005b37
mov dword [rsi], eax
test edi, edi
je 0x140005bae
mov eax, edi
and eax, 0x3fffffff
test rbx, rbx
je 0x140005ba5
mov dword [rsp + 0x20], eax
mov r9d, ebp
mov r8, rbx
lea rdx, str.fs_dir_delete
lea rcx, str._E____s_____Failed_path_s_recursive_d_err_08x__n
call fcn.140002ef2
mov eax, edi
add rsp, 0x260
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
mov edi, 0x40000008
jmp 0x140005b30
mov edi, 0x4000000d
jmp 0x140005b30
mov edi, 0x40000003
jmp 0x140005b30
mov edi, 0x40000001
jmp 0x140005b30
mov edi, 0x40000001
jmp 0x140005b30
mov edi, 0x40000007
jmp 0x140005b30
mov edi, 0x40000009
jmp 0x140005b30
lea rbx, [0x14001139b]
jmp 0x140005b47
mov r9d, ebp
mov r8, rbx
lea rdx, str.fs_dir_delete
lea rcx, str._I____s_____Done_path_s_recursive_d__n
call fcn.140002ef2
jmp 0x140005b64