Function at 0x100334e9
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
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
inc esi
cmp dword [ebx + 0x298], 0
push edi
mov dword [ebp + 8], 0x10
mov dword [ebp - 0x10], esi
jne 0x1003352c
mov eax, dword [ebx + 0x294]
cmp eax, 0xffffffff
je 0x1003352c
push eax
push ebx
call fcn.1002e1c8
pop ecx
pop ecx
mov dword [ebx + 0x298], esi
lea eax, [ebx + 0x18c]
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
push 0x41
pop ecx
lea edi, [ebp - 0x140]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x30], ecx
lea ecx, [ebp - 0x34]
push ecx
push eax
push eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x140]
push eax
mov eax, dword [ebx + 0x188]
inc eax
push eax
call sub.WS2_32.dll_select
mov dword [ebp - 8], eax
test eax, eax
je 0x10033905
test eax, eax
js 0x1003394a
add dword [ebp - 4], eax
mov eax, dword [ebx + 0x160]
or edi, 0xffffffff
cmp eax, edi
je 0x100336cb
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x100336cb
push dword [ebx + 0x2bc]
mov esi, dword [ebx + 0x160]
lea eax, [ebp - 0x1c]
push 5
push eax
call fcn.10033b23
add esp, 0xc
test eax, eax
je 0x10033960
cmp eax, edi
je 0x10033960
push dword [ebx + 0x2bc]
mov esi, dword [ebx + 0x160]
lea eax, [ebp - 0x17]
push 4
push eax
call fcn.10033b23
add esp, 0xc
test eax, eax
je 0x10033960
cmp eax, edi
je 0x10033960
push 0
push 1
push 2
pop edi
push edi
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x10033944
push 4
lea eax, [ebp - 0x10]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
js 0x10033952
push dword [ebp + 8]
lea eax, [ebx + 0x168]
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x10033952
push 0
push 9
lea eax, [ebp - 0x1c]
push eax
push esi
mov byte [ebp - 0x18], 3
call sub.WS2_32.dll_send
push esi
cmp eax, 9
jne 0x10033953
push ebx
call fcn.1002e49d
xor eax, eax
pop ecx
pop ecx
cmp dword [ebp - 0x140], eax
jbe 0x100336be
mov ecx, dword [ebx + 0x160]
cmp dword [ebp + eax*4 - 0x13c], ecx
je 0x100336ad
inc eax
cmp eax, dword [ebp - 0x140]
jb 0x1003368a
jmp 0x100336be
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
inc eax
mov ecx, dword [ebp - 0x140]
dec ecx
cmp eax, ecx
jb 0x1003369e
dec dword [ebp - 0x140]
dec dword [ebp - 8]
jne 0x100336ce
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret
push 2
pop edi
mov eax, dword [ebx + 0x180]
cmp eax, 0xffffffff
je 0x10033780
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10033780
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebx + 0x180]
call sub.WS2_32.dll_accept
mov esi, eax
cmp esi, 0xffffffff
je 0x1003394a
push 4
lea eax, [ebp - 0x10]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push esi
test eax, eax
js 0x10033959
push ebx
call fcn.1002e49d
xor eax, eax
pop ecx
pop ecx
cmp dword [ebp - 0x140], eax
jbe 0x10033777
mov ecx, dword [ebx + 0x180]
cmp dword [ebp + eax*4 - 0x13c], ecx
je 0x10033766
inc eax
cmp eax, dword [ebp - 0x140]
jb 0x10033743
jmp 0x10033777
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
inc eax
mov ecx, dword [ebp - 0x140]
dec ecx
cmp eax, ecx
jb 0x10033757
dec dword [ebp - 0x140]
dec dword [ebp - 8]
je 0x100336c3
mov eax, dword [ebx + 0x2a0]
cmp eax, 0xffffffff
je 0x1003389a
lea ecx, [ebp - 0x140]
push ecx
push eax
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003389a
cmp dword [ebx + 0x2a4], 0
jne 0x100337b5
mov esi, ebx
call fcn.1002e4b0
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
push 1
lea eax, [ebp - 0x1c]
push eax
push dword [ebx + 0x2a0]
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jns 0x100337e4
mov eax, ebx
call fcn.10033977
and dword [ebx + 0x2a8], 0
jmp 0x1003384c
cmp dword [ebx + 0x2a8], 0
je 0x100337ff
mov ecx, dword [ebp + 8]
lea edi, [ebx + 0x2ac]
lea esi, [ebp - 0x2c]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10033845
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebx + 0x2ac]
push eax
call sub.ntdll.dll_memcpy
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x2c]
push eax
push dword [ebx + 0x2a0]
mov dword [ebx + 0x2a8], 1
call sub.WS2_32.dll_connect
test eax, eax
js 0x1003396e
push dword [ebx + 0x2a0]
call fcn.10031557
pop ecx
mov eax, ebx
call fcn.1003156a
xor eax, eax
cmp dword [ebp - 0x140], eax
jbe 0x10033890
mov ecx, dword [ebx + 0x2a0]
cmp dword [ebp + eax*4 - 0x13c], ecx
je 0x1003387f
inc eax
cmp eax, dword [ebp - 0x140]
jb 0x1003385c
jmp 0x10033890
mov ecx, dword [ebp + eax*4 - 0x138]
mov dword [ebp + eax*4 - 0x13c], ecx
inc eax
mov ecx, dword [ebp - 0x140]
dec ecx
cmp eax, ecx
jb 0x10033870
dec dword [ebp - 0x140]
mov eax, dword [ebp - 8]
dec eax
je 0x100336c3
push ebx
call fcn.1002e16a
pop ecx
mov edi, eax
jmp 0x100338df
cmp dword [esi + 0x2c], 0
jne 0x100338df
push dword [ebp - 0xc]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x100338d8
lea eax, [ebp - 0x140]
push eax
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x100338d8
mov eax, esi
call fcn.1002e5f9
jmp 0x100338df
mov ecx, esi
call fcn.1002f1c7
mov eax, edi
call fcn.1002e1a7
mov esi, eax
test esi, esi
jne 0x100338a5
mov esi, edi
call fcn.1002e1c3
cmp dword [ebx + 0x348], 0
jne 0x10033535
jmp 0x100336c3
push ebx
call fcn.1002e16a
pop ecx
mov esi, eax
jmp 0x1003392d
cmp dword [edi + 0x2c], 0
jne 0x1003392d
push dword [ebp - 0xc]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x1003392d
mov ecx, edi
call fcn.1002f1c7
mov eax, esi
call fcn.1002e1a7
mov edi, eax
test edi, edi
jne 0x10033910
call fcn.1002e1c3
jmp 0x100336c3
mov dword [ebx + 0x290], edi
or eax, 0xffffffff
jmp 0x100336c6
push esi
mov dword [ebx + 0x290], edi
call sub.WS2_32.dll_closesocket
jmp 0x1003394a
mov esi, ebx
call fcn.10033342
mov eax, edi
jmp 0x100336c6
mov eax, ebx
call fcn.10033977
jmp 0x1003394a