Function at 0x10018130
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x115c
call fcn.1002c3f0
mov eax, dword [0x1005a014]
xor eax, esp
mov dword [esp + 0x1158], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x18]
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x152], 0x5ca3461c
mov dword [esp + 0x156], 0xfbe511e4
mov dword [esp + 0x15a], 0xa1a19c1
mov word [esp + 0x15e], 0xef52
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
mov ecx, eax
mov edi, edx
mov eax, dword [ebp + 0x20]
mov edx, 0x3a98
test eax, eax
cmovle eax, edx
cdq
add ecx, eax
mov dword [esp + 0x28], ecx
adc edi, edx
mov dword [esp + 0x24], edi
test ebx, ebx
je 0x100184f9
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x100181c7
sub ebx, ecx
je 0x100184f9
test esi, esi
je 0x100181e9
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x100181e0
sub esi, ecx
lea eax, [ebx + 7]
add eax, esi
mov dword [esp + 0x20], eax
cmp eax, 0x1000
jbe 0x10018215
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [esp + 0x2c], edi
cmp edi, 0xffffffff
jne 0x10018248
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
push dword [esp + 0x14]
xorps xmm0, xmm0
mov eax, 2
movlpd qword [esp + 0x44], xmm0
mov word [esp + 0x3c], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push dword [ebp + 0xc]
mov dword [esp + 0x40], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x3a], ax
lea eax, [esp + 0x38]
push 0x10
push eax
push edi
call dword [0x1008995c]
cmp eax, 0xffffffff
jne 0x100182ad
push edi
call dword [0x10089974]
mov eax, 0xfffffffc
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
push ebx
mov byte [esp + 0x166], 1
call dword [sym.imp.WS2_32.dll_htons]
push ebx
push dword [esp + 0x1c]
mov word [esp + 0x16b], ax
lea eax, [esp + 0x16d]
push eax
call fcn.1002e510
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + ebx + 0x165], ax
test esi, esi
jle 0x10018303
push esi
push dword [esp + 0x20]
lea eax, [esp + 0x16f]
add eax, ebx
push eax
call fcn.1002e510
add esp, 0xc
mov ebx, dword [esp + 0x20]
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x160], ax
lea edx, [ebx - 2]
mov byte [esp + 0x150], al
lea ecx, [esp + 0x162]
mov eax, dword [esp + 0x160]
sar eax, 8
mov byte [esp + 0x151], al
lea eax, [esp + 0x150]
push eax
call fcn.10020e40
add esp, 4
xor esi, esi
nop word [eax + eax]
cmp esi, ebx
jge 0x10018396
push 0
mov eax, ebx
sub eax, esi
push eax
lea eax, [esp + 0x168]
add eax, esi
push eax
push edi
call dword [0x10089964]
add esi, eax
cmp eax, 0xffffffff
jne 0x10018350
push edi
call dword [0x10089974]
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
mov ebx, dword [ebp + 0x1c]
xor esi, esi
dec ebx
test ebx, ebx
jle 0x10018439
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
cmp edx, dword [esp + 0x24]
ja 0x100184d6
jb 0x100183c0
cmp eax, dword [esp + 0x28]
ja 0x100184d6
lea eax, [esp + 0x30]
mov dword [esp + 0x4c], edi
push eax
push 0
push 0
lea eax, [esp + 0x54]
mov dword [esp + 0x54], 1
push eax
lea eax, [edi + 1]
mov dword [esp + 0x40], 3
push eax
mov dword [esp + 0x48], 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x100184b3
test eax, eax
jle 0x10018431
lea eax, [esp + 0x48]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10018431
push 0
mov eax, ebx
sub eax, esi
push eax
mov eax, dword [esp + 0x18]
add eax, esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x10018439
test eax, eax
je 0x10018439
add esi, eax
cmp esi, ebx
jl 0x100183a4
xor ebx, ebx
mov word [esp + 0x150], 0xc830
test esi, esi
jle 0x1001848b
mov edi, esi
mov eax, 0x1000
mov ecx, dword [esp + 0x10]
cmp edi, 0x1000
mov edx, edi
cmovg edx, eax
lea eax, [esp + 0x150]
push eax
lea ecx, [ecx + ebx]
call fcn.10020e40
add ebx, 0x1000
add esp, 4
sub edi, 0x1000
mov eax, 0x1000
cmp ebx, esi
jl 0x10018450
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
push edi
mov byte [eax + esi], 0
call dword [0x10089974]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
push edi
call dword [0x10089974]
mov eax, 0xfffffff9
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
push edi
call dword [0x10089974]
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1158]
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [esp + 0x1164]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002bcfe
mov esp, ebp
pop ebp
ret 0x1c