Function at 0x14001186b
Capabilities:
Create tcp socket
Get socket status
Initialize winsock library
Set socket configuration
Start tcp server

Disassembly:
jmp 0x14002b9c0
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rdi
mov eax, 0x4011a8
call fcn.14001123a
sub rsp, rax
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1002da
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x4011c8]
mov rax, qword [0x140042b18]
xor rax, rbp
mov qword [rbp + 0x401158], rax
lea rcx, reloc.WS2_32.dll_accept
call fcn.140011c99
lea rcx, [0x140043428]
call fcn.140011109
mov qword [rbp + 0x401148], rax
lea rcx, [0x140043450]
call fcn.140011109
mov qword [rbp + 0x401150], rax
call fcn.14001116d
mov rcx, qword [rbp + 0x401148]
mov qword [rsp + 0x30], rcx
mov ecx, dword [reloc.WS2_32.dll_accept]
mov dword [rsp + 0x28], ecx
mov ecx, dword [0x140042ae8]
mov dword [rsp + 0x20], ecx
mov r9d, dword [0x140042aec]
mov rcx, qword [rbp + 0x401150]
mov r8, rcx
mov rdx, rax
lea rcx, str._s_Cli_used_as_lfrpCli__th_tunHost__tp_tunPort__sp_LocalServerPort__sn_ServiceNumber__k_AESKey__default_is_lfrpCli__th__s__tp__d__sp__d__sn__d__k__s_n
call fcn.14001160e
mov dword [rbp + 4], 0
mov dword [rbp + 4], 0
jmp 0x14002ba95
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
mov eax, dword [rbp + 0x401180]
cmp dword [rbp + 4], eax
jge 0x14002bc45
movsxd rax, dword [rbp + 4]
lea rdx, [0x14003b838]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call fcn.140011dd4
test eax, eax
jne 0x14002baf8
mov eax, dword [rbp + 4]
inc eax
cmp eax, dword [rbp + 0x401180]
jg 0x14002baf8
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x401188]
mov rdx, qword [rcx + rax*8]
lea rcx, [0x140043450]
call fcn.140011082
jmp 0x14002bc40
movsxd rax, dword [rbp + 4]
lea rdx, [0x14003b83c]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call fcn.140011dd4
test eax, eax
jne 0x14002bb4c
mov eax, dword [rbp + 4]
inc eax
cmp eax, dword [rbp + 0x401180]
jg 0x14002bb4c
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.ucrtbased.dll_atoi]
mov dword [0x140042aec], eax
jmp 0x14002bc40
movsxd rax, dword [rbp + 4]
lea rdx, [0x14003b840]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call fcn.140011dd4
test eax, eax
jne 0x14002bba0
mov eax, dword [rbp + 4]
inc eax
cmp eax, dword [rbp + 0x401180]
jg 0x14002bba0
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.ucrtbased.dll_atoi]
mov dword [0x140042ae8], eax
jmp 0x14002bc40
movsxd rax, dword [rbp + 4]
lea rdx, [0x14003b844]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call fcn.140011dd4
test eax, eax
jne 0x14002bbf1
mov eax, dword [rbp + 4]
inc eax
cmp eax, dword [rbp + 0x401180]
jg 0x14002bbf1
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x401188]
mov rdx, qword [rcx + rax*8]
lea rcx, [0x140043428]
call fcn.140011082
jmp 0x14002bc40
movsxd rax, dword [rbp + 4]
lea rdx, [0x14003b848]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call fcn.140011dd4
test eax, eax
jne 0x14002bc40
mov eax, dword [rbp + 4]
inc eax
cmp eax, dword [rbp + 0x401180]
jg 0x14002bc40
mov eax, dword [rbp + 4]
inc eax
mov dword [rbp + 4], eax
movsxd rax, dword [rbp + 4]
mov rcx, qword [rbp + 0x401188]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.ucrtbased.dll_atoi]
mov dword [reloc.WS2_32.dll_accept], eax
jmp 0x14002ba8d
lea rcx, [0x140043428]
call fcn.140011109
mov rcx, rax
call fcn.140011609
mov dword [rbp + 0x24], 0
mov qword [rbp + 0x78], 0xffffffffffffffff
mov dword [rbp + 0x94], 0
lea rdx, [rbp + 0xc0]
mov cx, 0x202
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [rbp + 0x24], eax
cmp dword [rbp + 0x24], 0
je 0x14002bcd5
mov ecx, dword [rbp + 0x24]
call qword [sym.imp.WS2_32.dll_WSASetLastError]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.WSAStartup__
lea rdx, str._n_Server__s_
mov rcx, rax
call fcn.140011b31
mov eax, 1
jmp 0x14002c5ef
mov eax, 2
mov word [rbp + 0x48], ax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp + 0x4c], eax
movzx ecx, word [0x140042ae8]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x4a], ax
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp + 0x78], rax
cmp qword [rbp + 0x78], 0xffffffffffffffff
jne 0x14002bd5b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.socket__
lea rdx, str._n_Server__s_
mov rcx, rax
call fcn.140011b31
mov eax, 1
jmp 0x14002c5ef
mov dword [rbp + 0x274], 1
lea r8, [rbp + 0x274]
mov edx, 0x8004667e
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 0x48]
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x14002bdde
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.bind__
lea rdx, str._n_Server__s_
mov rcx, rax
call fcn.140011b31
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
jmp 0x14002c5ef
mov edx, 5
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x14002be32
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
mov ecx, 2
call qword [sym.imp.ucrtbased.dll___acrt_iob_func]
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.listen__
lea rdx, str._n_Server__s_
mov rcx, rax
call fcn.140011b31
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_closesocket]
lea rcx, [0x140043400]
call fcn.140011109
mov qword [rbp + 0x401148], rax
call fcn.14001116d
mov r9d, dword [0x140042ae8]
mov rcx, qword [rbp + 0x401148]
mov r8, rcx
mov rdx, rax
lea rcx, str._s__Server_
call fcn.14001160e
mov edx, 0x200070
lea rcx, [rbp + 0x2a0]
call fcn.14001199c
lea rcx, [rbp + 0x2a0]
call fcn.14001112c
nop
mov edx, 0x18
lea rcx, [rbp + 0x200328]
call fcn.14001143d
lea rcx, [rbp + 0x200328]
call fcn.14001101e
nop
lea rcx, [0x140043450]
call fcn.140011109
mov r8d, dword [0x140042aec]
mov rdx, rax
lea rcx, [rbp + 0x2a0]
call fcn.140011c3f
test eax, eax
je 0x14002bf02
mov qword [rbp + 0x2a0], 0xffffffffffffffff
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
call fcn.14001116d
mov ecx, dword [rbp + 0x401144]
mov r8d, ecx
mov rdx, rax
lea rcx, str._s_connect___Tun_Failed:__d_n
call fcn.14001160e
jmp 0x14002bf0e
lea rcx, [rbp + 0x2a0]
call fcn.140011839
call fcn.140011640
mov dword [rbp + 0x200354], eax
call fcn.140011640
mov dword [rbp + 0x200374], eax
mov edx, 0x200070
lea rcx, [rbp + 0x2003a0]
call fcn.14001199c
lea rcx, [rbp + 0x2003a0]
call fcn.14001112c
nop
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x2003a0], rax
xor eax, eax
cmp eax, 1
je 0x14002c5c9
xor eax, eax
cmp eax, 1
je 0x14002c5c4
mov byte [rbp + 0x400884], 0
mov dword [rbp + 0x400430], 0
mov dword [rbp + 0x400660], 0
mov dword [rbp + 0x4008a4], 0
jmp 0x14002bf98
mov eax, dword [rbp + 0x4008a4]
inc eax
mov dword [rbp + 0x4008a4], eax
mov eax, dword [rbp + 0x400430]
cmp dword [rbp + 0x4008a4], eax
jae 0x14002bfc1
mov eax, dword [rbp + 0x4008a4]
mov rcx, qword [rbp + 0x2003a0]
cmp qword [rbp + rax*8 + 0x400438], rcx
jne 0x14002bfbf
jmp 0x14002bfc1
jmp 0x14002bf8a
mov eax, dword [rbp + 0x400430]
cmp dword [rbp + 0x4008a4], eax
jne 0x14002bffb
cmp dword [rbp + 0x400430], 0x40
jae 0x14002bffb
mov eax, dword [rbp + 0x4008a4]
mov rcx, qword [rbp + 0x2003a0]
mov qword [rbp + rax*8 + 0x400438], rcx
mov eax, dword [rbp + 0x400430]
inc eax
mov dword [rbp + 0x400430], eax
xor eax, eax
test eax, eax
jne 0x14002bf7e
mov rax, qword [rbp + 0x2003a0]
mov qword [rbp + 0x4008c8], rax
cmp qword [rbp + 0x2a0], 0xffffffffffffffff
je 0x14002c07a
lea r8, [rbp + 0x400660]
lea rdx, [rbp + 0x400430]
lea rcx, [rbp + 0x2a0]
call fcn.140011370
mov rax, qword [rbp + 0x2a0]
cmp qword [rbp + 0x4008c8], rax
jbe 0x14002c057
mov rax, qword [rbp + 0x4008c8]
mov qword [rbp + 0x401148], rax
jmp 0x14002c065
mov rax, qword [rbp + 0x2a0]
mov qword [rbp + 0x401148], rax
mov rax, qword [rbp + 0x401148]
mov qword [rbp + 0x4008c8], rax
mov byte [rbp + 0x400884], 1
mov edx, 0x18
lea rcx, [rbp + 0x4008e8]
call fcn.140011267
lea rdx, [rbp + 0x4008e8]
lea rcx, [rbp + 0x200328]
call fcn.140011db1
nop
jmp 0x14002c0c3
xor r8d, r8d
lea rdx, [rbp + 0x401028]
lea rcx, [rbp + 0x4008e8]
call fcn.14001128a
lea rcx, [rbp + 0x401028]
call fcn.140011aff
lea rdx, [rbp + 0x401078]
lea rcx, [rbp + 0x200328]
call fcn.140011a19
mov qword [rbp + 0x401148], rax
mov rdx, qword [rbp + 0x401148]
lea rcx, [rbp + 0x4008e8]
call fcn.1400119b5
mov byte [rbp + 0x401054], al
lea rcx, [rbp + 0x401078]
call fcn.140011aff
movzx eax, byte [rbp + 0x401054]
test eax, eax
je 0x14002c1a7
lea rcx, [rbp + 0x4008e8]
call fcn.140011c62
mov rax, qword [rax + 8]
mov qword [rbp + 0x400918], rax
cmp qword [rbp + 0x400918], 0
je 0x14002c1a2
mov rax, qword [rbp + 0x400918]
cmp qword [rax], 0xffffffffffffffff
je 0x14002c1a2
lea r8, [rbp + 0x400660]
lea rdx, [rbp + 0x400430]
mov rcx, qword [rbp + 0x400918]
call fcn.140011370
mov rax, qword [rbp + 0x400918]
mov rax, qword [rax]
cmp qword [rbp + 0x4008c8], rax
jbe 0x14002c17c
mov rax, qword [rbp + 0x4008c8]
mov qword [rbp + 0x401148], rax
jmp 0x14002c18d
mov rax, qword [rbp + 0x400918]
mov rax, qword [rax]
mov qword [rbp + 0x401148], rax
mov rax, qword [rbp + 0x401148]
mov qword [rbp + 0x4008c8], rax
mov byte [rbp + 0x400884], 1
jmp 0x14002c0a1
lea rcx, [rbp + 0x4008e8]
call fcn.140011aff
movzx eax, byte [rbp + 0x400884]
test eax, eax
je 0x14002c48e
mov dword [rbp + 0x400938], 5
mov dword [rbp + 0x40093c], 0
lea rax, [rbp + 0x400938]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp + 0x400660]
lea rdx, [rbp + 0x400430]
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov dword [rbp + 0x94], eax
cmp dword [rbp + 0x94], 0
jne 0x14002c269
call fcn.140011640
mov dword [rbp + 0x400954], eax
cmp qword [rbp + 0x2a0], 0xffffffffffffffff
je 0x14002c269
mov eax, dword [rbp + 0x200374]
mov ecx, dword [rbp + 0x400954]
sub ecx, eax
mov eax, ecx
cmp eax, 0xa
jbe 0x14002c269
mov eax, dword [rbp + 0x400954]
mov dword [rbp + 0x200374], eax
lea rcx, [rbp + 0x400978]
call fcn.140011bfe
lea rdx, [rbp + 0x400978]
lea rcx, [rbp + 0x1002d8]
call fcn.140011b13
mov dword [rbp + 0x2a8], 0x20
lea rdx, [rbp + 0x400430]
mov rcx, qword [rbp + 0x78]
call fcn.140011032
test eax, eax
je 0x14002c430
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x78]
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rbp + 0x4009a8], rax
cmp qword [rbp + 0x4009a8], 0xffffffffffffffff
je 0x14002c430
mov eax, dword [0x140042b00]
add eax, 0xa2
mov dword [rbp + 0x401144], eax
call fcn.14001116d
mov rcx, qword [rbp + 0x4009a8]
mov qword [rsp + 0x20], rcx
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.main
mov rdx, rax
lea rcx, str._s_Cli__s__d:_accept_new_socketID__d_n
call fcn.14001160e
mov dword [rbp + 0x4009c4], 1
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x4009c4]
mov r8d, 1
mov edx, 6
mov rcx, qword [rbp + 0x4009a8]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x14002c351
mov eax, dword [0x140042b00]
add eax, 0xa7
mov dword [rbp + 0x401144], eax
call fcn.14001116d
mov ecx, dword [rbp + 0x401144]
mov r9d, ecx
lea r8, str.main
mov rdx, rax
lea rcx, str._s_Cli__s__d:_accept_socket_setopt_TCP_NODELAY_error_n
call fcn.14001160e
mov ecx, 0x200070
call fcn.14001109b
mov qword [rbp + 0x4010c8], rax
cmp qword [rbp + 0x4010c8], 0
je 0x14002c392
mov edx, 0x200070
mov rcx, qword [rbp + 0x4010c8]
call fcn.14001199c
mov rcx, qword [rbp + 0x4010c8]
call fcn.14001112c
mov qword [rbp + 0x401148], rax
jmp 0x14002c39d
mov qword [rbp + 0x401148], 0
mov rax, qword [rbp + 0x401148]
mov qword [rbp + 0x4010a8], rax
mov rax, qword [rbp + 0x4010a8]
mov qword [rbp + 0x4009e8], rax
mov rax, qword [rbp + 0x4009e8]
mov rcx, qword [rbp + 0x4009a8]
mov qword [rax], rcx
mov rax, qword [rbp + 0x4009e8]
mov ecx, dword [rbp + 0x4009a8]
mov dword [rax + 0x14], ecx
mov rax, qword [rbp + 0x4009e8]
add rax, 0x14
lea r8, [rbp + 0x4009e8]
mov rdx, rax
lea rcx, [rbp + 0x4010e8]
call fcn.1400115c3
mov r8, rax
lea rdx, [rbp + 0x401118]
lea rcx, [rbp + 0x200328]
call fcn.1400118fc
lea rcx, [rbp + 0x401118]
call fcn.1400118f7
lea rdx, [rbp + 0x2a0]
mov rcx, qword [rbp + 0x4009e8]
call fcn.14001146f
cmp dword [rbp + 0x400430], 0
jbe 0x14002c459
lea r8, [rbp + 0x400430]
lea rdx, [rbp + 0x200328]
lea rcx, [rbp + 0x2a0]
call fcn.140011253
mov dword [rbp + 0x94], eax
cmp dword [rbp + 0x400660], 0
jbe 0x14002c48c
lea r8, [rbp + 0x400660]
lea rdx, [rbp + 0x200328]
lea rcx, [rbp + 0x2a0]
call fcn.1400112cb
mov ecx, dword [rbp + 0x94]
or ecx, eax
mov eax, ecx
mov dword [rbp + 0x94], eax
jmp 0x14002c498
mov dword [rbp + 0x94], 0xffffffff
movzx eax, byte [rbp + 0x400884]
test eax, eax
jne 0x14002c4ae
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
call fcn.140011640
mov dword [rbp + 0x400a04], eax
cmp qword [rbp + 0x2a0], 0xffffffffffffffff
jne 0x14002c5bf
mov eax, dword [rbp + 0x200354]
mov ecx, dword [rbp + 0x400a04]
sub ecx, eax
mov eax, ecx
cmp eax, 5
jbe 0x14002c5bf
lea rcx, [0x140043450]
call fcn.140011109
mov qword [rbp + 0x401148], rax
mov ecx, dword [0x140042b00]
add ecx, 0xd2
mov dword [rbp + 0x401150], ecx
call fcn.14001116d
mov ecx, dword [0x140042aec]
mov dword [rsp + 0x28], ecx
mov rcx, qword [rbp + 0x401148]
mov qword [rsp + 0x20], rcx
mov ecx, dword [rbp + 0x401150]
mov r9d, ecx
lea r8, str.main
mov rdx, rax
lea rcx, str._s_Cli__s__d:_ConnectSocket__s:_d_n
call fcn.14001160e
lea rcx, [0x140043450]
call fcn.140011109
mov r8d, dword [0x140042aec]
mov rdx, rax
lea rcx, [rbp + 0x2a0]
call fcn.140011c3f
test eax, eax
je 0x14002c59b
mov qword [rbp + 0x2a0], 0xffffffffffffffff
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbp + 0x401144], eax
call fcn.14001116d
mov ecx, dword [rbp + 0x401144]
mov r8d, ecx
mov rdx, rax
lea rcx, str._s_reconnect___Tun_Failed:__d_n
call fcn.14001160e
jmp 0x14002c5b3
lea rcx, [rbp + 0x2a0]
call fcn.140011258
lea rcx, [rbp + 0x2a0]
call fcn.140011839
mov eax, dword [rbp + 0x400a04]
mov dword [rbp + 0x200354], eax
jmp 0x14002bf58
jmp 0x14002bf4d
lea rcx, [rbp + 0x2003a0]
call fcn.14001147e
nop
lea rcx, [rbp + 0x200328]
call fcn.1400112f3
nop
lea rcx, [rbp + 0x2a0]
call fcn.14001147e
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, reloc.WS2_32.dll_listen
call fcn.140011a64
mov rax, rdi
mov rcx, qword [rbp + 0x401158]
xor rcx, rbp
call fcn.140011636
lea rsp, [rbp + 0x401168]
pop rdi
pop rbp
ret