Function at 0x100303b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
mov ebx, dword [ebp + 8]
cmp byte [ebx + 0x294], 0
push esi
push edi
mov dword [ebp - 0xc], 0x10
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], 0
jne 0x10030400
mov eax, dword [ebx + 0x290]
cmp eax, 0xffffffff
je 0x10030400
push 0
push eax
push ebx
call fcn.1002c420
mov byte [ebx + 0x294], 0xff
jmp 0x10030400
mov eax, dword [ebp + 0xc]
lea edi, [ebp - 0x140]
lea esi, [ebx + 0x188]
mov ecx, 0x104
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x34]
push ecx
push 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebx + 0x184]
push 0
lea edx, [ebp - 0x140]
push edx
inc eax
push eax
mov dword [ebp - 0x34], 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 8], eax
test eax, eax
je 0x100308c9
js 0x10030927
add dword [ebp - 4], eax
mov eax, dword [ebx + 0x15c]
cmp eax, 0xffffffff
je 0x1003059c
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003059c
mov eax, dword [ebx + 0x15c]
mov esi, dword [sym.imp.WS2_32.dll_recv]
push 0
push 5
lea edx, [ebp - 0x1c]
push edx
push eax
call esi
test eax, eax
je 0x100309b2
cmp eax, 0xffffffff
je 0x100309b2
mov edx, dword [ebx + 0x15c]
push 0
push 4
lea ecx, [ebp - 0x17]
push ecx
push edx
call esi
test eax, eax
je 0x100309b2
cmp eax, 0xffffffff
je 0x100309b2
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10030939
push 4
lea eax, [ebp - 0x10]
push eax
push 1
push 6
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x10030952
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp + 8]
mov ecx, eax
add esi, 0x164
lea edi, [ebp - 0x2c]
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x10030972
push 0
push 9
lea edx, [ebp - 0x1c]
push edx
push ebx
mov byte [ebp - 0x18], 3
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 9
jne 0x10030992
mov esi, dword [ebp + 8]
push 0
push ebx
push esi
call fcn.1002c420
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x10030593
mov esi, dword [esi + 0x15c]
cmp dword [ebp + eax*4 - 0x13c], esi
je 0x10030562
inc eax
cmp eax, ecx
jb 0x10030552
jmp 0x10030593
lea edx, [ecx - 1]
cmp eax, edx
jae 0x1003058c
lea esp, [esp]
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x10030570
dec ecx
mov dword [ebp - 0x140], ecx
dec dword [ebp - 8]
je 0x100308bd
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x17c]
cmp eax, 0xffffffff
je 0x1003065c
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003065c
mov ecx, dword [ebx + 0x17c]
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x2c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
test esi, esi
js 0x1003092d
push 4
lea edx, [ebp - 0x10]
push edx
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x100309c5
push 0
push esi
push ebx
call fcn.1002c420
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x10030653
mov edx, dword [ebx + 0x17c]
cmp dword [ebp + eax*4 - 0x13c], edx
je 0x10030627
inc eax
cmp eax, ecx
jb 0x10030617
jmp 0x10030653
lea edx, [ecx - 1]
cmp eax, edx
jae 0x1003064c
mov edi, edi
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x10030630
dec ecx
mov dword [ebp - 0x140], ecx
dec dword [ebp - 8]
je 0x100308bd
mov eax, dword [ebx + 0x29c]
cmp eax, 0xffffffff
je 0x100307cd
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x100307cd
cmp dword [ebx + 0x2a0], 0
jne 0x1003069f
mov edx, dword [ebx + 0x29c]
push 0xffffffffffffffff
push edx
push ebx
call fcn.1002c420
mov dword [ebx + 0x2a0], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebx + 0x29c]
lea ecx, [ebp - 0x2c]
push ecx
push 2
push 1
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jns 0x100306cc
mov byte [ebx + 0x2a4], 0
jmp 0x1003076b
cmp byte [ebx + 0x2a4], 0
mov edx, dword [ebp - 0xc]
je 0x10030720
mov eax, edx
lea esi, [ebx + 0x2a8]
lea edi, [ebp - 0x2c]
cmp edx, 4
jb 0x100306fc
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x10030720
sub eax, 4
add esi, 4
add edi, 4
cmp eax, 4
jae 0x100306e8
test eax, eax
je 0x10030764
mov cl, byte [esi]
cmp cl, byte [edi]
jne 0x10030720
cmp eax, 1
jbe 0x10030764
mov cl, byte [esi + 1]
cmp cl, byte [edi + 1]
jne 0x10030720
cmp eax, 2
jbe 0x10030764
mov al, byte [esi + 2]
cmp al, byte [edi + 2]
je 0x10030764
mov ecx, edx
lea esi, [ebp - 0x2c]
lea edi, [ebx + 0x2a8]
rep movsb byte es:[edi], byte [esi]
push edx
mov edx, dword [ebx + 0x29c]
lea ecx, [ebp - 0x2c]
push ecx
push edx
mov byte [ebx + 0x2a4], 0xff
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x100309d8
mov eax, dword [ebx + 0x29c]
push 0
push 1
push 0x1004e05c
push eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, ebx
call fcn.1002fee0
mov ecx, dword [ebp - 0x140]
xor eax, eax
test ecx, ecx
je 0x100307c3
mov edx, dword [ebx + 0x29c]
lea ecx, [ecx]
cmp dword [ebp + eax*4 - 0x13c], edx
je 0x10030790
inc eax
cmp eax, ecx
jb 0x10030780
jmp 0x100307c3
lea edx, [ecx - 1]
cmp eax, edx
jae 0x100307bc
jmp 0x100307a0
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
mov ecx, dword [ebp - 0x140]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x100307a0
dec ecx
mov dword [ebp - 0x140], ecx
mov eax, dword [ebp - 8]
dec eax
je 0x100308bd
push 0xc
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
mov dword [edi], 0
mov dword [edi + 4], ebx
mov byte [edi + 8], 0
mov eax, dword [edi]
test eax, eax
jne 0x100307fa
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 0x2d4]
mov dword [edi], edx
jmp 0x10030802
mov eax, dword [eax + 0x765c]
mov dword [edi], eax
mov esi, dword [edi]
test esi, esi
je 0x100308a6
cmp byte [esi + 0x29], 0
jne 0x100307e7
mov ecx, dword [esi + 0x14]
lea eax, [ebx + 0x188]
push eax
push ecx
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003089a
mov eax, dword [esi + 0x14]
lea edx, [ebp - 0x140]
push edx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003089a
mov eax, dword [esi + 0x24]
cmp eax, 3
ja case.default.0x10030844
jmp dword [eax*4 + 0x100309ec]
mov eax, esi
call fcn.1002ca50
mov eax, esi
call fcn.1002d9b0
jmp 0x100307e7
mov eax, esi
call fcn.10038580
mov eax, esi
call fcn.1002d9b0
jmp 0x100307e7
mov eax, esi
call fcn.100386c0
mov eax, esi
call fcn.1002d9b0
jmp 0x100307e7
push esi
call fcn.1002cbd0
mov eax, esi
call fcn.1002d9b0
jmp 0x100307e7
mov eax, esi
call fcn.1002e3d0
mov eax, esi
call fcn.1002d9b0
jmp 0x100307e7
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
cmp byte [ebx + 0x33c], 0
jne 0x10030400
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0xc
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
mov dword [esi], 0
mov dword [esi + 4], ebx
mov byte [esi + 8], 0
mov eax, dword [esi]
test eax, eax
jne 0x100308f6
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x2d4]
mov dword [esi], edx
jmp 0x100308fe
mov eax, dword [eax + 0x765c]
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
je 0x10030911
cmp byte [eax + 0x29], 0
jne 0x100308e3
call fcn.1002d9b0
jmp 0x100308e3
push esi
call dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp - 4]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28c], 2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp + 8]
push ebx
mov dword [edx + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp + 8]
push ebx
mov dword [eax + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
push ebx
mov dword [ecx + 0x28c], 2
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, ebx
call fcn.100301d0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
mov byte [ebx + 0x2a4], 0
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 8