Function at 0x18005e520
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xd8
mov rbx, rdx
mov rsi, rcx
mov rcx, qword [0x18021a960]
test rcx, rcx
jne 0x18005e55e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x18005e9e0
mov rcx, rax
mov qword [0x18021a960], rax
mov r8d, 0x18
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x18005e9e0
mov rdi, rax
mov qword [rax], 1
mov qword [rax + 8], 1
mov byte [rax + 0x10], 0
mov r14, qword [rbx + 0x18]
cmp r14, 0xffffffffffffffff
je 0x18005e9dc
xorps xmm0, xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
mov dword [rsp + 0x28], 0x80
lea rdx, [rsp + 0x50]
lea r8, [rsp + 0x28]
mov rcx, r14
call sub.ws2_32.dll_getpeername
cmp eax, 0xffffffff
je 0x18005e62a
mov eax, dword [rsp + 0x28]
movzx ecx, word [rsp + 0x50]
cmp ecx, 0x17
je 0x18005e640
cmp ecx, 2
jne 0x18005e683
cmp eax, 0x10
jb 0x18005e9dc
mov eax, dword [rsp + 0x54]
movzx ecx, word [rsp + 0x52]
rol cx, 8
movzx r12d, cx
shl r12, 0x20
or r12, rax
xor ebp, ebp
jmp 0x18005e68e
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
mov bp, 2
jmp 0x18005e68e
cmp eax, 0x1c
jb 0x18005e9dc
movzx eax, word [rsp + 0x52]
rol ax, 8
mov word [rsp + 0x36], ax
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0x4c], eax
mov r12d, dword [rsp + 0x58]
shl r12, 0x10
mov rbx, qword [rsp + 0x5c]
mov bp, 1
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x44], eax
jmp 0x18005e68e
mov bp, 2
lea rbx, str.invalid_argument
xorps xmm0, xmm0
movaps xmmword [rsp + 0xc0], xmm0
movaps xmmword [rsp + 0xb0], xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
movaps xmmword [rsp + 0x50], xmm0
mov dword [rsp + 0x28], 0x80
lea rdx, [rsp + 0x50]
lea r8, [rsp + 0x28]
mov rcx, r14
call sub.ws2_32.dll_getsockname
cmp eax, 0xffffffff
je 0x18005e751
mov eax, dword [rsp + 0x28]
movzx ecx, word [rsp + 0x50]
cmp ecx, 2
je 0x18005e785
cmp ecx, 0x17
jne 0x18005e7ea
mov dword [rsp + 0x30], ebp
cmp eax, 0x1c
jb 0x18005e9dc
movzx eax, word [rsp + 0x52]
rol ax, 8
mov word [rsp + 0x2e], ax
mov ecx, dword [rsp + 0x54]
mov edx, dword [rsp + 0x68]
mov r13d, dword [rsp + 0x58]
shl r13, 0x10
mov r14, qword [rsp + 0x5c]
mov bp, 1
mov r8d, dword [rsp + 0x64]
cmp bp, 2
sete r15b
cmp word [rsp + 0x30], 2
jne 0x18005e7bc
jmp 0x18005e80d
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r14d, eax
shl r14, 0x20
or r14, 2
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
mov r15b, 1
cmp bp, 2
je 0x18005e826
jmp 0x18005e844
mov dword [rsp + 0x30], ebp
cmp eax, 0x10
jb 0x18005e9dc
mov eax, dword [rsp + 0x54]
movzx ecx, word [rsp + 0x52]
rol cx, 8
movzx r13d, cx
shl r13, 0x20
or r13, rax
xor ebp, ebp
cmp bp, 2
sete r15b
cmp word [rsp + 0x30], 2
je 0x18005e80d
cmp bp, 2
je 0x18005e80d
mov dword [rsp + 0x38], r8d
mov dword [rsp + 0x3c], edx
mov dword [rsp + 0x40], ecx
mov rcx, qword [0x18021a960]
test rcx, rcx
je 0x18005e915
movzx r15d, word [rsp + 0x2e]
jmp 0x18005e934
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
mov r15b, 1
lea r14, str.invalid_argument
cmp bp, 2
je 0x18005e826
jmp 0x18005e844
mov qword [rsi], 0
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
cmp word [rsp + 0x30], 2
jne case.0x18005e839.0
mov eax, ebx
and eax, 3
lea rcx, [0x18005ea04]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
test r15b, r15b
je 0x18005e9c8
mov eax, r14d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x18005e9c8
test rax, rax
je 0x18005e9c8
lea rsi, [r14 - 1]
mov rcx, qword [r14 - 1]
mov rax, qword [r14 + 7]
call qword [rax]
mov rax, qword [r14 + 7]
cmp qword [rax + 8], 0
je 0x18005e898
mov r8, qword [r14 - 1]
cmp qword [rax + 0x10], 0x11
jb 0x18005e889
mov r8, qword [r8 - 8]
mov rcx, qword [0x18021a960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x18021a960]
xor edx, edx
mov r8, rsi
add rsp, 0xd8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.KERNEL32.dll_HeapFree]
lea rsi, [rbx - 1]
mov rcx, qword [rbx - 1]
mov rax, qword [rbx + 7]
call qword [rax]
mov rax, qword [rbx + 7]
cmp qword [rax + 8], 0
je 0x18005e8f5
mov r8, qword [rbx - 1]
cmp qword [rax + 0x10], 0x11
jb 0x18005e8e6
mov r8, qword [r8 - 8]
mov rcx, qword [0x18021a960]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x18021a960]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r15b, r15b
jne 0x18005e844
jmp 0x18005e9c8
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
movzx r15d, word [rsp + 0x2e]
je 0x18005e9f1
mov rcx, rax
mov qword [0x18021a960], rax
mov r8d, 0x40
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x18005e9f1
mov ecx, dword [rsp + 0x30]
mov word [rax], cx
mov dword [rax + 2], r12d
shr r12, 0x20
mov word [rax + 6], r12w
mov qword [rax + 8], rbx
mov ecx, dword [rsp + 0x44]
mov dword [rax + 0x10], ecx
mov ecx, dword [rsp + 0x48]
mov dword [rax + 0x14], ecx
mov ecx, dword [rsp + 0x4c]
mov dword [rax + 0x18], ecx
movzx ecx, word [rsp + 0x36]
mov word [rax + 0x1c], cx
mov word [rax + 0x20], bp
mov dword [rax + 0x22], r13d
shr r13, 0x20
mov word [rax + 0x26], r13w
mov qword [rax + 0x28], r14
mov ecx, dword [rsp + 0x38]
mov dword [rax + 0x30], ecx
mov ecx, dword [rsp + 0x40]
mov dword [rax + 0x34], ecx
mov ecx, dword [rsp + 0x3c]
mov dword [rax + 0x38], ecx
mov word [rax + 0x3c], r15w
mov qword [rsi], rax
lea rax, [0x1801cb2b0]
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rdi
mov word [rsi + 0x18], 1
add rsp, 0xd8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2
mov ecx, 8
mov edx, 0x18
call fcn.18017f950
ud2
mov ecx, 4
mov edx, 0x40
call fcn.18017f950
ud2