Function at 0x2628270
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi]
mov eax, dword [esi + 0x1024]
cmp eax, 2
jne 0x26282e0
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
mov ecx, dword [esi + 0x1028]
add ecx, 0x7530
cmp ecx, eax
jae 0x262860c
call ebx
lea edx, [esi + 0x102c]
push edx
push edi
mov dword [esi + 0x1028], eax
call fcn.026281c0
add esp, 8
mov dword [esi], eax
test eax, eax
je 0x262860c
pop edi
mov dword [esi + 0x1024], 1
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x262837a
xor ebx, ebx
lea edi, [esi + 0x1018]
push edi
push ebx
lea ecx, [ebp - 0x11c]
push ecx
mov dword [ebp - 0x11c], ebx
mov eax, dword [esi]
push ebx
push ebx
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x11c], 1
call sub.WS2_32.dll_select
cmp eax, 1
jne 0x262832b
pop edi
mov dword [esi + 0x1024], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x11c]
push eax
push ebx
mov dword [ebp - 0x11c], ebx
mov edx, dword [esi]
push ebx
push ebx
mov dword [ebp - 0x118], edx
mov dword [ebp - 0x11c], 1
call sub.WS2_32.dll_select
cmp eax, 1
jne 0x262860c
mov ecx, dword [esi]
push ecx
call sub.WS2_32.dll_closesocket
pop edi
mov dword [esi + 0x1024], 2
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.02628120
add esp, 4
lea eax, [esi + 0x1018]
push eax
push 0
push 0
lea ecx, [ebp - 0x11c]
mov dword [ebp - 0x11c], 0
mov edx, dword [esi]
push ecx
push 0
mov dword [ebp - 0x118], edx
mov dword [ebp - 0x11c], 1
call sub.WS2_32.dll_select
cmp eax, 1
jne 0x262840a
mov eax, dword [esi + 0x1014]
cmp eax, 0x1010
jae 0x262840a
mov ecx, dword [esi]
push 0
mov edx, 0x1010
sub edx, eax
push edx
lea eax, [eax + esi + 4]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jg 0x2628404
push edi
call fcn.02627f60
add esp, 4
pop edi
mov dword [esi + 0x1024], 2
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
add dword [esi + 0x1014], eax
cmp dword [esi + 0x1014], 4
jle 0x262860c
lea edi, [esi + 4]
lea ebx, [ebx]
mov ebx, dword [edi]
test ebx, ebx
jne 0x2628464
mov al, byte [esi + 8]
cmp al, 6
jne 0x262845c
mov edx, dword [esi]
push ebx
push 5
push edi
push edx
call sub.WS2_32.dll_send
mov eax, dword [esi + 0x1014]
sub eax, 5
push eax
lea ecx, [esi + 9]
push ecx
push edi
call fcn.02623640
add esp, 0xc
add dword [esi + 0x1014], 0xfffffffb
jmp 0x26285d1
cmp al, 4
je 0x26285ea
mov al, byte [esi + 8]
cmp al, 2
jne 0x262849f
push ebx
push esi
call fcn.02627ed0
mov edx, dword [ebp + 8]
push eax
push edx
call fcn.02627ef0
mov eax, dword [esi + 0x1014]
sub eax, 5
push eax
lea ecx, [esi + 9]
push ecx
push edi
call fcn.02623640
add esp, 0x1c
add dword [esi + 0x1014], 0xfffffffb
jmp 0x26285d1
mov ecx, dword [esi + 0x1014]
cmp ecx, 0xa
jle 0x2628505
cmp al, 1
jne 0x2628505
mov eax, dword [esi + 9]
mov dx, word [esi + 0xd]
mov ecx, 2
push eax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x16], dx
mov word [ebp - 0x18], cx
call sub.WS2_32.dll_inet_ntoa
mov edx, dword [ebp - 0x16]
push edx
call sub.WS2_32.dll_ntohs
mov ecx, dword [ebp + 8]
push ebx
lea eax, [ebp - 0x18]
push eax
push ecx
call fcn.02627e20
mov edx, dword [esi + 0x1014]
sub edx, 0xb
push edx
lea eax, [esi + 0xf]
push eax
push edi
call fcn.02623640
add esp, 0x18
add dword [esi + 0x1014], 0xfffffff5
jmp 0x26285d1
cmp ecx, 7
jle 0x262860c
cmp al, 3
jne 0x26285fd
movzx edx, word [esi + 9]
push ebx
push esi
mov dword [ebp - 8], edx
call fcn.02627ed0
mov edi, eax
add esp, 8
test edi, edi
je 0x26285a8
mov ecx, dword [esi + 0x1014]
movzx ebx, dx
sub ecx, 7
cmp ebx, ecx
jg 0x262860c
cmp dword [edi + 0x1c], 0
jne 0x2628559
mov eax, dword [edi + 0x18]
push 0
push ebx
lea edx, [esi + 0xb]
push edx
push eax
call sub.WS2_32.dll_send
jmp 0x26285a8
mov ecx, dword [edi + 0x24]
add ecx, ebx
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [edi + 0x24]
push ebx
lea edx, [esi + 0xb]
push edx
add ecx, eax
push ecx
mov dword [ebp - 4], eax
call fcn.02623640
mov eax, dword [edi + 0x20]
add esp, 0xc
test eax, eax
je 0x262859f
mov edx, dword [edi + 0x24]
push edx
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.02623640
mov ecx, dword [edi + 0x20]
add esp, 0xc
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 4]
add dword [edi + 0x24], ebx
mov dword [edi + 0x20], edx
movzx eax, word [ebp - 8]
mov ecx, 0xfffffff9
sub ecx, eax
add dword [esi + 0x1014], ecx
mov ecx, dword [esi + 0x1014]
push ecx
lea edx, [eax + esi + 0xb]
push edx
lea edi, [esi + 4]
push edi
call fcn.02623640
add esp, 0xc
cmp dword [esi + 0x1014], 4
jg 0x2628420
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
push eax
call fcn.02628180
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, 7
jle 0x262860c
mov dword [esi + 0x1014], 0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret