Function at 0x10029a4
Capabilities:
Create raw socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5d8
push ebx
xor ebx, ebx
push 0x2759
inc ebx
push ebx
mov dword [ebp - 0x30], 0x10
call fcn.0100308e
pop ecx
pop ecx
lea eax, [ebp - 0x1d8]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x10029f5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2732
push ebx
call fcn.0100308e
add esp, 0xc
jmp 0x1002e8f
push edi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x10], eax
jne 0x1002a1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2745
push ebx
call fcn.0100308e
add esp, 0xc
jmp 0x1002e80
push esi
mov esi, dword [sym.imp.WS2_32.dll_WSASocketW]
push edi
push edi
push edi
push 0x2e
push 3
push 2
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x1002a53
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2746
push ebx
call fcn.0100308e
add esp, 0xc
jmp 0x1002e7f
push edi
push edi
push edi
push ebx
push 3
push 2
call esi
cmp eax, 0xffffffff
mov dword [ebp - 0x18], eax
je 0x1002a39
mov esi, dword [ebp - 0x10]
push ebx
push esi
push eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
jne 0x1002a84
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2747
jmp 0x1002a45
xor eax, eax
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
cmp byte [ebp + 0x10], 0
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x48], esi
mov word [ebp - 0x40], 2
mov word [ebp - 0x28], 2
je 0x1002abe
push 4
push 0x10040b8
push ebx
push 0
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0xc]
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [ebp - 4], eax
ja 0x1002cbf
mov ecx, dword [ebp + 0xc]
imul ecx, ecx, 0x98
lea ecx, [ecx + 0x10044cc]
mov dword [ebp - 8], ecx
imul eax, eax, 0x98
push dword [eax + 0x10044cc]
call fcn.010021cd
mov dword [ebp - 0x24], eax
push 0x10
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_bind]
mov al, byte [ebp - 4]
mov byte [0x1004114], al
xor eax, eax
mov ax, word [0x1004116]
mov edi, 0x1004118
push eax
call esi
movzx ebx, ax
sub ebx, 8
mov dword [ebp + 0x10], 0
je 0x1002ba7
cmp dword [ebp + 0x10], 3
je 0x1002ba7
movzx eax, byte [edi + 2]
dec eax
mov dword [ebp - 0x2c], edi
je 0x1002b50
dec eax
dec eax
je 0x1002b48
sub eax, 8
jne 0x1002b8a
mov eax, dword [ebp - 0x24]
mov dword [edi + 4], eax
jmp 0x1002b87
cmp dword [ebp - 0x14], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + 4], eax
jne 0x1002b72
push 0x15b3
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x14], 0x15b3
jmp 0x1002b83
xor eax, eax
mov ax, word [edi + 0xa]
push eax
call esi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0xa], ax
inc dword [ebp + 0x10]
xor eax, eax
mov ax, word [edi]
push eax
call esi
movzx eax, ax
add edi, eax
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax]
push eax
call esi
movzx eax, ax
sub ebx, eax
jne 0x1002b2f
and word [0x1004112], 0
xor eax, eax
mov ax, word [0x1004116]
push eax
call esi
movzx eax, ax
push eax
mov edi, 0x1004110
push edi
call fcn.01002175
push dword [ebp - 4]
xor ebx, ebx
push 0x2717
inc ebx
push ebx
mov word [0x1004112], ax
call fcn.0100308e
mov eax, dword [ebp - 4]
imul eax, eax, 0x98
add esp, 0xc
push dword [eax + 0x10044cc]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x2755
push ebx
call fcn.0100308e
add esp, 0xc
push 4
lea eax, [ebp - 4]
push eax
push 4
push 0
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push 0x10
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push eax
push 0
push 0x88
push edi
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x1002d8e
push ebx
push dword [section..data]
xor edi, edi
push edi
lea eax, [ebp - 0x48]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, edi
je 0x1002c78
cmp eax, 0x102
jne 0x1002d9f
push 0x2728
push ebx
call fcn.0100308e
pop ecx
pop ecx
jmp 0x1002d79
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x28]
push eax
push edi
push 0x400
lea eax, [ebp - 0x5d8]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x1002d5d
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x274c
je 0x1002c66
call edi
push eax
push 0x2749
push ebx
call fcn.0100308e
add esp, 0xc
push 4
lea eax, [ebp - 4]
push eax
push 4
push 0
push dword [ebp - 0xc]
mov dword [ebp - 4], 0xff
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
ja 0x1002e7d
mov ecx, dword [ebp + 0xc]
imul ecx, ecx, 0x98
lea ecx, [ecx + 0x10044cc]
mov dword [ebp - 8], ecx
imul eax, eax, 0x98
push dword [eax + 0x10044cc]
call fcn.010021cd
mov dword [ebp - 0x24], eax
xor eax, eax
mov ax, word [0x10040c6]
mov edi, 0x10040c8
push eax
call esi
movzx ebx, ax
sub ebx, 8
mov dword [ebp + 0x10], 0
je 0x1002e0c
cmp dword [ebp + 0x10], 3
je 0x1002e0c
movzx eax, byte [edi + 2]
dec eax
mov dword [ebp + 8], edi
je 0x1002dbb
dec eax
dec eax
je 0x1002d52
sub eax, 8
jne 0x1002deb
mov eax, dword [ebp - 0x24]
mov dword [edi + 4], eax
jmp 0x1002de8
push edi
push ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
lea eax, [ebp - 0x5d8]
push eax
call fcn.01001fe2
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jbe 0x1002ae5
jmp 0x1002cbf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2748
jmp 0x1002cb6
cmp eax, 0xffffffff
jne 0x1002cbf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2757
push 1
jmp 0x1002cb7
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [edi + 4], eax
mov eax, 0x15b3
cmp dword [ebp - 0x14], eax
jne 0x1002dd3
and dword [ebp - 0x14], 0
jmp 0x1002ddd
xor eax, eax
mov ax, word [edi + 0xa]
push eax
call esi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0xa], ax
inc dword [ebp + 0x10]
xor eax, eax
mov ax, word [edi]
push eax
call esi
movzx eax, ax
add edi, eax
mov eax, dword [ebp + 8]
movzx eax, word [eax]
push eax
call esi
movzx eax, ax
sub ebx, eax
jne 0x1002d31
and word [0x10040c2], 0
xor eax, eax
mov ax, word [0x10040c6]
push eax
call esi
movzx eax, ax
push eax
mov edi, 0x10040c0
push edi
call fcn.01002175
mov word [0x10040c2], ax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
push 0x10
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push eax
push 0
push 0x50
push edi
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
je 0x1002e67
mov eax, dword [ebp - 4]
inc eax
cmp eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jbe 0x1002cfa
jmp 0x1002e7d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x2748
push 1
call fcn.0100308e
add esp, 0xc
xor edi, edi
pop esi
cmp dword [ebp - 0x10], edi
pop edi
je 0x1002e8f
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop ebx
leave
ret 0xc