Function at 0x140036940
Capabilities:
Delete directory
Move file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x3d0]
sub rsp, 0x4d0
mov rax, qword [0x1400c7070]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov rsi, rcx
add rcx, 0x48
call qword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
mov edx, dword [rsi + 8]
lea r8, str.Rmdir
test eax, eax
je 0x140036d5b
xor r12d, r12d
mov qword [rsp + 0x48], r12
mov r9, qword [rsi + 0x70]
lea rcx, str._i:__s_Begin__Path_s._n
call fcn.14005cb30
mov rcx, qword [rsi + 0x70]
test rcx, rcx
je 0x1400369eb
lea rdx, [rsp + 0x48]
call fcn.14005bc00
test al, al
je 0x1400369eb
mov rbx, qword [rsp + 0x48]
mov r9, rbx
lea r8, str.Rmdir
mov edx, dword [rsi + 8]
lea rcx, str._i:__s_Begin__Path_s._n
call fcn.14005cb30
mov rcx, qword [rsi + 0x70]
call fcn.140069370
mov qword [rsi + 0x70], rbx
mov rbx, qword [rsi + 0x70]
test rbx, rbx
je 0x140036d20
cmp word [rbx], r12w
je 0x140036d20
xor edx, edx
mov r8d, 0x410
lea rcx, [rbp - 0x50]
call fcn.1400659a0
mov rdx, rbx
lea rcx, [rbp - 0x50]
call qword [sym.imp.SHLWAPI.dll_PathCanonicalizeW]
test eax, eax
je 0x140036a3a
mov rcx, qword [rsi + 0x70]
call fcn.140069370
lea rcx, [rbp - 0x50]
call fcn.140069798
mov qword [rsi + 0x70], rax
mov r9, qword [rsi + 0x70]
lea r8, str.Rmdir
mov edx, dword [rsi + 8]
lea rcx, str._i:__s_Begin__Path_s._n
call fcn.14005cb30
xorps xmm0, xmm0
movups xmmword [rsp + 0x50], xmm0
movups xmmword [rsp + 0x60], xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
lea rdx, str.SeRestorePrivilege
lea rcx, [rsp + 0x50]
call fcn.14005ad00
nop
movzx eax, byte [rsi + 0x78]
cmp byte [rsi + 0x79], 0
jne 0x140036cb3
test al, al
je 0x140036c87
mov rdi, r12
mov rcx, qword [rsi + 0x80]
test rcx, rcx
je 0x140036bac
cmp word [rcx], di
je 0x140036bac
mov qword [rsp + 0x48], r12
lea rdx, [rsp + 0x48]
call fcn.14005bc00
test al, al
je 0x140036afa
mov rbx, qword [rsp + 0x48]
mov r9, rbx
lea r8, str.Rmdir
mov edx, dword [rsi + 8]
lea rcx, str._i:__s_Begin__SkipFolders_s._n
call fcn.14005cb30
mov rcx, qword [rsi + 0x80]
call fcn.140069370
mov qword [rsi + 0x80], rbx
mov rcx, qword [rsi + 0x80]
test rcx, rcx
je 0x140036bac
cmp word [rcx], di
je 0x140036bac
call fcn.140069798
mov r14, rax
mov qword [rsp + 0x48], r12
lea r8, [rsp + 0x48]
lea rdx, [0x1400aa794]
mov rcx, rax
call fcn.14006f1f0
mov rbx, rax
test rax, rax
je 0x140036ba4
nop dword [rax]
test rdi, rdi
jne 0x140036b5b
lea ecx, [rdi + 0x18]
call fcn.140062618
mov rdi, rax
mov qword [rax], r12
mov qword [rax + 8], r12
mov qword [rax + 0x10], r12
mov rcx, rbx
call fcn.140069798
mov qword [rsp + 0x40], rax
mov rdx, qword [rdi + 8]
cmp rdx, qword [rdi + 0x10]
je 0x140036b7c
mov qword [rdx], rax
add qword [rdi + 8], 8
jmp 0x140036b89
lea r8, [rsp + 0x40]
mov rcx, rdi
call fcn.14001ff00
lea r8, [rsp + 0x48]
lea rdx, [0x1400aa794]
xor ecx, ecx
call fcn.14006f1f0
mov rbx, rax
test rax, rax
jne 0x140036b40
mov rcx, r14
call fcn.140069370
movzx eax, byte [rsi + 0x88]
mov byte [rsp + 0x38], al
movzx eax, byte [rsi + 0x7b]
mov byte [rsp + 0x30], al
mov qword [rsp + 0x28], rdi
movzx r8d, byte [rsi + 0x7a]
mov rcx, qword [rsi + 0x70]
call fcn.14005c520
mov edx, eax
mov rcx, rsi
call fcn.14002fe00
test rdi, rdi
je 0x140036ccf
mov r14d, r12d
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rcx
sar rax, 3
test eax, eax
jle 0x140036c2b
mov rbx, r12
nop dword [rax]
mov rax, qword [rdi]
mov edx, 2
mov rcx, qword [rbx + rax]
call fcn.140062610
inc r14d
lea rbx, [rbx + 8]
mov rcx, qword [rdi]
mov rax, qword [rdi + 8]
sub rax, rcx
sar rax, 3
cmp r14d, eax
jl 0x140036c00
test rcx, rcx
je 0x140036c78
mov rax, qword [rdi + 0x10]
sub rax, rcx
sar rax, 3
lea rdx, [rax*8]
cmp rdx, 0x1000
jb 0x140036c68
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140036d97
mov rcx, r8
call fcn.140062610
mov qword [rdi], r12
mov qword [rdi + 8], r12
mov qword [rdi + 0x10], r12
mov edx, 0x18
mov rcx, rdi
call fcn.140062610
jmp 0x140036ccf
mov rcx, qword [rsi + 0x70]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x140036ca7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rsi
call fcn.14002fe00
jmp 0x140036ccf
xor edx, edx
mov rcx, rsi
call fcn.14002fe00
jmp 0x140036ccf
mov rcx, qword [rsi + 0x70]
test al, al
je 0x140036cc2
call fcn.14005c370
jmp 0x140036ccf
xor edx, edx
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop
cmp byte [rbp - 0x78], 0
je 0x140036d02
cmp dword [rsp + 0x78], 0
je 0x140036d02
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9d, 0x10
lea r8, [rsp + 0x78]
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov byte [rbp - 0x78], 0
mov rcx, qword [rbp - 0x70]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140036d16
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x50]
call fcn.14005b820
mov byte [rsi + 0x10], 1
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax + 0x18]
call qword [0x1400926f0]
mov r9d, eax
lea r8, str.Rmdir
mov edx, dword [rsi + 8]
lea rcx, str._i:__s_End_execute._Next_command__i._n
call fcn.14005cb30
lea rcx, [rsi + 0x48]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x140036d6c
lea rcx, str._i:__s_Error:_Multiple_threads_attempting_execution._n
call fcn.14005cb30
mov eax, 0x54f
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.1400625f0
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.1400695b8
nop
int3