Function at 0x140045298
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
mov r12d, edx
mov rdi, rcx
mov ebp, 1
mov rcx, qword [str.___t_]
lea r15, str.___t_
mov r13b, 4
cmp rcx, r15
je 0x1400452f4
test byte [rcx + 0x1c], r13b
je 0x1400452f4
cmp byte [rcx + 0x19], 5
jb 0x1400452f4
mov rcx, qword [rcx + 0x10]
lea edx, [rbp + 0x72]
lea r8, [0x140003b68]
call fcn.14000e618
mov rcx, qword [rdi + 0x198]
test rcx, rcx
je 0x140045340
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x140045340
mov rcx, qword [str.___t_]
cmp rcx, r15
je 0x140045339
test byte [rcx + 0x1c], r13b
je 0x140045339
cmp byte [rcx + 0x19], 2
jb 0x140045339
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x74]
lea r8, [0x140003b68]
call fcn.14000e63c
xor eax, eax
jmp 0x140045982
mov rcx, rdi
call fcn.140045070
lea r14d, [rax + 0x678]
mov ecx, r14d
mov ebx, r14d
call fcn.140072274
mov rsi, rax
test rax, rax
je 0x140045339
mov r8d, ebx
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov ebx, 0x678
lea r8, [rdi + 0x498]
mov dword [rsi], ebx
mov rax, qword [rdi + 0x10]
lea rcx, [rsi + 0x470]
mov qword [rsi + 8], rax
mov rax, qword [rdi + 0x18]
mov edx, 0x100
mov qword [rsi + 0x10], rax
mov rax, qword [rdi + 0x1a0]
mov qword [rsp + 0x70], rbx
mov qword [rsi + 0x180], rax
mov rax, qword [rdi + 0x1a8]
mov qword [rsi + 0x188], rax
mov eax, dword [rdi + 0x24]
mov dword [rsi + 0x18], eax
mov eax, dword [rdi + 0x734]
mov dword [rsi + 0x28], eax
mov eax, dword [rdi + 0x698]
mov dword [rsi + 0x670], eax
call fcn.14001008c
test eax, eax
jns 0x140045415
mov rcx, qword [str.___t_]
cmp rcx, r15
je 0x14004540e
test byte [rcx + 0x1c], r13b
je 0x14004540e
cmp byte [rcx + 0x19], 2
jb 0x14004540e
mov edx, 0x75
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
mov r9d, eax
call fcn.14000e63c
xor ebp, ebp
jmp 0x140045978
lea r8, [rdi + 0x288]
lea rcx, [rsi + 0x22c]
mov edx, 0x100
call fcn.14001008c
test eax, eax
jns 0x140045450
mov rcx, qword [str.___t_]
cmp rcx, r15
je 0x14004540e
test byte [rcx + 0x1c], r13b
je 0x14004540e
cmp byte [rcx + 0x19], 2
jb 0x14004540e
mov edx, 0x76
jmp 0x1400453fb
mov eax, dword [rdi + 0x40]
mov dword [rsi + 0x2c], eax
mov eax, dword [rdi + 0xe8]
mov dword [rsi + 0xc0], eax
mov eax, dword [rdi + 0x17c]
mov dword [rsi + 0x154], eax
mov eax, dword [rdi + 0x178]
mov dword [rsi + 0x150], eax
mov eax, dword [rdi + 0x184]
mov dword [rsi + 0x158], eax
cmp dword [rdi + 0x24], 2
jne 0x14004549e
mov rax, qword [rdi + 0x248]
mov rcx, qword [rax + 0x10]
mov qword [rsi + 0x220], rcx
mov eax, dword [rdi + 0x250]
mov dword [rsi + 0x228], eax
mov rax, qword [rdi + 0x488]
mov qword [rsi + 0x460], rax
mov rax, qword [rdi + 0x490]
mov qword [rsi + 0x468], rax
mov rcx, qword [rdi + 0x198]
test rcx, rcx
je 0x140045503
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov qword [rsi + 0x178], rbx
mov rdx, qword [rdi + 0x198]
lea rcx, [rsi + 0x678]
mov r8d, eax
mov ebx, eax
call sub.msvcrt.dll_memcpy
lea rax, [rbx + 0x678]
mov qword [rsp + 0x70], rax
mov rcx, qword [rdi + 0x1b8]
lea rdx, [rsi + 0x190]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140073bbc
xor eax, eax
lea r9, [rsp + 0x70]
mov qword [rsi + 0x450], rax
mov qword [rsi + 0x458], rax
mov rcx, qword [rdi + 0x38]
lea rdx, [rsi + 0x20]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140073bbc
cmp dword [rdi + 0x24], 0x20
je 0x140045559
cmp dword [rdi + 0x24], 8
jne 0x140045573
mov rcx, qword [rdi + 0x48]
lea rdx, [rsi + 0x30]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140073bbc
lea rdx, [rsi + 0x38]
lea rcx, [rdi + 0x50]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140044a14
test eax, eax
jne 0x1400455db
lea ebp, [rax + 0x7a]
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045978
test byte [rcx + 0x1c], r13b
je 0x140045978
cmp byte [rcx + 0x19], 2
jb 0x140045978
lea edx, [rax + 0x77]
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
call fcn.14000e63c
jmp 0x140045978
lea rdx, [rsi + 0x98]
lea rcx, [rdi + 0xb0]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140044af0
test eax, eax
jne 0x140045632
lea ebp, [rax + 0x7a]
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045978
test byte [rcx + 0x1c], r13b
je 0x140045978
cmp byte [rcx + 0x19], 2
jb 0x140045978
lea edx, [rax + 0x78]
jmp 0x1400455c2
lea rdx, [rsi + 0xc8]
lea rcx, [rdi + 0xf0]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140044bac
test eax, eax
jne 0x14004568c
lea ebp, [rax + 0x7a]
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045978
test byte [rcx + 0x1c], r13b
je 0x140045978
cmp byte [rcx + 0x19], 2
jb 0x140045978
lea edx, [rax + 0x79]
jmp 0x1400455c2
mov rcx, qword [rdi + 0x190]
lea rdx, [rsi + 0x170]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140073bbc
lea rdx, [rsi + 0x198]
lea rcx, [rdi + 0x1c0]
lea r9, [rsp + 0x70]
mov r8, rsi
mov dword [rsp + 0x20], r14d
call fcn.140044bac
test eax, eax
jne 0x140045705
lea ebp, [rax + 0x7a]
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045978
test byte [rcx + 0x1c], r13b
je 0x140045978
cmp byte [rcx + 0x19], 2
jb 0x140045978
mov edx, ebp
jmp 0x1400455c2
cmp dword [rdi + 0x24], 8
jne 0x14004577c
lea r8, [rsp + 0x70]
mov r9d, r14d
mov rdx, rsi
mov rcx, rdi
call fcn.140044d78
mov ebp, eax
test eax, eax
jne 0x14004577c
mov rax, qword [str.___t_]
lea r14, str.___t_
cmp rax, r14
je 0x140045978
test byte [rax + 0x1c], r13b
je 0x140045978
cmp byte [rax + 0x19], 2
jb 0x140045978
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.___t_]
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
lea edx, [rbp + 0x7b]
lea r8, [0x140003b68]
mov dword [rsp + 0x20], eax
call fcn.14000e820
jmp 0x140045978
mov rcx, qword [rdi + 0x38]
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80000080
mov dword [rsp + 0x20], 2
call fcn.140074d38
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1400457f6
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x14004540e
test byte [rcx + 0x1c], r13b
je 0x14004540e
cmp byte [rcx + 0x19], 2
jb 0x14004540e
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 0x7d]
mov rax, qword [rdi + 0x38]
lea r8, [0x140003b68]
mov qword [rsp + 0x20], rax
call fcn.14000e678
jmp 0x14004540e
mov r8d, r14d
mov rdx, rsi
mov rcx, rax
call fcn.14004ac5c
test eax, eax
je 0x140045928
test r12d, r12d
je 0x1400458df
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x14004585a
test byte [rcx + 0x1c], r13b
je 0x14004585a
cmp byte [rcx + 0x19], 2
jb 0x14004585a
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x28], eax
mov rax, qword [rdi + 0x38]
lea r8, [0x140003b68]
mov edx, 0x7d
mov qword [rsp + 0x20], rax
call fcn.1400396bc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x1400458a1
mov rax, qword [str.___t_]
cmp rax, r14
je 0x1400458a1
test byte [rax + 0x1c], r13b
je 0x1400458a1
cmp byte [rax + 0x19], 2
jb 0x1400458a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.___t_]
mov r9, qword [rsi + 0x20]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ebx
call fcn.140041d24
mov rcx, qword [rdi + 0x38]
or rbx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140045924
mov rax, qword [str.___t_]
cmp rax, r14
je 0x140045924
test byte [rax + 0x1c], r13b
je 0x140045924
cmp byte [rax + 0x19], 2
jb 0x140045924
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [str.___t_]
mov edx, 0x7f
jmp 0x140045903
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045924
test byte [rcx + 0x1c], r13b
je 0x140045924
cmp byte [rcx + 0x19], 2
jb 0x140045924
mov edx, 0x80
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x28], eax
mov rax, qword [rdi + 0x38]
lea r8, [0x140003b68]
mov qword [rsp + 0x20], rax
call fcn.1400396bc
xor ebp, ebp
jmp 0x140045969
mov rcx, qword [str.___t_]
lea r14, str.___t_
cmp rcx, r14
je 0x140045969
test byte [rcx + 0x1c], r13b
je 0x140045969
cmp byte [rcx + 0x19], 5
jb 0x140045969
mov rax, qword [rdi + 0x38]
mov r9d, dword [rdi + 0x20]
mov rcx, qword [rcx + 0x10]
lea r8, [0x140003b68]
mov edx, 0x81
mov qword [rsp + 0x20], rax
call fcn.14000e678
cmp rbx, 0xffffffffffffffff
je 0x140045978
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call fcn.140072328
mov eax, ebp
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret