Function at 0x140043960
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
mov r14d, edx
lea r12, [rsp + 0x78]
mov rbp, rcx
lea r8, [fcn.140039600]
lea rcx, [r12 - 8]
lea rdx, [rsp + 0x90]
call fcn.140025270
mov qword [rsp + 0x90], rax
xor r13d, r13d
mov rax, qword [0x140270f18]
test rax, rax
je 0x140043acc
mov rcx, rax
call fcn.140174cec
cmp dword [0x14026cc30], r13d
mov edi, r13d
mov qword [0x140270f18], r13
jle 0x140043a1c
mov esi, r13d
nop dword [rax]
mov rbx, qword [0x14026cc28]
add rbx, rsi
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400439ea
call fcn.140174cec
mov qword [rbx], r13
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x1400439fc
call fcn.140174cec
mov qword [rbx + 0x30], r13
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140043a0e
call fcn.140174cec
mov qword [rbx + 8], r13
inc edi
add rsi, 0x38
cmp edi, dword [0x14026cc30]
jl 0x1400439d0
mov rcx, qword [0x14026cc28]
test rcx, rcx
je 0x140043a34
call fcn.140174cec
mov qword [0x14026cc28], r13
mov ecx, dword [0x140259784]
mov qword [0x14026cc30], r13
test ecx, ecx
js 0x140043a54
call fcn.140048860
mov dword [0x140259784], 0xffffffff
mov edx, dword [0x14026cc18]
mov ebx, r13d
mov rcx, qword [0x14026cc10]
test edx, edx
jle 0x140043aa1
mov rdi, r13
nop dword [rax + rax]
mov rax, qword [rdi + rcx + 8]
lea rsi, [rdi + rcx]
test rax, rax
je 0x140043a97
mov rcx, rax
call fcn.140174cec
mov qword [rsi + 8], r13
mov edx, dword [0x14026cc18]
mov rcx, qword [0x14026cc10]
inc ebx
add rdi, 0x18
cmp ebx, edx
jl 0x140043a70
test rcx, rcx
je 0x140043ab2
call fcn.140174cec
mov qword [0x14026cc10], r13
lea rcx, [0x14026cc20]
mov qword [0x14026cc18], r13
call fcn.140039600
mov rax, qword [0x140270f18]
test rbp, rbp
jne 0x140043ae2
xor eax, eax
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x88], r15
mov r15d, 2
mov qword [0x14026cc10], r13
mov qword [0x14026cc18], r13
test r14d, r14d
jne 0x140043cf2
test rax, rax
je 0x140043b95
mov rax, qword gs:[0x58]
mov edx, 0x23d4
mov rcx, qword [rax]
cmp dword [rdx + rcx], r13d
jne 0x140043b95
mov r9d, 0x75
lea r8d, [r15 + 0x72]
mov ecx, r9d
mov edx, r15d
call fcn.140040f40
lea r8d, [r15 + 0xf]
mov edx, r15d
mov ecx, r15d
call fcn.140049f70
movsxd rdi, eax
test eax, eax
js 0x140043bac
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rbx, qword [rax + rdi*8]
call fcn.14002e7d0
mov rax, qword [rbx + 0x60]
test rax, rax
jne 0x140043b8f
lea edx, [rax + 1]
mov ecx, 0xb0
call fcn.140174ce4
mov qword [rbx + 0x60], rax
mov byte [rax + 0x64], 0x75
jmp 0x140043ba8
mov r8d, reloc.WS2_32.dll_recvfrom
mov edx, r15d
mov ecx, r15d
call fcn.140049f70
mov edi, eax
test edi, edi
jns 0x140043bd2
lea rdx, str.failed_socket__:__m
mov ecx, 0x580003
call fcn.140028e10
mov edi, eax
test eax, eax
jns 0x140043bd2
mov dword [0x140259784], 0xffffffff
jmp 0x14004420f
lea rcx, [0x140270f40]
mov dword [rsp + 0x80], 1
call sub.KERNEL32.dll_EnterCriticalSection
movsxd rax, edi
lea rcx, [0x140270f40]
lea rbx, [rax*8]
mov rax, qword [0x140270fc0]
mov rsi, qword [rbx + rax]
call fcn.14002e7d0
test byte [rsi + 0x68], 1
je 0x140043c78
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
mov rbx, qword [rbx + rax]
call fcn.14002e7d0
movsxd rcx, dword [rbx + 0x70]
lea r8, [rsp + 0x80]
mov edx, 0x8004667e
call qword [sym.imp.WS2_32.dll_ioctlsocket]
movsxd rcx, eax
call fcn.140170a40
test eax, eax
je 0x140043c78
lea rdx, str.failed_ioctl_FIOBIO_:__m
mov ecx, 0x580003
call fcn.140028e10
test eax, eax
je 0x140043c7f
mov ecx, edi
call fcn.140048860
or edi, 0xffffffff
jmp 0x140043c7f
or dword [rsi + 0x68], 0x80
mov dword [0x140259784], edi
test edi, edi
js 0x14004420f
lea rcx, [0x140270f40]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x140270fc0]
lea rcx, [0x140270f40]
movsxd rdx, edi
mov rbx, qword [rax + rdx*8]
call fcn.14002e7d0
or dword [rbx + 0x68], 0x10000000
lea rdx, [rsp + 0x30]
mov ecx, dword [0x140259784]
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0xc9140002
lea r8d, [rax + 0x10]
mov dword [rsp + 0x34], 0x100007f
call fcn.140041330
test eax, eax
jne 0x140044221
mov rdx, rbp
lea rcx, [0x140270f18]
call fcn.140026210
mov rdx, qword [0x140270f18]
mov rcx, qword [rsp + 0x90]
call fcn.140039800
mov ecx, r13d
mov rbp, qword [rax]
mov eax, r13d
mov qword [0x14026cc28], r13
mov dword [0x14026cc30], eax
mov dword [0x14026cc34], ecx
mov rbx, qword [rbp]
test rbx, rbx
je 0x1400441f3
lea rsi, str.reject
lea r14, str.reuse
lea r15, str.mcast
inc eax
cmp eax, ecx
jle 0x140043d6f
mov edx, eax
lea rcx, [0x14026cc28]
call fcn.140044370
mov eax, dword [0x14026cc30]
jmp 0x140043d75
mov dword [0x14026cc30], eax
dec eax
lea r8, [fcn.140039600]
movsxd rcx, eax
lea rdx, [rsp + 0x80]
imul rdi, rcx, 0x38
lea rcx, [r12 - 8]
add rdi, qword [0x14026cc28]
call fcn.140025270
mov qword [rsp + 0x80], rax
mov rdx, rbx
xor eax, eax
mov rcx, rdi
mov qword [rdi], rax
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rax
mov qword [rdi + 0x20], rax
mov qword [rdi + 0x28], rax
mov qword [rdi + 0x30], rax
call fcn.140026210
movsx ecx, byte [rbx]
mov r9d, 0x3e
xor r8d, r8d
mov dword [rsp + 0x20], 0x3c
mov r10, rbx
lea edx, [r9 - 0x3b]
call fcn.140040f40
test eax, eax
jne 0x140043e17
movsx ecx, byte [rbx + 1]
mov r9d, 0x3e
inc rbx
mov dword [rsp + 0x20], 0x3c
xor r8d, r8d
lea edx, [r9 - 0x3b]
call fcn.140040f40
test eax, eax
je 0x140043df2
mov r8, rbx
lea rcx, [rdi + 8]
sub r8, r10
mov rdx, r10
call fcn.140026680
movsx r10d, byte [rbx]
mov edx, 2
mov ecx, r10d
lea r9d, [rdx + 0x3a]
lea r8d, [rdx + 0x3c]
call fcn.140040f40
test eax, eax
je 0x140044357
cmp r10b, r9b
lea rdx, [rbx + 1]
mov eax, r13d
lea r8, [0x14019a638]
sete al
xor r9d, r9d
mov dword [rdi + 0x10], eax
mov rcx, qword [rsp + 0x80]
call fcn.140039790
mov rbx, qword [rax]
mov rcx, qword [rbx]
test rcx, rcx
je 0x140043e8b
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], r13b
jne 0x140043e80
jmp 0x140043e8e
mov rax, r13
cmp eax, 1
jne 0x140043ecb
movsx eax, byte [rcx]
mov edx, 4
mov ecx, eax
mov dword [rsp + 0x28], reloc.WS2_32.dll_WSASetLastError
mov byte [rdi + 0x22], al
add rbx, 8
mov dword [rsp + 0x20], WSAGetLastError
lea r9d, [rdx + 0x71]
lea r8d, [rdx + 0x70]
call fcn.140040f40
test eax, eax
je 0x140044239
jmp 0x140043ecf
mov byte [rdi + 0x22], reloc.WS2_32.dll_WSACleanup
mov r8, qword [rbx]
test r8, r8
je 0x14004424f
nop dword [rax + rax]
mov rcx, r13
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rsi + rcx - 1]
jne 0x140043f0a
cmp rcx, 7
jne 0x140043ef0
or dword [rdi + 0x24], 2
jmp 0x140043f7d
mov rcx, r13
nop dword [rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [r14 + rcx - 1]
jne 0x140043f2b
cmp rcx, 6
jne 0x140043f10
or dword [rdi + 0x24], 4
jmp 0x140043f7d
mov rax, r13
nop
movzx ecx, byte [r8 + rax]
inc rax
cmp cl, byte [r15 + rax - 1]
jne 0x140043f4b
cmp rax, 6
jne 0x140043f30
or dword [rdi + 0x24], 8
jmp 0x140043f7d
lea rdx, [0x14019bddc]
mov rcx, r8
call fcn.1400260b0
test eax, eax
je 0x140043f71
mov rcx, qword [rbx]
lea rdx, [0x14019bde0]
call fcn.1400260b0
test eax, eax
jne 0x140043f93
mov rdx, qword [rbx]
lea rcx, [rdi + 0x30]
call fcn.140026210
mov r8, qword [rbx + 8]
add rbx, 8
test r8, r8
je 0x14004424f
jmp 0x140043ee0
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004424f
movzx eax, byte [rdi + 0x22]
cmp al, 0x70
jne 0x140044008
cmp qword [rdi + 0x30], r13
je 0x140044291
call fcn.14016c540
mov edx, eax
mov eax, 0x100
movzx ecx, dx
imul ecx, eax
shr dx, 8
add cx, dx
mov word [rdi + 0x18], cx
mov word [rdi + 0x1a], cx
je 0x14004427b
mov rcx, qword [rbx + 8]
call fcn.14016c540
mov edx, eax
mov eax, 0x100
movzx ecx, dx
imul ecx, eax
shr dx, 8
add cx, dx
mov word [rdi + 0x20], cx
je 0x140044265
add rbx, 0x10
jmp 0x1400441cc
mov edx, 3
movsx ecx, al
mov dword [rsp + 0x20], reloc.WS2_32.dll_WSACleanup
lea r9d, [rdx + 0x72]
lea r8d, [rdx + 0x66]
call fcn.140040f40
test eax, eax
je 0x140044341
mov r15, qword gs:[0x58]
mov eax, 0x2fe0
mov r14d, eax
mov rsi, qword [r15]
mov rax, qword [rsi + rax]
test rax, rax
jne 0x14004404f
call fcn.140174cc4
mov dword [rax], r13d
mov rcx, qword [rbx]
movzx eax, byte [rcx]
cmp al, byte [0x14019be9c]
jne 0x140044071
movzx eax, byte [rcx + 1]
cmp al, byte [0x14019be9d]
jne 0x140044071
mov eax, r13d
jmp 0x140044076
call fcn.14016ce10
mov dword [rdi + 0x14], eax
mov rax, qword [rsi + r14]
test rax, rax
jne 0x140044087
call fcn.140174cc4
cmp dword [rax], r13d
jne 0x14004432b
mov rcx, qword [rbx + 8]
add rbx, 8
test rcx, rcx
je 0x140044315
call fcn.14016c540
mov edx, eax
mov esi, 0x100
movzx ecx, dx
shr dx, 8
movzx eax, si
imul ecx, eax
add cx, dx
mov edx, 2
mov word [rdi + 0x18], cx
movsx ecx, byte [rdi + 0x22]
lea r9d, [rdx + 0x72]
lea r8d, [rdx + 0x73]
call fcn.140040f40
test eax, eax
je 0x14004410d
cmp word [rdi + 0x18], r13w
je 0x14004410d
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x1400442a7
call fcn.14016c540
mov ecx, eax
movzx eax, si
movzx edx, cx
imul edx, eax
mov eax, reloc.WS2_32.dll_recv
shr cx, 8
add dx, cx
jmp 0x140044116
movzx edx, word [rdi + 0x18]
mov eax, 8
add rbx, rax
mov word [rdi + 0x1a], dx
cmp qword [rbx], r13
je 0x1400442ff
mov rsi, qword [r15]
mov rax, qword [rsi + r14]
test rax, rax
jne 0x140044137
call fcn.140174cc4
mov dword [rax], r13d
mov rcx, qword [rbx]
movzx eax, byte [rcx]
cmp al, byte [0x14019be9c]
jne 0x140044159
movzx eax, byte [rcx + 1]
cmp al, byte [0x14019be9d]
jne 0x140044159
mov eax, r13d
jmp 0x14004415e
call fcn.14016ce10
mov dword [rdi + 0x1c], eax
mov rax, qword [rsi + r14]
test rax, rax
jne 0x14004416f
call fcn.140174cc4
cmp dword [rax], r13d
jne 0x1400442e9
mov rcx, qword [rbx + 8]
add rbx, 8
test rcx, rcx
je 0x1400441a6
call fcn.14016c540
mov edx, eax
mov eax, 0x100
movzx ecx, dx
imul ecx, eax
shr dx, 8
add cx, dx
mov word [rdi + 0x20], cx
add rbx, 8
cmp byte [rdi + 0x22], 0x69
jne 0x1400441b7
cmp word [rdi + 0x20], r13w
je 0x1400442bd
lea rsi, str.reject
lea r14, str.reuse
lea r15, str.mcast
cmp qword [rbx], r13
jne 0x1400442d3
mov rbx, qword [rbp + 8]
add rbp, 8
test rbx, rbx
je 0x1400441f3
mov ecx, dword [0x14026cc34]
mov eax, dword [0x14026cc30]
jmp 0x140043d53
mov eax, 1
mov r15, qword [rsp + 0x88]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rdx, str.failed_socket
mov ecx, 0x58
call fcn.14003e580
int3
mov r8d, 0x14c9
lea rdx, str.jtest_tr:_port__d_already_in_use
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_int_is_in_tr__prot__t__u__i__p_:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__port_src__htons_atoi_a__:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__tr_port__tr__port_dst__htons_atoi_a__:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__dev:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr___tr__proti___tr__port_src_:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__a:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__errno:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__errno:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_0:__s
mov ecx, 0x58
call fcn.14003e580
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_int_is_in_dir_______:__s
mov ecx, 0x58
call fcn.14003e580
int3