Function at 0x140042c40
Capabilities:
Connect socket
Terminate process

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rdi
sub rsp, 0x1a8
lea rbp, [rsp + 0x20]
lea rdi, [rsp + 0x20]
mov ecx, getprotobynumber
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x1c8]
mov rax, qword [0x14009f088]
xor rax, rbp
mov qword [rbp + 0x170], rax
lea rcx, [0x1401a4cd2]
call fcn.14006b9e0
mov qword [rbp + 8], 0
mov rax, qword [rbp + 0x1a0]
mov eax, dword [rax + 0x270]
shr eax, 6
and eax, 1
mov dword [rbp + 0x24], eax
mov rax, qword [rbp + 0x1a0]
cmp dword [rax + 0x220], 0x100
jne 0x140042ddc
mov rax, qword [rbp + 0x1a0]
mov rax, qword [rax + 0x2f8]
mov qword [rbp + 0x68], rax
cmp qword [rbp + 0x68], 1
jge 0x140042db7
lea rax, [rbp + 0x88]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WS2_32.dll_recv
rep stosb byte [rdi], al
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x68], rax
cmp qword [rbp + 0x68], 0xffffffffffffffff
jne 0x140042d2a
lea rdx, str.redis:_socket___failed_to_create_socket_n
xor ecx, ecx
call fcn.14002f7e0
mov ecx, 1
call qword [sym.imp.ucrtbased.dll_exit]
mov rax, qword [rbp + 0x1a0]
mov ecx, dword [rax + 0x2d8]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp + 0x8c], eax
mov rax, qword [rbp + 0x1a0]
movzx ecx, word [rax + 0x2f0]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x8a], ax
mov eax, 2
mov word [rbp + 0x88], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x88]
mov rcx, qword [rbp + 0x68]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0x44], eax
cmp dword [rbp + 0x44], 0
je 0x140042da5
lea rdx, str.redis:_connect___failed_n
xor ecx, ecx
call fcn.14002f7e0
lea rcx, str.connect
call qword [sym.imp.ucrtbased.dll_perror]
mov rax, qword [rbp + 0x1a0]
mov rcx, qword [rbp + 0x68]
mov qword [rax + 0x2f8], rcx
mov rax, qword [rbp + 0x1a0]
mov rax, qword [rax + 0x218]
mov rdx, qword [rbp + 0x68]
mov rcx, qword [rbp + 0x1a0]
call qword [rax + reloc.WS2_32.dll_recv]
mov rax, qword [rbp + 0x68]
jmp 0x140042ecc
mov eax, 1
imul rax, rax, 0
mov rcx, qword [rbp + 0x1a8]
movsx eax, byte [rcx + rax]
cmp eax, 0x2d
jne 0x140042e1c
mov eax, 1
imul rax, rax, 1
mov rcx, qword [rbp + 0x1a8]
movsx eax, byte [rcx + rax]
test eax, eax
jne 0x140042e1c
mov ecx, 1
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov qword [rbp + 8], rax
cmp qword [rbp + 8], 0
jne 0x140042eab
mov r8d, dword [rbp + 0x24]
mov rdx, qword [rbp + 0x1a8]
lea rcx, [rbp + 8]
call fcn.1400157d0
mov dword [rbp + 0x44], eax
cmp dword [rbp + 0x44], 0
jne 0x140042e4b
cmp qword [rbp + 8], 0
jne 0x140042eab
cmp dword [rbp + 0x24], 0
je 0x140042e61
lea rax, str.appending
mov qword [rbp + 0x168], rax
jmp 0x140042e6f
lea rax, str.writing
mov qword [rbp + 0x168], rax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov r8, qword [rbp + 0x168]
lea rdx, str.out:_could_not_open_file_for__s_n
mov rcx, rax
call fcn.140001b10
mov rcx, qword [rbp + 0x1a8]
call qword [sym.imp.ucrtbased.dll_perror]
mov dword [0x14019fbf4], 1
xor eax, eax
jmp 0x140042ecc
mov rax, qword [rbp + 0x1a0]
mov eax, dword [rax + 0x230]
or eax, 1
mov rcx, qword [rbp + 0x1a0]
mov dword [rcx + 0x230], eax
mov rax, qword [rbp + 8]
mov rdi, rax
lea rcx, [rbp - 0x20]
lea rdx, [0x14008a910]
call fcn.14006b950
mov rax, rdi
mov rcx, qword [rbp + 0x170]
xor rcx, rbp
call fcn.14006bb70
lea rsp, [rbp + 0x188]
pop rdi
pop rbp
ret