Function at 0x140046a40
Capabilities:
Check if file exists
Clear file content
Delete file
Get file attributes
Move file
Set file attributes
Set socket configuration
Timestomp 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 - 0x2b0]
sub rsp, 0x3b0
mov rax, qword [0x1401ef010]
xor rax, rsp
mov qword [rbp + 0x2a0], rax
mov rbx, rcx
cmp byte [rcx + 0x80d], 0
je 0x140046e9b
mov byte [rcx + 0x80d], 0
mov rax, qword [0x1401fdf60]
imul ecx, dword [rax + 0x758], 0x3e8
mov rdi, qword [rbx + 0x3b0]
cmp byte [0x14023e4f4], 2
jb 0x140046af7
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x140046af7
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, qword [rdi + 0x10]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 0x7f0]
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, qword [rbx + 0x7f0]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea rcx, [rbx + 0x7cc]
mov rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp byte [rcx + rax], 0
jne 0x140046b22
xor r12d, r12d
test rax, rax
je 0x140046bbc
mov word [rsp + 0x3c], r12w
call fcn.140143ba0
mov word [rsp + 0x3a], ax
lea rcx, [rbx + 0x7cf]
call fcn.140143ba0
mov word [rsp + 0x3e], ax
lea rcx, [rbx + 0x7d2]
call fcn.140143ba0
mov word [rsp + 0x38], ax
lea rcx, [rbx + 0x7d7]
call fcn.140143ba0
mov word [rsp + 0x40], ax
lea rcx, [rbx + 0x7da]
call fcn.140143ba0
mov word [rsp + 0x42], ax
mov dword [rsp + 0x44], r12d
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x30]
mov rcx, qword [rbx + 0x7f0]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov rcx, qword [rbx + 0x7f0]
cmp rcx, rdi
je 0x140046bd5
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x7f0], rdi
lea rsi, [rbx + 0x688]
mov r15d, 9
cmp byte [rbx + 0x80c], r12b
jne 0x140046cad
lea edx, [r15 + 0x53]
mov rcx, rsi
call fcn.14014a5f4
lea rcx, [rax + 1]
mov r8d, r15d
lea rdx, str._UVNCDIR_
call fcn.140143800
test eax, eax
jne 0x140046cad
mov r8, rsi
mov edx, 0x208
lea rcx, [rbp + 0x90]
call fcn.140139ff0
lea edx, [r15 + 0x53]
lea rcx, [rbp + 0x90]
call fcn.14014a5f4
lea r14, [rax + 1]
lea edx, [r15 + 0x24]
mov rcx, r14
call fcn.14014a6b8
lea r8, [rax + 1]
mov edx, 0x104
lea rcx, [rbp - 0x80]
call fcn.140139ff0
lea edx, [r15 + 0x25]
lea rcx, [rbp - 0x80]
call fcn.14014a5f4
mov byte [rax], r12b
test r14, r14
je 0x140046c74
mov byte [r14], r12b
lea r8, [rbp - 0x80]
mov edx, 0x208
lea rcx, [rbp + 0x90]
call fcn.14013a050
mov r8, rsi
lea rdx, [rbp + 0x90]
mov rcx, qword [rbx + 0x680]
call fcn.14008b360
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov r14b, 1
jmp 0x140046cb0
xor r14b, r14b
cmp byte [rbx + 0x80c], r12b
je 0x140046ce5
cmp byte [rbx + 0x80f], r12b
je 0x140046ce5
mov edx, 0x2c
mov rcx, rsi
call fcn.14014a5f4
test rax, rax
je 0x140046cd7
mov byte [rax], r12b
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x140046e53
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], setsockopt
nop dword [rax + rax]
inc rdi
cmp byte [rsi + rdi], r12b
jne 0x140046d00
mov r8, rdi
mov rdx, rsi
lea rcx, [rsp + 0x38]
call fcn.1400172c0
lea rax, [rsp + 0x38]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x38]
call fcn.140021480
mov rdx, rax
cmp rax, 0xffffffffffffffff
je 0x140046d7d
mov r8, qword [rsp + 0x48]
cmp r8, rax
jb 0x140046ec6
mov rax, r8
sub rax, rdx
cmp rax, 9
cmovb r15, rax
lea rcx, [rsp + 0x38]
cmp qword [rsp + 0x50], 0x10
cmovae rcx, qword [rsp + 0x38]
add rcx, rdx
sub r8, r15
mov qword [rsp + 0x48], r8
sub r8, rdx
inc r8
lea rdx, [rcx + r15]
call fcn.140133620
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rsp + 0x58], xmm0
movups xmm1, xmmword [rsp + 0x48]
movups xmmword [rsp + 0x68], xmm1
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], setsockopt
mov byte [rsp + 0x38], 0
lea rcx, [rsp + 0x38]
call fcn.140017260
cmp byte [rbx + 0x80c], 0
jne 0x140046e49
test r14b, r14b
jne 0x140046e49
lea rdi, [rsp + 0x58]
cmp qword [rsp + 0x70], 0x10
cmovae rdi, qword [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov r14d, eax
cmp eax, 0xffffffff
je 0x140046e14
test r14b, 1
je 0x140046e14
mov edx, eax
and edx, 0xfffffffe
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov r8d, 1
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne sil
jmp 0x140046e32
mov r8d, 1
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
setne sil
cmp r14d, 0xffffffff
je 0x140046e3e
mov edx, r14d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor sil, 1
mov byte [rbx + 0x80c], sil
lea rcx, [rsp + 0x58]
call fcn.140017260
mov rcx, qword [rbx + 0x7e8]
test rcx, rcx
je 0x140046e6b
call fcn.140131300
mov qword [rbx + 0x7e8], r12
mov rcx, qword [rbx + 0x7e0]
test rcx, rcx
je 0x140046e83
call fcn.140131300
mov qword [rbx + 0x7e0], r12
mov rcx, qword [rbx + 0x830]
test rcx, rcx
je 0x140046e9b
call fcn.140131300
mov qword [rbx + 0x830], r12
mov rcx, qword [rbp + 0x2a0]
xor rcx, rsp
call fcn.1401312e0
lea r11, [rsp + 0x3b0]
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.140048bd0
nop
int3