Function at 0x140021910
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x2e0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x1401dd3a0]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov r13, rcx
cmp qword [rcx + 0x18], 0
je 0x140021f90
call fcn.140036680
test al, al
je 0x140021f90
cmp qword [r13 + 0x20], 8
jb 0x140021976
lea r12, [r13 + 8]
mov rcx, qword [r12]
jmp 0x14002197d
lea r12, [r13 + 8]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x140021b15
lea rcx, str.swifdiag.log
call fcn.140001910
mov rbx, rax
test rax, rax
je 0x140022090
mov rax, qword [rax]
lea r15, str.SwiConfig::DeleteThisFile
mov qword [rsp + 0x20], r15
lea r14, str....._src_swic_srcSwiConfigFiles.cpp
mov r9, r14
lea r8, str.default
mov edx, 3
mov rcx, rbx
call qword [rax + 8]
test al, al
je 0x140022090
mov byte [rbx + 0xf8], 0x76
xor ebp, ebp
mov eax, ebp
mov dil, 0x2e
mov rcx, r14
mov edx, 1
nop dword [rax]
cmp dil, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx edi, byte [rcx]
test dil, dil
jne 0x1400219f0
add rax, r14
mov qword [rbx + 0x100], rax
mov dword [rbx + 0x108], WSACleanup
mov qword [rbx + 0x110], r15
mov rcx, rbx
call fcn.1400027f0
mov rbx, rax
mov rdi, rbp
lea r14, str.File__
inc rdi
cmp byte [rdi + r14], bpl
jne 0x140021a34
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], ebp
cmp edi, ecx
jge 0x140021a79
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov esi, ecx
nop dword [rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14002f090
sub rsi, 1
jne 0x140021a60
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call fcn.14002f090
cmp qword [r13 + 0x20], 8
jb 0x140021a92
mov r12, qword [r12]
mov rdx, r12
mov rcx, rbx
call fcn.140013b50
mov rbx, rax
mov rdi, rbp
lea r12, str.__deleted_successfully
nop word [rax + rax]
inc rdi
cmp byte [rdi + r12], bpl
jne 0x140021ab0
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], ebp
cmp edi, ecx
jge 0x140021af9
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov esi, ecx
nop dword [rax + rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14002f090
sub rsi, 1
jne 0x140021ae0
mov r8, rdi
mov rdx, r12
mov rcx, rbx
call fcn.14002f090
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 8]
jmp 0x140022090
lea rcx, str.swifdiag.log
call fcn.140001910
mov rbx, rax
xor ebp, ebp
lea r15, str.SwiConfig::DeleteThisFile
lea r14, str....._src_swic_srcSwiConfigFiles.cpp
test rax, rax
je 0x140021ca7
mov rax, qword [rax]
mov qword [rsp + 0x20], r15
mov r9, r14
lea r8, str.default
lea edx, [rbp + 3]
mov rcx, rbx
call qword [rax + 8]
test al, al
je 0x140021ca7
mov byte [rbx + 0xf8], 0x76
mov eax, ebp
mov dil, 0x2e
mov rcx, r14
mov edx, 1
nop word [rax + rax]
cmp dil, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx edi, byte [rcx]
test dil, dil
jne 0x140021b80
add rax, r14
mov qword [rbx + 0x100], rax
mov dword [rbx + 0x108], reloc.WS2_32.dll_WSAStartup
mov qword [rbx + 0x110], r15
mov rcx, rbx
call fcn.1400027f0
mov rsi, rax
mov rdi, rbp
lea rax, str.Failed_immediate_deletion_of__
inc rdi
cmp byte [rdi + rax], bpl
jne 0x140021bc4
mov ecx, dword [rsi + 0x430]
mov dword [rsi + 0x430], ebp
cmp edi, ecx
jge 0x140021c10
movzx eax, byte [rsi + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov ebx, ecx
nop dword [rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.14002f090
sub rbx, 1
jne 0x140021bf0
lea rax, str.Failed_immediate_deletion_of__
mov r8, rdi
mov rdx, rax
mov rcx, rsi
call fcn.14002f090
cmp qword [r13 + 0x20], 8
jb 0x140021c2b
mov rdx, qword [r12]
jmp 0x140021c2e
mov rdx, r12
mov rcx, rsi
call fcn.140013b50
mov rbx, rax
mov rdi, rbp
lea rax, str.___scheduling_removal_on_next_reboot
inc rdi
cmp byte [rdi + rax], bpl
jne 0x140021c43
mov ecx, dword [rbx + 0x430]
mov dword [rbx + 0x430], ebp
cmp edi, ecx
jge 0x140021c90
movzx eax, byte [rbx + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov esi, ecx
nop dword [rax + rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14002f090
sub rsi, 1
jne 0x140021c70
lea rax, str.___scheduling_removal_on_next_reboot
mov r8, rdi
mov rdx, rax
mov rcx, rbx
call fcn.14002f090
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 8]
mov qword [rsp + 0xb0], 7
mov qword [rsp + 0xa8], rbp
mov word [rsp + 0x98], bp
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, r13
lea rcx, [rsp + 0x90]
call fcn.1400012a0
nop
mov r9d, 2
or r8, 0xffffffffffffffff
lea rdx, [0x1401a3a18]
lea rcx, [rsp + 0x90]
call fcn.140022110
cmp rax, 0xffffffffffffffff
je 0x140021d42
mov r9, rax
xor r8d, r8d
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x90]
call fcn.1400220d0
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x90]
call fcn.1400012a0
nop
cmp qword [rsp + 0x58], 8
jb 0x140021d42
mov rcx, qword [rsp + 0x40]
call fcn.1400ddb14
mov qword [rsp + 0x88], 7
mov qword [rsp + 0x80], rbp
mov word [rsp + 0x70], bp
lea rcx, [rsp + 0x98]
cmp qword [rsp + 0xb0], 8
cmovae rcx, qword [rsp + 0x98]
lea r9, [rsp + 0xc0]
xor r8d, r8d
lea rdx, [0x1401a3a20]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x140021dcf
lea r8, [0x1401a3a28]
mov rdx, r13
lea rcx, [rsp + 0x38]
call fcn.140013df0
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x68]
call fcn.1400012a0
nop
cmp qword [rsp + 0x58], 8
jb 0x140021df9
mov rcx, qword [rsp + 0x40]
call fcn.1400ddb14
jmp 0x140021df9
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xc0]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x68]
call fcn.140001520
lea rdx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rdx, qword [rsp + 0x70]
cmp qword [r13 + 0x20], 8
jb 0x140021e18
mov r12, qword [r12]
mov r8d, 1
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x140021f41
lea rcx, str.swifdiag.log
call fcn.140001910
mov rbx, rax
test rax, rax
je 0x140021f20
mov rax, qword [rax]
mov qword [rsp + 0x20], r15
mov r9, r14
lea r8, str.default
mov edx, 2
mov rcx, rbx
call qword [rax + 8]
test al, al
je 0x140021f20
mov byte [rbx + 0xf8], 0x69
mov eax, ebp
mov dil, 0x2e
mov rcx, r14
mov edx, 1
cmp dil, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx edi, byte [rcx]
test dil, dil
jne 0x140021e80
add rax, r14
mov qword [rbx + 0x100], rax
mov dword [rbx + 0x108], 0x91
mov qword [rbx + 0x110], r15
mov rcx, rbx
call fcn.1400027f0
mov rbx, rax
mov rdi, rbp
lea r12, str.File_renamed_and_scheduled_for_removal_on_next_reboot
inc rdi
cmp byte [rdi + r12], 0
jne 0x140021ec4
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], ebp
cmp edi, ecx
jge 0x140021f09
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov esi, ecx
nop dword [rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14002f090
sub rsi, 1
jne 0x140021ef0
mov r8, rdi
mov rdx, r12
mov rcx, rbx
call fcn.14002f090
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 8]
lea rcx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rcx, qword [rsp + 0x70]
xor edx, edx
lea r8d, [rdx + 4]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop
cmp qword [rsp + 0x88], 8
jb 0x140021f56
mov rcx, qword [rsp + 0x70]
call fcn.1400ddb14
mov qword [rsp + 0x88], 7
mov qword [rsp + 0x80], rbp
mov word [rsp + 0x70], bp
cmp qword [rsp + 0xb0], 8
jb 0x140022090
mov rcx, qword [rsp + 0x98]
call fcn.1400ddb14
jmp 0x140022090
lea rcx, str.swifdiag.log
call fcn.140001910
mov rbx, rax
test rax, rax
je 0x140022090
mov rax, qword [rax]
lea r15, str.SwiConfig::DeleteThisFile
mov qword [rsp + 0x20], r15
lea r14, str....._src_swic_srcSwiConfigFiles.cpp
mov r9, r14
lea r8, str.default
mov edx, 2
mov rcx, rbx
call qword [rax + 8]
test al, al
je 0x140022090
mov byte [rbx + 0xf8], 0x69
xor ebp, ebp
mov eax, ebp
mov dil, 0x2e
mov rcx, r14
mov edx, 1
cmp dil, 0x5c
cmove eax, edx
inc edx
inc rcx
movzx edi, byte [rcx]
test dil, dil
jne 0x140021ff1
add rax, r14
mov qword [rbx + 0x100], rax
mov dword [rbx + 0x108], 0x67
mov qword [rbx + 0x110], r15
mov rcx, rbx
call fcn.1400027f0
mov rbx, rax
mov rdi, rbp
lea r12, str.File_not_present__skip_deletion
inc rdi
cmp byte [rdi + r12], bpl
jne 0x140022035
mov ecx, dword [rax + 0x430]
mov dword [rax + 0x430], ebp
cmp edi, ecx
jge 0x140022079
movzx eax, byte [rax + 0x42c]
mov byte [rsp + 0x30], al
sub ecx, edi
mov esi, ecx
nop dword [rax]
mov r8d, 1
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.14002f090
sub rsi, 1
jne 0x140022060
mov r8, rdi
mov rdx, r12
mov rcx, rbx
call fcn.14002f090
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 8]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.1400dd780
lea r11, [rsp + 0x2e0]
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