Function at 0x1002cc70
Capabilities:
Check for time delay via gettickcount
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004f052
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2fd8
call fcn.10036fa0
mov eax, dword [0x1005d330]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x10], esp
push 0
push ebx
mov esi, ecx
push 0
push 0
mov ecx, 0x1005ed60
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x2e5c], esi
call fcn.100128c0
test eax, eax
je 0x1002cedb
mov edx, dword [ebx + 4]
xor eax, eax
mov ecx, 0x400
lea edi, [ebp - 0x1237]
rep stosd dword es:[edi], eax
push 8
lea eax, [ebp - 0x2e40]
push eax
lea ecx, [ebp - 0x1237]
push ecx
push edx
mov ecx, esi
mov byte [ebp - 0x1238], 1
mov dword [ebp - 0x2e40], 0xf
call fcn.10017520
test eax, eax
je 0x1002cedb
mov eax, dword [ebp - 0x1230]
mov edx, dword [ebx + 4]
push 8
mov dword [ebp - 0x2e58], eax
mov dword [ebp - 0x2e40], eax
lea eax, [ebp - 0x2e40]
push eax
lea ecx, [ebp - 0x1228]
push ecx
push edx
mov ecx, esi
call fcn.10017520
test eax, eax
je 0x1002cedb
lea eax, [ebp - 0x1204]
push eax
lea ecx, [ebp - 0x234]
push 0x10052f6c
push ecx
call fcn.10036e11
lea edx, [ebp - 0x234]
push str.Host:
push edx
call fcn.10036fe0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x1002cedb
add esi, 6
push 0x1005100c
push esi
mov ebx, 0x6db
call fcn.10036fe0
add esp, 8
test eax, eax
je 0x1002cd9c
mov byte [eax], 0
inc eax
push eax
call fcn.10036ef1
add esp, 4
mov ebx, eax
push ebx
xor eax, eax
mov byte [ebp - 0x2e3c], 0
mov ecx, 0x400
lea edi, [ebp - 0x2e3b]
push esi
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2e3c]
push str.Host:_s_Port:_d
push eax
call fcn.10036e11
add esp, 0xc
lea edx, [ebp - 0x2e3c]
mov ecx, esp
mov dword [ebp - 0x2e54], esp
push edx
call fcn.100047c0
push ecx
mov ecx, esp
mov dword [ebp - 0x2e48], esp
push 0x10052f50
mov dword [ebp - 4], 0
call fcn.100047c0
push ecx
mov ecx, esp
mov dword [ebp - 0x2e4c], esp
push 0x10050713
mov byte [ebp - 4], 1
call fcn.100047c0
mov eax, dword [ebp + 8]
push eax
mov ecx, 0x1005ed60
mov dword [ebp - 4], 0xffffffff
call fcn.1000cbb0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
lea ecx, [ebp - 0x2ee4]
mov dword [ebp - 0x2e44], eax
call fcn.1001b740
lea ecx, [ebp - 0x2ee4]
push ecx
push 1
mov ecx, 0x1005ff80
mov dword [ebp - 4], 2
call fcn.10030070
mov ecx, dword [0x10078d54]
xor eax, eax
test ecx, ecx
je 0x1002ce8a
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x2e48]
push edx
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x34]
push eax
push edx
mov dword [ebp - 0x2e48], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x2ee4]
push eax
push ebx
mov ebx, dword [ebp - 0x2e5c]
push esi
mov esi, dword [ebp - 0x2e44]
push esi
mov ecx, ebx
call fcn.10017d80
test eax, eax
je 0x1002cec9
mov ecx, dword [ebp - 0x2e58]
add ecx, 0x10
push ecx
lea edx, [ebp - 0x1238]
push edx
push esi
mov ecx, ebx
call fcn.10017640
test eax, eax
jne 0x1002cef8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x2ee4]
call fcn.1001b6e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
xor eax, eax
call fcn.10036c09
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor esi, esi
mov dword [ebp - 0x2e50], 0xffffffff
mov dword [ebp - 0x2e60], 0x10
mov byte [ebp - 4], 3
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2e4c], eax
mov dword [ebp - 0x2e48], esi
cmp dword [edi], 2
jne 0x1002d25e
mov eax, dword [ebx + 0x110]
test eax, eax
je 0x1002d25e
mov edx, dword [ebp - 0x2e44]
xor ecx, ecx
mov dword [ebp - 0x2fe8], ecx
xor eax, eax
cmp eax, ecx
jae 0x1002cf6a
cmp dword [ebp + eax*4 - 0x2fe4], edx
je 0x1002cf68
inc eax
jmp 0x1002cf58
cmp eax, ecx
jne 0x1002cf85
cmp ecx, 0x40
jae 0x1002cf85
mov dword [ebp + eax*4 - 0x2fe4], edx
mov ecx, dword [ebp - 0x2fe8]
inc ecx
mov dword [ebp - 0x2fe8], ecx
xor eax, eax
cmp eax, ecx
jae 0x1002cf9c
mov edx, dword [ebp + eax*4 - 0x2fe4]
cmp edx, dword [edi + 4]
je 0x1002cf9a
inc eax
jmp 0x1002cf87
cmp eax, ecx
jne 0x1002cfb3
cmp ecx, 0x40
jae 0x1002cfb3
mov ecx, dword [edi + 4]
mov dword [ebp + eax*4 - 0x2fe4], ecx
inc dword [ebp - 0x2fe8]
lea edx, [ebp - 0x2c]
push edx
push 0
push 0
lea eax, [ebp - 0x2fe8]
push eax
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jne 0x1002d014
mov eax, dword [0x1005c168]
test eax, eax
jle 0x1002cf31
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2e4c]
mov ecx, dword [0x1005c168]
imul ecx, ecx, 0x3e8
cmp eax, ecx
jle 0x1002d014
push 0x10058824
lea edx, [ebp - 0x2e98]
push edx
mov dword [ebp - 0x2e98], 0xffffffff
call fcn.100374b2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test esi, esi
mov dword [ebp - 0x2e4c], eax
jge 0x1002d03f
push 0x10058824
lea eax, [ebp - 0x2eb8]
push eax
mov dword [ebp - 0x2eb8], 0xffffffff
call fcn.100374b2
mov esi, dword [ebp - 0x2e44]
lea ecx, [ebp - 0x2fe8]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d14e
push 8
lea edx, [ebp - 0x2e40]
push edx
lea eax, [ebp - 0x1238]
push eax
push esi
mov ecx, ebx
mov dword [ebp - 0x2e40], 0x10
call fcn.10017520
test eax, eax
jne 0x1002d09b
push 0x10058824
lea ecx, [ebp - 0x2e7c]
push ecx
mov dword [ebp - 0x2e7c], 0xffffffff
call fcn.100374b2
mov eax, dword [ebp - 0x1230]
mov ecx, dword [ebp - 0x2e44]
push 8
mov esi, eax
lea edx, [ebp - 0x2e40]
mov dword [ebp - 0x2e40], eax
push edx
lea eax, [ebp - 0x1228]
push eax
push ecx
mov ecx, ebx
mov dword [ebp - 0x2e58], esi
call fcn.10017520
test eax, eax
jne 0x1002d0ec
push 0x10058824
lea edx, [ebp - 0x2e84]
push edx
mov dword [ebp - 0x2e84], 0xffffffff
call fcn.100374b2
mov ecx, dword [edi + 4]
add esi, 0x10
push esi
lea eax, [ebp - 0x1238]
push eax
push ecx
mov ecx, ebx
call fcn.10017640
test eax, eax
jne 0x1002d121
push 0x10058824
lea edx, [ebp - 0x2e9c]
push edx
mov dword [ebp - 0x2e9c], 0xffffffff
call fcn.100374b2
push 2
lea eax, [ebp - 0x1220]
push 0x10052f4c
push eax
call fcn.100391c0
add esp, 0xc
test eax, eax
jne 0x1002cf31
mov dword [ebp - 0x2e48], 1
jmp 0x1002cf31
mov edx, dword [edi + 4]
lea ecx, [ebp - 0x2fe8]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002cf31
mov edx, dword [edi + 4]
push 8
lea eax, [ebp - 0x2e40]
push eax
lea ecx, [ebp - 0x1238]
push ecx
push edx
mov ecx, ebx
mov dword [ebp - 0x2e40], 0x10
call fcn.10017520
test eax, eax
jne 0x1002d1a6
mov dword [ebp - 0x2ea4], eax
push 0x10058824
lea eax, [ebp - 0x2ea4]
push eax
call fcn.100374b2
mov eax, dword [ebp - 0x1230]
push 8
lea ecx, [ebp - 0x2e40]
push ecx
mov esi, eax
lea edx, [ebp - 0x1228]
mov dword [ebp - 0x2e40], eax
mov eax, dword [edi + 4]
push edx
push eax
mov ecx, ebx
mov dword [ebp - 0x2e58], esi
call fcn.10017520
test eax, eax
jne 0x1002d1f0
push 0x10058824
lea ecx, [ebp - 0x2eac]
push ecx
mov dword [ebp - 0x2eac], eax
call fcn.100374b2
lea edx, [ebp - 0x11fc]
push edx
lea eax, [ebp - 0x234]
push 0x10052f6c
push eax
call fcn.10036e11
push 2
lea ecx, [ebp - 0x234]
push 0x10052f48
push ecx
call fcn.10040b84
add esp, 0x18
test eax, eax
je 0x1002d25e
mov eax, dword [ebp - 0x2e44]
add esi, 0x10
push esi
lea edx, [ebp - 0x1238]
push edx
push eax
mov ecx, ebx
call fcn.10017640
test eax, eax
jne 0x1002cf31
push 0x10058824
lea ecx, [ebp - 0x2eb4]
push ecx
mov dword [ebp - 0x2eb4], 0xffffffff
call fcn.100374b2
xor eax, eax
mov byte [ebp - 0x1a38], 0
mov ecx, 0xff
lea edi, [ebp - 0x1a37]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x1638], 0
xor eax, eax
mov ecx, 0xff
lea edi, [ebp - 0x1637]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [ebp - 0x232]
lea edx, [ebp - 0x1a38]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x1002d2a0
lea edx, [ebp - 0x1a38]
push 0x10052f44
push edx
call fcn.10036fe0
add esp, 8
test eax, eax
jne 0x1002d2dd
push 0x10058824
lea eax, [ebp - 0x2ebc]
push eax
mov dword [ebp - 0x2ebc], 0xffffffff
call fcn.100374b2
mov byte [eax], 0
lea ecx, [eax + 1]
lea edx, [ebp - 0x1638]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x1002d2f0
lea ecx, [ebp - 0x1638]
push 0x10052f44
push ecx
call fcn.10036fe0
add esp, 8
test eax, eax
jne 0x1002d32d
push 0x10058824
lea edx, [ebp - 0x2e90]
push edx
mov dword [ebp - 0x2e90], 0xffffffff
call fcn.100374b2
mov byte [eax], 0
inc eax
push eax
call fcn.10036ef1
lea eax, [ebp - 0x1638]
push 0x10052f40
push eax
call fcn.1003ebdf
add esp, 0xc
test eax, eax
jne 0x1002d4e6
push eax
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
push 0
mov dword [ebp - 0x2e50], esi
mov word [ebp - 0x24], 2
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea ecx, [ebp - 0x24]
push ecx
push esi
mov word [ebp - 0x22], ax
mov dword [ebp - 0x20], 0
call dword [sym.imp.WS2_32.dll_bind]
mov ebx, dword [sym.imp.WS2_32.dll_getsockname]
lea edx, [ebp - 0x2e60]
push edx
lea eax, [ebp - 0x24]
push eax
push esi
call ebx
mov ecx, dword [ebp - 0x22]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x2e44]
lea edx, [ebp - 0x2e60]
movzx esi, ax
push edx
lea eax, [ebp - 0x24]
push eax
push ecx
call ebx
lea edx, [ebp - 0x1a38]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
lea eax, [ebp - 0x2e54]
push eax
lea ecx, [ebp - 0x1e38]
push ecx
push 0
push 0x10
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x2e54], 0x400
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
push esi
lea eax, [ebp - 0x1638]
push eax
lea ecx, [ebp - 0x1e38]
push ecx
lea edx, [ebp - 0x234]
push str._s_s_d
push edx
call fcn.10036e11
add esp, 0x14
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x2e4c]
call fcn.10001dc0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002d436
sub eax, edx
mov edi, eax
mov eax, dword [ebp - 0x2e4c]
test eax, eax
je 0x1002d476
mov esi, eax
mov eax, dword [eax]
test eax, eax
je 0x1002d476
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov esi, eax
test esi, esi
jne 0x1002d478
push 0x8007000e
call fcn.10044ae0
jmp 0x1002d478
xor esi, esi
mov eax, dword [ebp - 0x2e58]
lea ecx, [edi + edi]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x11fc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x2e44]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10
push eax
lea ecx, [ebp - 0x1238]
push ecx
mov ecx, dword [ebp - 0x2e5c]
push edx
call fcn.10017640
test eax, eax
jne 0x1002d4d1
push 0x10058824
lea eax, [ebp - 0x2e70]
push eax
mov dword [ebp - 0x2e70], 0xffffffff
call fcn.100374b2
mov ecx, dword [ebp - 0x2e4c]
test ecx, ecx
mov byte [ebp - 4], 3
je 0x1002d4ec
call fcn.100027a0
jmp 0x1002d4ec
mov ebx, dword [sym.imp.WS2_32.dll_getsockname]
lea ecx, [ebp - 0x1638]
push 0x10052f30
push ecx
call fcn.1003ebdf
add esp, 8
test eax, eax
jne 0x1002d7de
mov eax, dword [ebp - 0x2e48]
test eax, eax
je 0x1002d68b
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
push 0
mov dword [ebp - 0x2e50], esi
mov word [ebp - 0x24], 2
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [ebp - 0x24]
push edx
push esi
mov word [ebp - 0x22], ax
mov dword [ebp - 0x20], 0
call dword [sym.imp.WS2_32.dll_bind]
lea eax, [ebp - 0x2e60]
push eax
lea ecx, [ebp - 0x24]
push ecx
push esi
call ebx
mov edx, dword [ebp - 0x22]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0x2e44]
movzx esi, ax
lea eax, [ebp - 0x2e60]
push eax
lea ecx, [ebp - 0x24]
push ecx
push edx
call ebx
lea eax, [ebp - 0x1a38]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea ecx, [ebp - 0x2e54]
push ecx
lea edx, [ebp - 0x1e38]
push edx
push 0
push 0x10
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x2e54], 0x400
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
push esi
push 0x10052f40
lea ecx, [ebp - 0x1e38]
push ecx
lea edx, [ebp - 0x234]
push str._s_s_d
push edx
call fcn.10036e11
add esp, 0x14
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x2e48]
call fcn.10001dc0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 5
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002d5f2
sub eax, edx
mov edi, eax
mov eax, dword [ebp - 0x2e48]
test eax, eax
je 0x1002d632
mov esi, eax
mov eax, dword [eax]
test eax, eax
je 0x1002d632
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov esi, eax
test esi, esi
jne 0x1002d634
push 0x8007000e
call fcn.10044ae0
jmp 0x1002d634
xor esi, esi
mov eax, dword [ebp - 0x2e58]
lea ecx, [edi + edi]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x11fc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x2e44]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10
push eax
lea ecx, [ebp - 0x1238]
push ecx
mov ecx, dword [ebp - 0x2e5c]
push edx
call fcn.10017640
test eax, eax
jne 0x1002d7cb
mov dword [ebp - 0x2e64], 0xffffffff
lea eax, [ebp - 0x2e64]
jmp 0x1002d7c0
mov eax, dword [ebp - 0x2e44]
lea ecx, [ebp - 0x2e60]
push ecx
lea edx, [ebp - 0x24]
push edx
push eax
mov dword [ebp - 0x2e50], 0xffffffff
call ebx
mov ecx, dword [ebp - 0x22]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
lea edx, [ebp - 0x1a38]
push edx
movzx esi, ax
call dword [sym.imp.WS2_32.dll_inet_addr]
lea eax, [ebp - 0x2e54]
push eax
lea ecx, [ebp - 0x1e38]
push ecx
push 0
push 0x10
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x2e54], 0x400
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
push esi
lea eax, [ebp - 0x1638]
push eax
lea ecx, [ebp - 0x1e38]
push ecx
lea edx, [ebp - 0x234]
push str._s_s_d
push edx
call fcn.10036e11
add esp, 0x14
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x2e48]
call fcn.10001dc0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 6
lea edx, [eax + 1]
jmp 0x1002d730
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002d730
sub eax, edx
mov edi, eax
mov eax, dword [ebp - 0x2e48]
test eax, eax
je 0x1002d770
mov esi, eax
mov eax, dword [eax]
test eax, eax
je 0x1002d770
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ecx, dword [esi]
push eax
push ecx
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
mov esi, eax
test esi, esi
jne 0x1002d772
push 0x8007000e
call fcn.10044ae0
jmp 0x1002d772
xor esi, esi
mov eax, dword [ebp - 0x2e58]
lea ecx, [edi + edi]
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x11fc]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0x2e44]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10
push eax
lea ecx, [ebp - 0x1238]
push ecx
mov ecx, dword [ebp - 0x2e5c]
push edx
call fcn.10017640
test eax, eax
jne 0x1002d7cb
mov dword [ebp - 0x2e78], 0xffffffff
lea eax, [ebp - 0x2e78]
push 0x10058824
push eax
call fcn.100374b2
mov ecx, dword [ebp - 0x2e48]
test ecx, ecx
mov byte [ebp - 4], 3
je 0x1002d7de
call fcn.100027a0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x2e5c]
mov dword [ebp - 0x2e4c], eax
cmp dword [ebx], 2
jne 0x1002db7e
mov eax, dword [edi + 0x110]
test eax, eax
je 0x1002db7e
mov edx, dword [ebp - 0x2e44]
xor eax, eax
mov dword [ebp - 0x2fe8], eax
xor ecx, ecx
lea ebx, [ebx]
cmp ecx, eax
jae 0x1002d832
cmp dword [ebp + ecx*4 - 0x2fe4], edx
je 0x1002d830
inc ecx
jmp 0x1002d820
cmp ecx, eax
jne 0x1002d84d
cmp eax, 0x40
jae 0x1002d84d
mov dword [ebp + ecx*4 - 0x2fe4], edx
mov eax, dword [ebp - 0x2fe8]
inc eax
mov dword [ebp - 0x2fe8], eax
xor ecx, ecx
nop
cmp ecx, eax
jae 0x1002d865
mov edx, dword [ebp + ecx*4 - 0x2fe4]
cmp edx, dword [ebx + 4]
je 0x1002d863
inc ecx
jmp 0x1002d850
cmp ecx, eax
jne 0x1002d883
cmp eax, 0x40
jae 0x1002d883
mov eax, dword [ebx + 4]
mov dword [ebp + ecx*4 - 0x2fe4], eax
mov eax, dword [ebp - 0x2fe8]
inc eax
mov dword [ebp - 0x2fe8], eax
mov edx, dword [ebp - 0x2e50]
cmp edx, 0xffffffff
je 0x1002d8b6
xor ecx, ecx
cmp ecx, eax
jae 0x1002d8a2
cmp dword [ebp + ecx*4 - 0x2fe4], edx
je 0x1002d8a0
inc ecx
jmp 0x1002d890
cmp ecx, eax
jne 0x1002d8b6
cmp eax, 0x40
jae 0x1002d8b6
mov dword [ebp + ecx*4 - 0x2fe4], edx
inc dword [ebp - 0x2fe8]
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0
lea edx, [ebp - 0x2fe8]
push edx
push 0xffffffffffffffff
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jne 0x1002d91d
mov eax, dword [0x1005c168]
test eax, eax
jle 0x1002d7f3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x1005c168]
mov esi, dword [ebp - 0x2e4c]
imul ecx, ecx, 0x3e8
sub eax, esi
cmp eax, ecx
jle 0x1002d7f3
push 0x10058824
lea edx, [ebp - 0x2ea0]
push edx
mov dword [ebp - 0x2ea0], 0xffffffff
call fcn.100374b2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test esi, esi
mov dword [ebp - 0x2e4c], eax
jge 0x1002d948
push 0x10058824
lea eax, [ebp - 0x2e80]
push eax
mov dword [ebp - 0x2e80], 0xffffffff
call fcn.100374b2
mov esi, dword [ebp - 0x2e44]
lea ecx, [ebp - 0x2fe8]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002da0f
push 0
lea edx, [ebp - 0x2e40]
push edx
lea eax, [ebp - 0x1238]
push eax
push esi
mov ecx, edi
mov dword [ebp - 0x2e40], 0x1000
mov byte [ebp - 0x1238], 0
call fcn.10017520
test eax, eax
jne 0x1002d9cb
mov eax, dword [ebp - 0x2e40]
test eax, eax
push 0x10058824
jne 0x1002d9b5
lea ecx, [ebp - 0x2eb0]
push ecx
mov dword [ebp - 0x2eb0], 0xffffffff
call fcn.100374b2
lea edx, [ebp - 0x2e88]
push edx
mov dword [ebp - 0x2e88], 0xffffffff
call fcn.100374b2
mov eax, dword [ebp - 0x2e40]
test eax, eax
jbe 0x1002d7f3
mov ecx, dword [ebx + 4]
push eax
lea eax, [ebp - 0x1238]
push eax
push ecx
mov ecx, edi
call fcn.10017640
test eax, eax
jne 0x1002d7f3
push 0x10058824
lea edx, [ebp - 0x2e8c]
push edx
mov dword [ebp - 0x2e8c], 0xffffffff
call fcn.100374b2
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0x2fe8]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002dad9
mov ecx, dword [ebx + 4]
push 0
lea edx, [ebp - 0x2e40]
push edx
lea eax, [ebp - 0x1238]
push eax
push ecx
mov ecx, edi
mov dword [ebp - 0x2e40], 0x1000
mov byte [ebp - 0x1238], 0
call fcn.10017520
test eax, eax
jne 0x1002da92
mov eax, dword [ebp - 0x2e40]
test eax, eax
push 0x10058824
jne 0x1002da7c
lea edx, [ebp - 0x2e94]
push edx
mov dword [ebp - 0x2e94], 0xffffffff
call fcn.100374b2
lea eax, [ebp - 0x2ea8]
push eax
mov dword [ebp - 0x2ea8], 0xffffffff
call fcn.100374b2
mov eax, dword [ebp - 0x2e40]
test eax, eax
jbe 0x1002d7f3
mov edx, dword [ebp - 0x2e44]
push eax
lea ecx, [ebp - 0x1238]
push ecx
push edx
mov ecx, edi
call fcn.10017640
test eax, eax
jne 0x1002d7f3
push 0x10058824
lea eax, [ebp - 0x2e68]
push eax
mov dword [ebp - 0x2e68], 0xffffffff
call fcn.100374b2
mov eax, dword [ebp - 0x2e50]
cmp eax, 0xffffffff
je 0x1002d7f3
lea ecx, [ebp - 0x2fe8]
push ecx
mov edx, eax
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x1002d7f3
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0x2e50]
lea ecx, [ebp - 0x24]
push ecx
push 0
push 0x1000
lea edx, [ebp - 0x1238]
push edx
push eax
mov dword [ebp - 0x2e40], 0x1000
mov byte [ebp - 0x1238], 0
mov dword [ebp + 8], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
mov dword [ebp - 0x2e40], eax
jbe 0x1002d7f3
mov edx, dword [ebx + 4]
push eax
lea ecx, [ebp - 0x1238]
push ecx
push edx
mov ecx, edi
call fcn.10017640
test eax, eax
jne 0x1002d7f3
push 0x10058824
lea eax, [ebp - 0x2e6c]
push eax
mov dword [ebp - 0x2e6c], 0xffffffff
call fcn.100374b2
push 0x10058824
lea ecx, [ebp - 0x2e74]
push ecx
mov dword [ebp - 0x2e74], 0xffffffff
call fcn.100374b2
mov eax, dword [ebp - 0x2e50]
cmp eax, 0xffffffff
je 0x1002dbab
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x2e44]
cmp eax, 0xffffffff
je 0x1002dbbd
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0x1002ced0
ret