Function at 0x100158d0
Capabilities:
Connect socket
Connect udp socket
Create udp socket

Disassembly:
sub esp, 0x24
mov eax, dword [0x1012f5f0]
xor eax, esp
mov dword [esp + 0x20], eax
push ebp
mov ebp, dword [esp + 0x2c]
mov ecx, dword [ebp]
mov eax, ecx
sub eax, 2
je 0x10015969
sub eax, 0x15
je 0x10015905
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x24
ret
xor eax, eax
cmp dword [ebp + 0x14], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x1c
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov word [esp + 8], 0x17
je 0x10015942
mov ax, word [ebp + 0x14]
mov word [esp + 0xa], ax
jmp 0x1001594b
mov dx, word [esi + 0x14]
mov word [esp + 0xa], dx
mov eax, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x100159aa
xor eax, eax
cmp dword [ebp + 0x14], eax
mov dword [esp + 8], eax
mov dword [esp + 4], 0x10
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov word [esp + 8], 2
je 0x1001599a
mov ax, word [ebp + 0x14]
mov word [esp + 0xa], ax
jmp 0x100159a3
mov dx, word [esi + 0x14]
mov word [esp + 0xa], dx
mov eax, dword [ebp + 4]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x91b8]
test eax, eax
push ebx
je 0x100159ca
mov edx, dword [esi + 0x91bc]
mov eax, dword [eax]
push edx
push 0
push 2
push ecx
call eax
add esp, 0x10
jmp 0x100159d5
push 0
push 2
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10015a23
mov ecx, dword [ebp]
push ecx
mov ecx, esi
call fcn.10015420
add esp, 4
test eax, eax
jge 0x10015a37
mov eax, dword [esi + 0x91b8]
test eax, eax
je 0x10015a1c
mov edx, dword [esi + 0x91bc]
mov eax, dword [eax + 4]
push edx
push ebx
call eax
add esp, 8
pop ebx
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x24
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x24
ret
mov eax, dword [esi + 0x91b0]
test eax, eax
push edi
je 0x10015a5b
mov ecx, dword [esi + 0x91b4]
push ecx
push 2
push ebx
call eax
mov edi, eax
add esp, 0xc
test edi, edi
jl 0x10015ae4
mov eax, dword [esi + 0x91b8]
test eax, eax
mov ecx, dword [esp + 0xc]
je 0x10015a81
mov edx, dword [esi + 0x91bc]
mov eax, dword [eax + 8]
push edx
push ecx
lea edx, [esp + 0x18]
push edx
push ebx
call eax
add esp, 0x10
jmp 0x10015a8e
push ecx
lea edx, [esp + 0x14]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x10015ac5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x10015ac5
cmp eax, 0x2733
je 0x10015ac5
mov edx, ebx
mov ecx, esi
call fcn.10016070
pop edi
pop ebx
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x24
ret
mov eax, dword [esi + 0x91a8]
test eax, eax
je 0x10015b01
mov ecx, dword [esi + 0x91ac]
push ecx
push 2
push ebx
call eax
mov edi, eax
add esp, 0xc
test edi, edi
jge 0x10015b01
mov edx, ebx
mov ecx, esi
call fcn.10016070
mov eax, edi
pop edi
pop ebx
pop ebp
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.1001d3e9
add esp, 0x24
ret
mov eax, dword [esi + 0x91a0]
test eax, eax
je 0x10015b1c
mov edx, dword [esi + 0x91a4]
push 0
push 1
push ebx
push edx
call eax
add esp, 0x10
mov ecx, dword [esp + 0x2c]
pop edi
mov dword [ebp + 0x1c], ebx
pop ebx
pop ebp
xor ecx, esp
xor eax, eax
call fcn.1001d3e9
add esp, 0x24
ret