Function at 0x140005771
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 0x1400057e4
call sub.msvcrt.dll_strlen
cmp rax, 0x103
ja 0x140005818
test ebp, ebp
jne 0x140005840
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x140005818
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 0x140005818
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 0x140005a5e
ja case.0x14000583e.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 0x1400058af
cmp dl, 0x2f
je 0x1400058af
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 0x140005904
cmp dl, 0x2f
je 0x140005904
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 0x1400059e8
lea rcx, [rsp + 0x40]
lea r9, [rsp + 0x25c]
lea r8, [rsp + 0x38]
mov rdx, rdi
call fcn.1400047a3
test eax, eax
jne 0x1400059e8
lea rdx, [0x14001218b]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140005917
lea rdx, [0x14001218d]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140005917
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.1400042f9
test eax, eax
jne 0x140005917
test byte [rsp + 0x34], 0x10
je 0x1400059ce
mov rcx, r12
lea r8, [rsp + 0x25c]
mov edx, 1
call fcn.140005771
jmp 0x140005917
lea rdx, [rsp + 0x25c]
lea rcx, [rsp + 0x150]
call fcn.1400055ad
jmp 0x140005917
mov rcx, qword [rsp + 0x38]
call fcn.140004788
cmp dword [rsp + 0x25c], 0x12
je 0x140005a4a
cmp dword [rsp + 0x25c], 0
jne 0x140005818
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x140005818
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 0x140005818
mov dword [rsp + 0x25c], 0
jmp 0x1400059fc
mov edi, eax
jmp 0x140005ae0
cmp eax, 0x94
je 0x140005b2b
jbe 0x140005a8f
cmp eax, 0xb7
je 0x140005b47
cmp eax, 0x80070005
je 0x140005b4e
cmp eax, 0xaa
je 0x140005abf
mov edi, 0x40000001
jmp 0x140005ae0
cmp eax, 0x7f
ja 0x140005aad
cmp eax, 0x7e
jae 0x140005b32
cmp eax, 0x50
jne 0x140005b39
mov edi, 0x40000007
jmp 0x140005ae0
cmp eax, 0x91
jne 0x140005b40
mov edi, 0x4000000d
jmp 0x140005ae0
mov edi, 0x4000000d
jmp 0x140005ae0
mov edi, 0x40000003
jmp 0x140005ae0
mov edi, 0x40000009
jmp 0x140005ae0
mov edi, 0x4000000d
jmp 0x140005ae0
mov edi, 0x40000001
test rsi, rsi
je 0x140005ae7
mov dword [rsi], eax
test edi, edi
je 0x140005b5e
mov eax, edi
and eax, 0x3fffffff
test rbx, rbx
je 0x140005b55
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 0x140005ae0
mov edi, 0x4000000d
jmp 0x140005ae0
mov edi, 0x40000003
jmp 0x140005ae0
mov edi, 0x40000001
jmp 0x140005ae0
mov edi, 0x40000001
jmp 0x140005ae0
mov edi, 0x40000007
jmp 0x140005ae0
mov edi, 0x40000009
jmp 0x140005ae0
lea rbx, [0x14001139b]
jmp 0x140005af7
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 0x140005b14