Function at 0x140008cb0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x60
mov eax, dword [rcx + 0x3c]
mov rbx, rcx
test al, 8
jne 0x140009000
and eax, 0xffffc00f
mov qword [rsp + 0x58], rbp
or eax, 8
mov qword [rsp + 0x50], rsi
mov dword [rcx + 0x3c], eax
xor ebp, ebp
mov eax, dword [0x140068148]
inc eax
mov qword [rsp + 0x48], rdi
mov dword [0x140068148], eax
mov eax, dword [0x140068148]
mov rdi, qword [rcx]
mov dword [rcx + 0x44], eax
mov dword [rcx + 0x40], ebp
mov qword [rcx + 0x4c], rbp
mov dword [rcx + 0x54], ebp
mov rax, qword [rdi + 0x20]
and dword [rcx + 0x3c], 0xffffbfff
mov qword [rcx + 0x70], rax
mov qword [rcx + 0x68], rax
cmp qword [rdi + 0x140], rbp
jne 0x140008d5f
mov qword [rdi + 0x140], 0x2000
lock inc dword [0x140068150]
mov ecx, 0x2000
call fcn.14003ce88
mov rsi, rax
test rax, rax
je 0x140009006
xor edx, edx
mov r8d, 0x2000
mov rcx, rax
call fcn.1400367b0
mov qword [rdi + 0x138], rsi
mov rax, qword [rdi + 0x138]
lea r9, [rsp + 0x78]
movsxd rcx, dword [rbx + 0x48]
mov edx, 0xffff
mov qword [rbx + 0x78], rax
mov r8d, 0x1008
mov rax, qword [rdi + 0x140]
mov edi, 4
and dword [rbx + 0x3c], 0xffff7fff
mov qword [rbx + 0x80], rax
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov qword [rbx + 0x90], rbp
mov qword [rbx + 0x88], rbp
mov qword [rbx + 0x98], rbp
mov qword [rbx + 0xa0], 0x2000000
mov dword [rbx + 0xf0], ebp
mov dword [rbx + 0xf4], 0x2000000
mov qword [rbx + 0xf8], rbp
mov qword [rbx + 0x100], rbp
mov qword [rbx + 0x108], rbp
mov qword [rbx + 0x110], rbp
mov qword [rbx + 0x118], rbp
mov qword [rbx + 0x120], rbp
mov qword [rbx + 0x140], rbp
mov qword [rbx + 0x148], rbp
mov qword [rbx + 0x128], rbp
mov qword [rbx + 0x150], rbp
mov qword [rbx + 0x158], rbp
mov qword [rbx + 0x130], rbp
mov qword [rbx + 0x160], rbp
mov qword [rbx + 0x138], rbp
mov qword [rbx + 0x168], rbp
mov qword [rbx + 0x170], rbp
mov qword [rbx + 0x178], rbp
mov qword [rbx + 0x180], rbp
mov qword [rbx + 0x188], rbp
mov qword [rbx + 0x190], rbp
mov qword [rbx + 0x198], rbp
mov dword [rsp + 0x78], ebp
mov dword [rsp + 0x80], edi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x140008ebc
mov ecx, dword [rsp + 0x78]
sub ecx, 1
je 0x140008eb2
sub ecx, 1
je 0x140008ea8
cmp ecx, 1
je 0x140008e9e
mov dword [rbx + 0x40], 0xfffff00
mov edi, 0xfffff00
jmp 0x140008eff
mov edi, 0x100
mov dword [rbx + 0x40], edi
jmp 0x140008eff
mov edi, 0x1000
mov dword [rbx + 0x40], edi
jmp 0x140008eff
mov edi, 0x100000
mov dword [rbx + 0x40], edi
jmp 0x140008eff
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
movsxd rcx, dword [rbx + 0x48]
cmp eax, 0x2736
jne 0x140008f28
test ecx, ecx
je 0x140008ef3
sub ecx, 1
je 0x140008ee5
cmp ecx, 1
je 0x140008ee0
mov edi, reloc.WS2_32.dll_recv
mov dword [rbx + 0x40], edi
jmp 0x140008eff
mov dword [rbx + 0x40], 2
mov edi, 2
jmp 0x140008eff
mov dword [rbx + 0x40], 1
mov edi, 1
test edi, 0xfffff00
je 0x140008ff1
movsxd rcx, dword [rbx + 0x48]
test edi, 0xfff00
je 0x140008f30
mov dword [rsp + 0x88], ebp
lea r8, [rsp + 0x88]
jmp 0x140008f3d
mov edi, 0x100000
mov dword [rbx + 0x40], edi
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, qword [rbx + 0x58]
test rax, rax
jne 0x140008f7c
lock inc dword [0x140068150]
lea ecx, [rax + 0x1c]
call fcn.14003ce88
test rax, rax
je 0x14000902a
xor ecx, ecx
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], rcx
mov dword [rax + 0x18], ecx
mov qword [rbx + 0x58], rax
cmp qword [rbx + 0x60], rbp
jne 0x140008fb3
lock inc dword [0x140068150]
mov ecx, 0x1c
call fcn.14003ce88
test rax, rax
je 0x14000904e
xor ecx, ecx
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], rcx
mov dword [rax + 0x18], ecx
mov qword [rbx + 0x60], rax
mov rax, qword [rbx + 0x58]
movsxd rcx, dword [rbx + 0x48]
lea r8, [rsp + 0x70]
mov rdx, rax
mov dword [rsp + 0x70], 0x1c
call qword [sym.imp.WS2_32.dll_getsockname]
test dword [rbx + 0x40], 0xff00000
je 0x140008ff1
movsxd rcx, dword [rbx + 0x48]
lea r8, [rsp + 0x70]
mov rdx, qword [rbx + 0x60]
mov dword [rsp + 0x70], 0x1c
call qword [sym.imp.WS2_32.dll_getpeername]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x48]
add rsp, 0x60
pop rbx
ret
mov ecx, 2
call fcn.140039584
mov rcx, rax
lea rdx, str.malloc_failed__n
call fcn.140009680
mov ecx, 0xffffffff
call fcn.14003ea08
int3
mov ecx, 2
call fcn.140039584
mov rcx, rax
lea rdx, str.malloc_failed__n
call fcn.140009680
mov ecx, 0xffffffff
call fcn.14003ea08
int3
mov ecx, 2
call fcn.140039584
mov rcx, rax
lea rdx, str.malloc_failed__n
call fcn.140009680
mov ecx, 0xffffffff
call fcn.14003ea08
int3