Function at 0x40f634
Capabilities:
Check for time delay via gettickcount
Create raw 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, 0x280
mov eax, dword [0x427484]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov dword [ebp - 0x274], eax
push esi
push edi
xor eax, eax
mov esi, dword [ebp + 8]
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 1
stosd dword es:[edi], eax
push 3
push 2
mov dword [ebp - 0x278], 0x10
stosd dword es:[edi], eax
call sub.WS2_32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40f69c
call sub.WS2_32.dll_WSAGetLastError
sub eax, 0x271d
neg eax
sbb eax, eax
add eax, 0xfffffc1a
jmp 0x40f899
cmp dword [ebp - 0x274], 0
je 0x40f6e4
push 4
push dword [ebp - 0x274]
push 7
push 0
push ebx
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x40f6e4
call sub.WS2_32.dll_WSAGetLastError
push ebx
mov esi, eax
call sub.WS2_32.dll_closesocket
push esi
call sub.WS2_32.dll_WSASetLastError
xor eax, eax
cmp esi, 0x271d
sete al
add eax, 0xfffffc19
jmp 0x40f899
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
push 2
pop eax
mov word [ebp - 0x14], ax
xor eax, eax
mov word [ebp - 0x12], ax
mov eax, 0xd8
mov word [0x42d8ac], ax
mov ax, word [0x4271e8]
inc dword [0x4271e8]
mov word [0x42d8ae], ax
mov dword [0x42d8a8], 8
xor eax, eax
lea ecx, [eax + 0x20]
mov byte [eax + 0x42d8b5], cl
inc eax
cmp eax, 0x20
jl 0x40f71f
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
push 0x2d
mov edi, 0x42d8a8
push edi
mov dword [0x42d8b1], eax
call fcn.0040f5de
pop ecx
pop ecx
push 0x10
mov word [0x42d8aa], ax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x2d
push edi
push ebx
call sub.WS2_32.dll_sendto
cmp eax, 0x2d
jb 0x40f6bc
call esi
mov ecx, dword [ebp + 0xc]
lea edi, [eax + ecx]
mov dword [ebp - 0x270], edi
call esi
cmp eax, edi
jae 0x40f856
call esi
mov ecx, dword [ebp - 0x270]
sub ecx, eax
mov eax, ecx
xor edx, edx
mov edi, 0x3e8
div edi
xor edi, edi
mov dword [ebp - 0x26c], 1
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x280], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul ecx, ecx, 0x3e8
lea eax, [ebp - 0x280]
push eax
push edi
push edi
lea eax, [ebp - 0x26c]
push eax
push 1
mov dword [ebp - 0x27c], ecx
call sub.WS2_32.dll_select
cmp eax, edi
je 0x40f88c
cmp eax, 0xffffffff
je 0x40f8a8
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x24]
push eax
push edi
push 0x141
lea eax, [ebp - 0x168]
push eax
push ebx
call sub.WS2_32.dll_recvfrom
cmp eax, 0xffffffff
je 0x40f8af
cmp eax, 0x1d
jb 0x40f848
cmp byte [ebp - 0x154], 3
je 0x40f8c9
cmp byte [ebp - 0x154], 0xb
je 0x40f8d0
cmp byte [ebp - 0x154], 0
jne 0x40f848
mov eax, 0xd8
cmp word [ebp - 0x150], ax
je 0x40f856
call esi
cmp eax, dword [ebp - 0x270]
jb 0x40f782
call esi
cmp eax, dword [ebp - 0x270]
ja 0x40f88c
mov eax, dword [ebp - 0x274]
test eax, eax
je 0x40f873
movzx ecx, byte [ebp - 0x160]
mov dword [eax], ecx
call esi
mov esi, eax
sub esi, dword [ebp - 0x14b]
push ebx
call sub.WS2_32.dll_closesocket
test esi, esi
jne 0x40f897
xor eax, eax
inc eax
jmp 0x40f899
mov esi, 0xfffffc1b
push ebx
call sub.WS2_32.dll_closesocket
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040ffa3
leave
ret
mov esi, 0xfffffc18
jmp 0x40f891
call sub.WS2_32.dll_WSAGetLastError
push ebx
mov esi, eax
call sub.WS2_32.dll_closesocket
push esi
call sub.WS2_32.dll_WSASetLastError
mov eax, 0xfffffc18
jmp 0x40f899
mov esi, 0xfffffc1d
jmp 0x40f891
mov esi, 0xfffffc1e
jmp 0x40f891