Function at 0x10023ed0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0xe4
push ebx
push ebp
push esi
push edi
xor edi, edi
push edi
call fcn.100244c0
mov ecx, dword [esp + 0x10c]
mov esi, dword [esp + 0x104]
mov ebp, eax
mov eax, dword [esp + 0x110]
push eax
push ecx
push ebp
mov dword [ebp + 0x38], esi
call fcn.1002f7b0
mov ebx, dword [esp + 0x108]
add esp, 0x10
cmp ebx, edi
mov dword [esi], 1
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esp + 0x10], edi
je 0x10023f99
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x74]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x74]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + 0x74]
test cl, cl
je 0x10023f6c
mov cl, byte [eax]
inc eax
cmp cl, 0x2f
je 0x10023f60
cmp byte [eax], 0
jne 0x10023f51
jmp 0x10023f6c
mov byte [eax - 1], 0
lea ebx, [esp + 0x74]
mov dword [esp + 0x10], eax
test ebx, ebx
je 0x10023f99
cmp byte [ebx], 0
je 0x10023f99
mov eax, dword [ebp + 0xb4]
test eax, eax
je 0x10023f88
push eax
call fcn.10023af0
add esp, 4
push ebx
call fcn.1002f8f0
add esp, 4
mov dword [ebp + 0xb4], eax
jmp 0x10023fa2
mov ebx, dword [ebp + 0xb0]
add ebx, 6
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x10023fdb
call fcn.1003afe0
mov esi, eax
call fcn.1003afd0
test esi, esi
je 0x10023fd7
push esi
push 0x10050e30
lea edx, [esp + 0x7c]
push 0x80
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea eax, [esp + 0x74]
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x18]
push 0x10
push ecx
call fcn.10024f90
mov eax, dword [esp + 0x104]
add esp, 8
test eax, eax
mov word [esp + 0x18], 2
je 0x10024073
push ebx
call fcn.10024eb0
add esp, 4
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x1002407c
call sub.WS2_32.dll_WSAGetLastError
push eax
lea edx, [esp + 0x38]
push str.INET_INET_connect:_gethostbyname_failed__error_code___d
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea eax, [esp + 0x34]
push 0
push eax
call sym.fbclient.dll_gds__log
mov ecx, dword [ebp + 0xb4]
add esp, 8
add ecx, 6
push 0
push 0x14000182
push 1
push 0x14000180
push 1
push ecx
push 2
push 0x14000191
push ebp
call fcn.10025450
push ebp
call fcn.10024c40
add esp, 0x28
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
call fcn.10024e90
mov dword [esp + 0x14], eax
lea edx, [esp + 0x1c]
push 4
lea eax, [esp + 0x18]
push edx
push eax
call fcn.10024f70
add esp, 0xc
call sym.fbclient.dll_gds__thread_exit
mov ebx, dword [esp + 0x10]
push 0x10050e70
push ebx
call sub.WS2_32.dll_getservbyname
mov esi, eax
test esi, esi
jne 0x100240cf
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2734
jne 0x100240cf
xor edi, edi
push 0x10050e74
push ebx
call sub.WS2_32.dll_getservbyname
mov esi, eax
test esi, esi
jne 0x100240cf
inc edi
cmp edi, 5
jl 0x100240b8
call sym.fbclient.dll_gds__thread_enter
test esi, esi
jne 0x10024178
mov edi, 0x10050e78
mov esi, ebx
mov ecx, 7
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x100240f5
push 0xbea
jmp 0x10024100
push ebx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push eax
call sub.WS2_32.dll_htons
test ax, ax
mov word [esp + 0x1a], ax
jne 0x10024181
call sub.WS2_32.dll_WSAGetLastError
push eax
lea eax, [esp + 0x38]
push str.INET_INET_connect:_getservbyname_failed__error_code___d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x34]
push 0
push ecx
call sym.fbclient.dll_gds__log
add esp, 8
mov edx, dword [ebp + 0xb4]
add edx, 6
push 0
push 0x10050ebc
push 2
push ebx
push 2
push 0x14000181
push 1
push 0x14000180
push 1
push edx
push 2
push 0x14000191
push ebp
call fcn.10025450
add esp, 0x34
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov ax, word [esi + 8]
mov word [esp + 0x1a], ax
push 0
push 1
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [ebp + 0x3c], eax
jne 0x100241c0
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000192
push 0x10050ec0
push ebp
call fcn.10025610
push ebp
call fcn.10024c40
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov edi, dword [esp + 0xfc]
xor eax, eax
cmp edi, eax
je 0x10024212
call sym.fbclient.dll_gds__thread_exit
mov edx, dword [ebp + 0x3c]
lea ecx, [esp + 0x18]
push 0x10
push ecx
push edx
call sub.WS2_32.dll_connect
mov esi, eax
call sym.fbclient.dll_gds__thread_enter
cmp esi, 0xffffffff
je 0x10024200
push edi
push ebp
call fcn.10025390
add esp, 8
test eax, eax
jne 0x10024404
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000192
push 0x10050ec8
jmp 0x100241a4
mov ebx, dword [esp + 0x104]
and ebx, 2
cmp bx, ax
je 0x100242c9
mov word [esp + 0x10], ax
mov word [esp + 0x12], ax
lea eax, [esp + 0x2c]
push 4
mov dword [esp + 0x30], 1
mov ecx, dword [ebp + 0x3c]
push eax
push 4
push 0xffff
push ecx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x10024268
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000193
push 0x10050ed0
jmp 0x100241a4
mov eax, dword [ebp + 0x3c]
lea edx, [esp + 0x28]
lea esi, [ebp + 0x4c]
push edx
push esi
push 0x80
push 0xffff
push eax
mov dword [esp + 0x3c], 4
call sub.WS2_32.dll_getsockopt
test eax, eax
je 0x10024295
mov word [esi], 0
mov edx, dword [ebp + 0x3c]
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x80
push 0xffff
push edx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x100242c9
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000193
push str.setsockopt_LINGER
jmp 0x100241a4
mov ecx, dword [ebp + 0x3c]
lea eax, [esp + 0x18]
push 0x10
push eax
push ecx
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x10024313
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2740
jne 0x10024349
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
push 0x2710
call esi
mov eax, dword [ebp + 0x3c]
lea edx, [esp + 0x18]
push 0x10
push edx
push eax
call sub.WS2_32.dll_bind
test eax, eax
je 0x10024313
inc edi
cmp edi, 5
jl 0x100242f2
mov ecx, dword [ebp + 0x3c]
push 5
push ecx
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x1002435e
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000193
push 0x10050f00
push ebp
call fcn.10025610
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000193
push 0x10050ef8
jmp 0x100241a4
xor eax, eax
cmp bx, ax
je 0x10024387
or byte [ebp + 0x24], 3
push ebp
push 0x10024d40
mov dword [ebp + 0x30], eax
mov dword [ebp + 0x34], eax
call sym.fbclient.dll_gds__register_cleanup
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov edi, 0x10
call sym.fbclient.dll_gds__thread_exit
lea edx, [esp + 0x30]
mov dword [esp + 0x30], edi
mov ecx, dword [ebp + 0x3c]
lea eax, [esp + 0x18]
push edx
push eax
push ecx
call sub.WS2_32.dll_accept
mov esi, eax
cmp esi, 0xffffffff
je 0x100243d5
mov eax, dword [esp + 0x104]
test al, 4
jne 0x100243ef
push eax
push esi
call fcn.10024d70
add esp, 8
test eax, eax
je 0x100243ef
call sym.fbclient.dll_gds__thread_enter
push esi
call sub.WS2_32.dll_closesocket
jmp 0x1002438c
call sym.fbclient.dll_gds__thread_enter
call sub.WS2_32.dll_WSAGetLastError
push eax
push 0x14000192
push 0x10050f08
jmp 0x100241a4
call sym.fbclient.dll_gds__thread_enter
mov edx, dword [ebp + 0x3c]
push edx
call sub.WS2_32.dll_closesocket
or byte [ebp + 0x24], 1
mov dword [ebp + 0x3c], esi
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret