Function at 0x406c5c
Capabilities:
Create raw socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push ebx
push esi
push edi
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x218], 0xffffffff
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x214], 0x9c4
mov dword [ebp - 0x228], 0x20
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 8], 1
cmp dword [0x4622c8], 0
je 0x406d02
xor eax, eax
jmp 0x40702f
cmp dword [ebp + 8], 0
jne 0x406d13
xor eax, eax
jmp 0x40702f
push 1
push 3
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0xffffffff
jne 0x406d3c
mov eax, 1
jmp 0x40702f
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24c], eax
mov word [ebp - 0x250], 2
call fcn.00452a00
mov word [ebp - 0x24e], ax
mov eax, dword [ebp - 0x214]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
mov dword [ebp - 0x238], eax
call fcn.00452a00
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x254], ax
mov eax, dword [ebp - 0x228]
add eax, 8
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
je 0x40700b
mov byte [ebp - 0x257], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x268], eax
inc dword [ebp - 4]
mov eax, dword [ebp - 0x268]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x252], ax
mov byte [ebp - 0x258], 8
mov word [ebp - 0x256], 0
lea eax, [ebp - 0x258]
mov ecx, dword [ebp - 0x224]
mov edx, dword [eax]
mov dword [ecx], edx
mov eax, dword [eax + 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x228]
mov edi, dword [ebp - 0x224]
add edi, 8
mov eax, 0x78787878
mov ecx, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x228]
add eax, 8
push eax
mov eax, dword [ebp - 0x224]
push eax
call fcn.00406bb0
add esp, 8
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x256], ax
lea eax, [ebp - 0x258]
mov ecx, dword [ebp - 0x224]
mov edx, dword [eax]
mov dword [ecx], edx
mov eax, dword [eax + 4]
mov dword [ecx + 4], eax
push 0x10
lea eax, [ebp - 0x250]
push eax
push 0
mov eax, dword [ebp - 0x228]
add eax, 8
push eax
mov eax, dword [ebp - 0x224]
push eax
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0xffffffff
jne 0x406e97
jmp 0x406ffe
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x260], 0
jmp 0x406eb6
inc dword [ebp - 0x260]
mov eax, dword [ebp - 0x260]
cmp dword [ebp - 0x10c], eax
jbe 0x406eeb
mov eax, dword [ebp - 0x260]
mov ecx, dword [ebp - 0x234]
cmp dword [ebp + eax*4 - 0x108], ecx
jne 0x406ee6
jmp 0x406eeb
jmp 0x406eb0
mov eax, dword [ebp - 0x260]
cmp dword [ebp - 0x10c], eax
jne 0x406f23
cmp dword [ebp - 0x10c], 0x40
jae 0x406f23
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x260]
mov dword [ebp + ecx*4 - 0x108], eax
inc dword [ebp - 0x10c]
lea eax, [ebp - 0x23c]
push eax
push 0
push 0
lea eax, [ebp - 0x10c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0xffffffff
jne 0x406f55
jmp 0x406ffe
cmp dword [ebp - 0x110], 0
jle 0x406ff7
lea eax, [ebp - 0x10c]
push eax
mov eax, dword [ebp - 0x234]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x406ff7
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 0
je 0x406ff2
push 0
push 0
push 0
push 0xfa
mov eax, dword [ebp - 0x264]
push eax
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 0x110], eax
cmp dword [ebp - 0x110], 0xffffffff
jne 0x406fcd
jmp 0x406ff2
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x210], eax
mov eax, dword [ebp - 0x210]
mov ecx, dword [ebp + 8]
cmp dword [eax + 0xc], ecx
je 0x406ff2
mov dword [ebp - 8], 0
jmp 0x406ffe
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 2
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 8]
jmp 0x40702f
pop edi
pop esi
pop ebx
leave
ret