Function at 0x103310d
Capabilities:
Check for time delay via gettickcount
Connect socket
Get socket status
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x240
mov eax, dword [0x1048628]
and dword [ebp - 0x18], 0
push ebx
mov dword [ebp - 4], eax
push esi
mov ebx, ecx
mov eax, 0x3f4
push edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], eax
call fcn.01044e40
mov eax, dword [ebx + 0x254]
test eax, eax
mov esi, esp
je 0x1033546
lea ecx, [ebp - 0x2c]
push ecx
push esi
push 0x26
push 0
call eax
test eax, eax
mov dword [ebp - 0x18], eax
je 0x1033546
cmp dword [esi], 3
jne 0x1033542
mov edi, dword [esi + 4]
test edi, edi
je 0x1033542
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and eax, 0xfffffffc
call fcn.01044e40
mov eax, esp
push esi
push edi
push eax
call fcn.01030a6f
mov esi, eax
test esi, esi
mov dword [ebp - 0x1c], esi
je 0x1033542
mov eax, dword [ebx + 0x1284]
test eax, eax
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
je 0x10331f5
push esi
push eax
call dword [sym.imp.msvcrt.dll_wcscmp]
test eax, eax
pop ecx
pop ecx
jne 0x10331f5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, dword [ebx + 0x127c]
mov esi, eax
sub esi, edx
mov ecx, 0x7530
cmp esi, ecx
jb 0x10331e7
test edx, edx
je 0x103323a
sub eax, dword [ebx + 0x1288]
cmp eax, ecx
jae 0x103323a
mov eax, dword [ebx + 0x1280]
mov dword [ebp - 0x18], eax
jmp 0x1033546
push esi
call edi
mov esi, eax
mov eax, dword [ebx + 0x1284]
inc esi
test eax, eax
pop ecx
je 0x1033214
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
and dword [ebx + 0x1284], 0
pop ecx
lea eax, [esi + esi]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [ebx + 0x1284], eax
je 0x1033542
push esi
push dword [ebp - 0x1c]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
mov esi, dword [sym.imp.msvcrt.dll_wcsstr]
push 0x1008994
push dword [ebx + 0x1284]
call esi
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
je 0x1033266
push 0x1008994
call edi
pop ecx
mov ecx, dword [ebp - 0x1c]
lea esi, [ecx + eax*2]
jmp 0x103328e
push 0x1008984
push dword [ebx + 0x1284]
call esi
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x1033288
push 0x1008984
call edi
pop ecx
lea esi, [esi + eax*2]
jmp 0x103328e
mov esi, dword [ebx + 0x1284]
mov ebx, 0x1002994
push ebx
call edi
push eax
push ebx
push esi
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x10332ad
push ebx
call edi
pop ecx
lea esi, [esi + eax*2]
test esi, esi
je 0x10332d4
push esi
call fcn.0101b883
lea edi, [eax + eax + 2]
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.01044e40
mov eax, esp
push edi
push esi
push eax
call fcn.01030a8d
mov esi, eax
push 0x100897c
push esi
call dword [sym.imp.msvcrt.dll_strpbrk]
test eax, eax
pop ecx
pop ecx
je 0x10332e9
mov byte [eax], 0
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], eax
jne 0x103332c
lea eax, [ebp - 0x1c]
push eax
push 0xfa0
push esi
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.01032a78
test eax, eax
jge 0x103332c
and dword [ebp - 0x18], 0
and dword [esi + 0x1280], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x127c], eax
jmp 0x1033546
push 6
xor ebx, ebx
inc ebx
push ebx
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x1033519
lea eax, [ebp - 0x28]
push eax
push 0x8004667e
push esi
mov dword [ebp - 0x28], ebx
call dword [sym.imp.WSOCK32.dll_ioctlsocket]
test eax, eax
jne 0x1033519
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x50
mov word [ebp - 0x14], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
je 0x1033519
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x274d
je 0x1033519
cmp eax, 0x2733
je 0x10333b5
and dword [ebp - 0x18], 0
jmp 0x1033507
push 0x41
pop ecx
xor eax, eax
lea edi, [ebp - 0x13c]
rep stosd dword es:[edi], eax
push 0x41
pop ecx
lea edi, [ebp - 0x240]
rep stosd dword es:[edi], eax
xor edi, edi
mov eax, 0x2bc
mov dword [ebp - 0x1c], edi
mov edx, dword [ebp - 0x13c]
xor ecx, ecx
cmp edx, edi
mov dword [ebp - 0x24], edi
jbe 0x10333f4
cmp dword [ebp + ecx*4 - 0x138], esi
je 0x10333f4
inc ecx
cmp ecx, edx
jb 0x10333e6
cmp ecx, edx
jne 0x103340a
cmp edx, 0x40
jae 0x103340a
mov dword [ebp + ecx*4 - 0x138], esi
inc dword [ebp - 0x13c]
mov edx, dword [ebp - 0x240]
xor ecx, ecx
cmp edx, edi
jbe 0x1033424
cmp dword [ebp + ecx*4 - 0x23c], esi
je 0x1033424
inc ecx
cmp ecx, edx
jb 0x1033416
cmp ecx, edx
jne 0x103343a
cmp edx, 0x40
jae 0x103343a
mov dword [ebp + ecx*4 - 0x23c], esi
inc dword [ebp - 0x240]
xor edx, edx
mov ecx, 0x3e8
div ecx
mov dword [ebp - 0x38], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push ebx
mov dword [ebp - 0x34], edx
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x1033479
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp - 0x24], eax
jmp 0x10334c7
cmp eax, edi
je 0x10334c7
lea eax, [ebp - 0x13c]
push eax
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x1033519
lea eax, [ebp - 0x240]
push eax
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10334c7
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x1007
push 0xffff
push esi
mov dword [ebp - 0x30], 4
call dword [sym.imp.WSOCK32.dll_getsockopt]
test eax, eax
jne 0x10334fa
cmp dword [ebp - 0x24], 0x274d
je 0x1033519
cmp dword [ebp + 8], edi
je 0x10334e1
mov ecx, dword [ebp - 0x20]
call fcn.01031832
test eax, eax
jne 0x1033519
cmp dword [ebp - 0x24], edi
jne 0x10334ff
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 3
mov eax, 0x190
jb 0x10333d7
jmp 0x1033502
mov dword [ebp - 0x18], edi
jmp 0x1033507
mov dword [ebp - 0x18], edi
cmp dword [ebp - 0x18], edi
jne 0x103351c
cmp dword [ebp + 8], 0
je 0x103351c
mov ecx, dword [ebp - 0x20]
call fcn.01031832
test eax, eax
je 0x103351c
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov dword [edi + 0x1280], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp esi, 0xffffffff
mov dword [edi + 0x127c], eax
je 0x1033546
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
jmp 0x1033546
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
lea esp, [ebp - 0x24c]
mov ecx, dword [ebp - 4]
call fcn.01018732
pop edi
pop esi
pop ebx
leave
ret 4