Function at 0x140042290
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.14004b690]
lea rcx, [r12 - 8]
lea rdx, [rsp + 0x90]
call fcn.140028f10
mov qword [rsp + 0x90], rax
xor r13d, r13d
mov rax, qword [0x14027e030]
test rax, rax
je 0x1400423fc
mov rcx, rax
call fcn.14017610c
cmp dword [0x1402794e0], r13d
mov edi, r13d
mov qword [0x14027e030], r13
jle 0x14004234c
mov esi, r13d
nop dword [rax]
mov rbx, qword [0x1402794d8]
add rbx, rsi
mov rcx, qword [rbx]
test rcx, rcx
je 0x14004231a
call fcn.14017610c
mov qword [rbx], r13
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14004232c
call fcn.14017610c
mov qword [rbx + 0x30], r13
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x14004233e
call fcn.14017610c
mov qword [rbx + 8], r13
inc edi
add rsi, 0x38
cmp edi, dword [0x1402794e0]
jl 0x140042300
mov rcx, qword [0x1402794d8]
test rcx, rcx
je 0x140042364
call fcn.14017610c
mov qword [0x1402794d8], r13
mov ecx, dword [0x140263d24]
mov qword [0x1402794e0], r13
test ecx, ecx
js 0x140042384
call fcn.1400472f0
mov dword [0x140263d24], 0xffffffff
mov edx, dword [0x1402794c8]
mov ebx, r13d
mov rcx, qword [0x1402794c0]
test edx, edx
jle 0x1400423d1
mov rdi, r13
nop dword [rax + rax]
mov rax, qword [rdi + rcx + 8]
lea rsi, [rdi + rcx]
test rax, rax
je 0x1400423c7
mov rcx, rax
call fcn.14017610c
mov qword [rsi + 8], r13
mov edx, dword [0x1402794c8]
mov rcx, qword [0x1402794c0]
inc ebx
add rdi, 0x18
cmp ebx, edx
jl 0x1400423a0
test rcx, rcx
je 0x1400423e2
call fcn.14017610c
mov qword [0x1402794c0], r13
lea rcx, [0x1402794d0]
mov qword [0x1402794c8], r13
call fcn.14004b690
mov rax, qword [0x14027e030]
test rbp, rbp
jne 0x140042412
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 [0x1402794c0], r13
mov qword [0x1402794c8], r13
test r14d, r14d
jne 0x140042622
test rax, rax
je 0x1400424c5
mov rax, qword gs:[0x58]
mov edx, 0x22cc
mov rcx, qword [rax]
cmp dword [rdx + rcx], r13d
jne 0x1400424c5
mov r9d, 0x75
lea r8d, [r15 + 0x72]
mov ecx, r9d
mov edx, r15d
call fcn.14003f9a0
lea r8d, [r15 + 0xf]
mov edx, r15d
mov ecx, r15d
call fcn.140048a00
movsxd rdi, eax
test eax, eax
js 0x1400424dc
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rbx, qword [rax + rdi*8]
call sub.KERNEL32.dll_LeaveCriticalSection
mov rax, qword [rbx + 0x60]
test rax, rax
jne 0x1400424bf
lea edx, [rax + 1]
mov ecx, 0xb0
call fcn.140176104
mov qword [rbx + 0x60], rax
mov byte [rax + 0x64], 0x75
jmp 0x1400424d8
mov r8d, reloc.WS2_32.dll_recvfrom
mov edx, r15d
mov ecx, r15d
call fcn.140048a00
mov edi, eax
test edi, edi
jns 0x140042502
lea rdx, str.failed_socket__:__m
mov ecx, 0x4b0003
call fcn.14002d250
mov edi, eax
test eax, eax
jns 0x140042502
mov dword [0x140263d24], 0xffffffff
jmp 0x140042b3f
lea rcx, [0x14027dfa0]
mov dword [rsp + 0x80], 1
call sub.KERNEL32.dll_EnterCriticalSection
movsxd rax, edi
lea rcx, [0x14027dfa0]
lea rbx, [rax*8]
mov rax, qword [0x14027e020]
mov rsi, qword [rbx + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
test byte [rsi + 0x68], 1
je 0x1400425a8
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
mov rbx, qword [rbx + rax]
call sub.KERNEL32.dll_LeaveCriticalSection
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.140171070
test eax, eax
je 0x1400425a8
lea rdx, str.failed_ioctl_FIOBIO_:__m
mov ecx, 0x4b0003
call fcn.14002d250
test eax, eax
je 0x1400425af
mov ecx, edi
call fcn.1400472f0
or edi, 0xffffffff
jmp 0x1400425af
or dword [rsi + 0x68], 0x80
mov dword [0x140263d24], edi
test edi, edi
js 0x140042b3f
lea rcx, [0x14027dfa0]
call sub.KERNEL32.dll_EnterCriticalSection
mov rax, qword [0x14027e020]
lea rcx, [0x14027dfa0]
movsxd rdx, edi
mov rbx, qword [rax + rdx*8]
call sub.KERNEL32.dll_LeaveCriticalSection
or dword [rbx + 0x68], 0x10000000
lea rdx, [rsp + 0x30]
mov ecx, dword [0x140263d24]
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.14003fd90
test eax, eax
jne 0x140042b51
mov rdx, rbp
lea rcx, [0x14027e030]
call fcn.14002a080
mov rdx, qword [0x14027e030]
mov rcx, qword [rsp + 0x90]
call fcn.14004b890
mov ecx, r13d
mov rbp, qword [rax]
mov eax, r13d
mov qword [0x1402794d8], r13
mov dword [0x1402794e0], eax
mov dword [0x1402794e4], ecx
mov rbx, qword [rbp]
test rbx, rbx
je 0x140042b23
lea rsi, str.reject
lea r14, str.reuse
lea r15, str.mcast
inc eax
cmp eax, ecx
jle 0x14004269f
mov edx, eax
lea rcx, [0x1402794d8]
call fcn.140042ca0
mov eax, dword [0x1402794e0]
jmp 0x1400426a5
mov dword [0x1402794e0], eax
dec eax
lea r8, [fcn.14004b690]
movsxd rcx, eax
lea rdx, [rsp + 0x80]
imul rdi, rcx, 0x38
lea rcx, [r12 - 8]
add rdi, qword [0x1402794d8]
call fcn.140028f10
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.14002a080
movsx ecx, byte [rbx]
mov r9d, 0x3e
xor r8d, r8d
mov dword [rsp + 0x20], 0x3c
mov r10, rbx
lea edx, [r9 - 0x3b]
call fcn.14003f9a0
test eax, eax
jne 0x140042747
movsx ecx, byte [rbx + 1]
mov r9d, 0x3e
inc rbx
mov dword [rsp + 0x20], 0x3c
xor r8d, r8d
lea edx, [r9 - 0x3b]
call fcn.14003f9a0
test eax, eax
je 0x140042722
mov r8, rbx
lea rcx, [rdi + 8]
sub r8, r10
mov rdx, r10
call fcn.14002a4f0
movsx r10d, byte [rbx]
mov edx, 2
mov ecx, r10d
lea r9d, [rdx + 0x3a]
lea r8d, [rdx + 0x3c]
call fcn.14003f9a0
test eax, eax
je 0x140042c87
cmp r10b, r9b
lea rdx, [rbx + 1]
mov eax, r13d
lea r8, [0x1401a679c]
sete al
xor r9d, r9d
mov dword [rdi + 0x10], eax
mov rcx, qword [rsp + 0x80]
call fcn.14004b820
mov rbx, qword [rax]
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400427bb
or rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], r13b
jne 0x1400427b0
jmp 0x1400427be
mov rax, r13
cmp eax, 1
jne 0x1400427fb
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], WSASetLastError
lea r9d, [rdx + 0x71]
lea r8d, [rdx + 0x70]
call fcn.14003f9a0
test eax, eax
je 0x140042b69
jmp 0x1400427ff
mov byte [rdi + 0x22], reloc.WS2_32.dll_WSACleanup
mov r8, qword [rbx]
test r8, r8
je 0x140042b7f
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 0x14004283a
cmp rcx, 7
jne 0x140042820
or dword [rdi + 0x24], 2
jmp 0x1400428ad
mov rcx, r13
nop dword [rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [r14 + rcx - 1]
jne 0x14004285b
cmp rcx, 6
jne 0x140042840
or dword [rdi + 0x24], 4
jmp 0x1400428ad
mov rax, r13
nop
movzx ecx, byte [r8 + rax]
inc rax
cmp cl, byte [r15 + rax - 1]
jne 0x14004287b
cmp rax, 6
jne 0x140042860
or dword [rdi + 0x24], 8
jmp 0x1400428ad
lea rdx, [0x1401ab99c]
mov rcx, r8
call fcn.140029f20
test eax, eax
je 0x1400428a1
mov rcx, qword [rbx]
lea rdx, [0x1401ab9a0]
call fcn.140029f20
test eax, eax
jne 0x1400428c3
mov rdx, qword [rbx]
lea rcx, [rdi + 0x30]
call fcn.14002a080
mov r8, qword [rbx + 8]
add rbx, 8
test r8, r8
je 0x140042b7f
jmp 0x140042810
mov rcx, qword [rbx]
test rcx, rcx
je 0x140042b7f
movzx eax, byte [rdi + 0x22]
cmp al, 0x70
jne 0x140042938
cmp qword [rdi + 0x30], r13
je 0x140042bc1
call fcn.14016d910
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 0x140042bab
mov rcx, qword [rbx + 8]
call fcn.14016d910
mov edx, eax
mov eax, 0x100
movzx ecx, dx
imul ecx, eax
shr dx, 8
add cx, dx
mov word [rdi + 0x20], cx
je 0x140042b95
add rbx, 0x10
jmp 0x140042afc
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.14003f9a0
test eax, eax
je 0x140042c71
mov r15, qword gs:[0x58]
mov eax, 0x2f80
mov r14d, eax
mov rsi, qword [r15]
mov rax, qword [rsi + rax]
test rax, rax
jne 0x14004297f
call fcn.1401760e4
mov dword [rax], r13d
mov rcx, qword [rbx]
movzx eax, byte [rcx]
cmp al, byte [0x1401aba5c]
jne 0x1400429a1
movzx eax, byte [rcx + 1]
cmp al, byte [0x1401aba5d]
jne 0x1400429a1
mov eax, r13d
jmp 0x1400429a6
call fcn.140170880
mov dword [rdi + 0x14], eax
mov rax, qword [rsi + r14]
test rax, rax
jne 0x1400429b7
call fcn.1401760e4
cmp dword [rax], r13d
jne 0x140042c5b
mov rcx, qword [rbx + 8]
add rbx, 8
test rcx, rcx
je 0x140042c45
call fcn.14016d910
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.14003f9a0
test eax, eax
je 0x140042a3d
cmp word [rdi + 0x18], r13w
je 0x140042a3d
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140042bd7
call fcn.14016d910
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 0x140042a46
movzx edx, word [rdi + 0x18]
mov eax, 8
add rbx, rax
mov word [rdi + 0x1a], dx
cmp qword [rbx], r13
je 0x140042c2f
mov rsi, qword [r15]
mov rax, qword [rsi + r14]
test rax, rax
jne 0x140042a67
call fcn.1401760e4
mov dword [rax], r13d
mov rcx, qword [rbx]
movzx eax, byte [rcx]
cmp al, byte [0x1401aba5c]
jne 0x140042a89
movzx eax, byte [rcx + 1]
cmp al, byte [0x1401aba5d]
jne 0x140042a89
mov eax, r13d
jmp 0x140042a8e
call fcn.140170880
mov dword [rdi + 0x1c], eax
mov rax, qword [rsi + r14]
test rax, rax
jne 0x140042a9f
call fcn.1401760e4
cmp dword [rax], r13d
jne 0x140042c19
mov rcx, qword [rbx + 8]
add rbx, 8
test rcx, rcx
je 0x140042ad6
call fcn.14016d910
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 0x140042ae7
cmp word [rdi + 0x20], r13w
je 0x140042bed
lea rsi, str.reject
lea r14, str.reuse
lea r15, str.mcast
cmp qword [rbx], r13
jne 0x140042c03
mov rbx, qword [rbp + 8]
add rbp, 8
test rbx, rbx
je 0x140042b23
mov ecx, dword [0x1402794e4]
mov eax, dword [0x1402794e0]
jmp 0x140042683
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, 0x4b
call fcn.140028b40
int3
mov r8d, 0x14c9
lea rdx, str.jtest_tr:_port__d_already_in_use
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_int_is_in_tr__prot__t__u__i__p_:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__port_src__htons_atoi_a__:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__tr_port__tr__port_dst__htons_atoi_a__:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_tr__dev:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr___tr__proti___tr__port_src_:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__a:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__errno:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_a:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr__errno:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_0:__s
mov ecx, 0x4b
call fcn.140028b40
int3
mov r8, qword [rbp]
lea rdx, str.invalid_sock_tr_int_is_in_dir_______:__s
mov ecx, 0x4b
call fcn.140028b40
int3