Function at 0x140012780
Capabilities:
Delete file
Write file on windows

Disassembly:
push rsi
sub rsp, 0x60
cmp dword [rcx + 0x480], 1
mov rsi, rcx
jb 0x140012949
mov qword [rsp + 0x48], rdi
lea rdi, [rcx + 0x478]
mov rax, qword [rdi]
test rax, rax
je 0x140012944
cmp word [rax], 0
je 0x140012944
mov qword [rsp + 0x58], rbx
xor r9d, r9d
mov qword [rsp + 0x50], rbp
mov edx, 0xc0000000
xor ebp, ebp
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x30], rbp
mov rcx, rax
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
lea r8d, [rbp + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14001290c
xor r9d, r9d
mov qword [rsp + 0x78], reloc.WS2_32.dll_recv
lea r8, [rsp + 0x7c]
mov rcx, rax
lea edx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x78], eax
cmp eax, 0xffffffff
jne 0x140012834
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400128fc
cmp qword [rsp + 0x78], 0x10
jne 0x1400128fc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x1400128fc
xor r9d, r9d
mov qword [rsp + 0x80], 8
lea r8, [rsp + 0x84]
mov rcx, rbx
lea edx, [r9 + 8]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x80], eax
cmp eax, 0xffffffff
jne 0x14001288b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400128fc
cmp qword [rsp + 0x80], 0xffffffffffffffff
je 0x1400128fc
xor ecx, ecx
call fcn.140035e90
lea r9, [rsp + 0x70]
mov qword [rsp + 0x88], rax
mov r8d, 8
mov dword [rsp + 0x70], ebp
lea rdx, [rsp + 0x88]
mov qword [rsp + 0x20], rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400128d6
mov eax, ebp
mov dword [rsp + 0x70], eax
jmp 0x1400128da
mov eax, dword [rsp + 0x70]
lock add qword [0x1401f4d68], rax
cmp dword [rsp + 0x70], 8
jne 0x1400128fc
mov rax, qword [rdi]
mov dword [rsi + 0x480], ebp
test rax, rax
je 0x14001292c
mov word [rax], bp
jmp 0x14001292c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, 0xffffffffffffffff
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rax, qword [rdi]
mov dword [rsi + 0x480], ebp
test rax, rax
je 0x140012926
mov word [rax], bp
cmp rbx, 0xffffffffffffffff
je 0x140012935
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x50]
mov r14, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x60
pop rsi
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov byte [rcx + 0xd449], 1
mov byte [rcx + 0x9d39], 1
mov rcx, qword [rcx + 0x9878]
cmp rcx, 0xffffffffffffffff
je 0x1400129a0
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x9878]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x9878], 0xffffffffffffffff
xor eax, eax
lea rdi, [rbx + 0x9880]
mov ecx, 7
rep stosd dword [rdi], eax
mov qword [rbx + 0x9d78], rax
mov qword [rbx + 0x9ea0], rax
mov word [rbx + 0x9b1c], ax
mov rcx, qword [rbx + 0x9868]
test rcx, rcx
je 0x1400129dc
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rax, qword [rbx + 0x9870]
lea rcx, [rbx + 0x9870]
call qword [rax + 0x18]
mov rcx, rbx
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x140012780