Function at 0x140079580
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x150]
sub rsp, 0x250
mov rax, qword [0x1400c7008]
xor rax, rsp
mov qword [rbp + 0x140], rax
mov r15, qword [r8 + 0x18]
xor ebx, ebx
xorps xmm0, xmm0
mov qword [rsp + 0x70], rbx
xorps xmm1, xmm1
mov qword [rsp + 0x78], rbx
movzx eax, cl
mov qword [rbp - 0x38], 0x138
xor r12b, r12b
mov dword [rbp - 0x30], ebx
neg al
mov word [rbp - 0x28], dx
movzx esi, cl
mov dword [rbp - 0x24], ebx
sbb ecx, ecx
mov qword [rbp - 0xc], rbx
xor eax, eax
mov dword [rbp - 4], ebx
add ecx, 2
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov rdi, r8
mov eax, dword [r8 + 0x2b0]
mov r14d, ebx
mov dword [rbp - 0x40], ecx
mov dword [rbp - 0x10], eax
movdqa xmmword [rbp], xmm0
movdqa xmmword [rbp + 0x10], xmm1
movdqa xmmword [rbp + 0x20], xmm0
movdqa xmmword [rbp + 0x30], xmm1
movdqa xmmword [rbp + 0x40], xmm0
movdqa xmmword [rbp + 0x50], xmm1
movdqa xmmword [rbp + 0x60], xmm0
movdqa xmmword [rbp + 0x70], xmm1
movdqa xmmword [rbp + 0x80], xmm0
movdqa xmmword [rbp + 0x90], xmm1
movdqa xmmword [rbp + 0xa0], xmm0
movdqa xmmword [rbp + 0xb0], xmm1
movdqa xmmword [rbp + 0xc0], xmm0
movdqa xmmword [rbp + 0xd0], xmm1
movdqa xmmword [rbp + 0xe0], xmm0
mov qword [rbp + 0xf0], rbx
cmp eax, 0xffffffff
jne 0x140079694
mov rdx, qword [rdi + 0x140]
lea rcx, [rbp - 0xc]
mov r8d, 0x100
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
movzx edx, word [rbp - 0x28]
mov byte [rbp + 0xf3], bl
cmp dx, 2
jne 0x1400797b1
mov ecx, dword [rdi + 0x14c]
call qword [sym.imp.WS2_32.dll_htonl]
mov r9d, dword [rdi + 0x2ac]
mov r8d, ebx
mov dword [rbp - 0x24], eax
mov ecx, 0x20
nop dword [rax]
mov edx, 0xffffffff
lea eax, [r8 - 1]
shl edx, cl
cmp eax, 0x1f
cmova edx, ebx
cmp edx, r9d
je 0x1400796e4
inc r8d
sub ecx, 1
jns 0x1400796c0
mov r8d, 0xffffffff
cmp dword [0x1400cfe94], 3
mov dword [rbp - 0x14], r8d
jb 0x1400798c3
mov ecx, 3
call fcn.14000e3d0
test al, al
je 0x1400798c3
mov edi, dword [rdi + 0x14c]
mov ecx, 0x48
mov qword [rsp + 0x30], 0x40
mov dword [rsp + 0x38], ebx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
je 0x140079a80
movups xmm0, xmmword [rsp + 0x30]
add rax, 8
mov qword [r14], rbx
mov qword [rsp + 0x40], rax
mov ecx, edi
movsd xmm1, qword [rsp + 0x40]
movsd qword [rsp + 0x68], xmm1
mov byte [rax], bl
mov qword [rsp + 0x70], r14
movups xmmword [rsp + 0x58], xmm0
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, eax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r8, rax
lea rdx, [0x14008b3dc]
lea rcx, [rsp + 0x58]
call fcn.140002e40
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x1400797a2
cmp dword [rsp + 0x60], ebx
jl 0x1400797a2
movsxd r9, dword [rsp + 0x5c]
lea rdx, str.INET_address_service:__s__s__d
add r9, rax
jmp 0x14007989d
mov r9, rbx
lea rdx, str.INET_address_service:__s__s__d
jmp 0x14007989d
cmp dword [rdi], 2
movups xmm0, xmmword [rdi + 0x154]
movups xmmword [rbp - 0x24], xmm0
jne 0x1400797ca
mov dword [rbp - 0x14], 0x80
jmp 0x1400797d3
mov eax, dword [rdi + 0x174]
mov dword [rbp - 0x14], eax
cmp dword [0x1400cfe94], 3
jb 0x1400798c3
mov ecx, 3
call fcn.14000e3d0
test al, al
je 0x1400798c3
movups xmm0, xmmword [rdi + 0x154]
mov ecx, 0x48
mov qword [rsp + 0x58], 0x40
mov dword [rsp + 0x60], ebx
movaps xmmword [rsp + 0x30], xmm0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
test rax, rax
je 0x140079a86
movups xmm0, xmmword [rsp + 0x58]
add rax, 8
mov qword [r14], rbx
mov r9d, 0x3f
mov qword [rsp + 0x68], rax
movsd xmm1, qword [rsp + 0x68]
lea r8, [rbp + 0x100]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x70], r14
mov byte [rax], bl
lea ecx, [r9 - 0x28]
movsd qword [rbp - 0x70], xmm1
movups xmmword [rbp - 0x80], xmm0
call qword [sym.imp.WS2_32.dll_inet_ntop]
lea r8, [rbp + 0x100]
lea rdx, [0x14008b3dc]
lea rcx, [rbp - 0x80]
call fcn.140002e40
mov rax, qword [rbp - 0x70]
test rax, rax
je 0x140079893
cmp dword [rbp - 0x78], ebx
jl 0x140079893
movsxd r9, dword [rbp - 0x7c]
add r9, rax
jmp 0x140079896
mov r9, rbx
lea rdx, str.INET6_address_service:__s__s__d
lea rax, [0x1400a09e8]
test sil, sil
lea r8, str.remove
mov ecx, 3
cmovne r8, rax
mov eax, dword [rbp - 0x14]
mov dword [rsp + 0x20], eax
call fcn.14000e000
lea r9, [rsp + 0x50]
mov qword [rsp + 0x30], rbx
mov r8d, 0x138
mov qword [rsp + 0x38], rbx
lea rdx, [rbp - 0x40]
mov qword [rsp + 0x20], rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140079985
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rbx
mov r8d, 0x20
lea rdx, [rbp - 0x68]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140079985
cmp dword [rbp - 0x50], ebx
je 0x14007997d
mov ecx, 0x40
call fcn.14000e3d0
test al, al
je 0x140079a1b
mov ecx, dword [rbp - 0x50]
lea rdx, [rsp + 0x70]
call fcn.14000ebf0
mov r9, rax
lea r8, str.deleting
lea rax, str.adding
test sil, sil
lea rdx, str.TUN:__s_address_failed_using_service:__s__status_u_if_index_d_
mov ecx, 0x40
cmovne r8, rax
mov eax, dword [rbp - 0x10]
mov dword [rsp + 0x28], eax
mov eax, dword [rbp - 0x50]
mov dword [rsp + 0x20], eax
call fcn.14000e000
mov rbx, qword [rsp + 0x78]
mov r14, qword [rsp + 0x70]
jmp 0x140079a1b
mov r12b, 1
jmp 0x140079a1b
mov ecx, 0x40
call fcn.14000e3d0
test al, al
je 0x140079a1b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [rsp + 0x30]
call fcn.14000ebf0
mov r9, rax
mov dword [rsp + 0x20], edi
lea r8, [0x1400b6430]
mov ecx, 0x40
lea rdx, str._s:_could_not_talk_to_service:__s___lu_
call fcn.14000e000
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400799f1
nop word [rax + rax]
mov rdi, qword [rcx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
test rdi, rdi
jne 0x1400799e0
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x140079a1b
nop dword [rax + rax]
mov rcx, qword [rsi + 0x10]
mov rdi, qword [rsi]
call qword [rsi + reloc.WS2_32.dll_htonl]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, rdi
test rdi, rdi
jne 0x140079a00
test r14, r14
je 0x140079a34
mov rdi, qword [r14]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r14, rdi
test rdi, rdi
jne 0x140079a20
test rbx, rbx
je 0x140079a5b
nop dword [rax]
mov rcx, qword [rbx + 0x10]
mov rdi, qword [rbx]
call qword [rbx + reloc.WS2_32.dll_htonl]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, rdi
test rdi, rdi
jne 0x140079a40
movzx eax, r12b
mov rcx, qword [rbp + 0x140]
xor rcx, rsp
call fcn.140088150
add rsp, 0x250
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.14000e540
int3
call fcn.14000e540
int3