Function at 0x406000
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Get socket status
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5095ee
mov eax, dword fs:[0]
push eax
sub esp, 0x8e8
mov eax, dword [0x72400c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x87c], ebx
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edx, dword [ebx + 4]
mov dword [ebp - 0x8ac], edi
push dword [ebp - 0x8ac]
mov dword [ebp - 0x8a8], esi
push ecx
mov ecx, dword [ebx]
call fcn.00409280
mov eax, dword [ebx]
add esp, 8
mov dword [ebx + 4], eax
mov edx, dword [edi + 4]
push dword [ebp - 0x8ac]
push ecx
mov ecx, dword [edi]
call fcn.00409230
mov eax, dword [edi]
add esp, 8
mov dword [edi + 4], eax
mov eax, 0x92492493
mov ecx, dword [esi + 4]
sub ecx, dword [esi]
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
jne 0x40609b
xor al, al
jmp 0x406ecd
lea eax, [ebp - 0x878]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x406094
mov dword [ebp - 0x890], eax
mov dword [ebp - 0x88c], eax
call fcn.00408f40
mov dword [ebp - 0x890], eax
mov dword [ebp - 4], 0
mov eax, 0x92492493
mov ecx, dword [esi + 4]
xor edi, edi
sub ecx, dword [esi]
imul ecx
mov dword [ebp - 0x884], edi
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4064a8
xor ebx, ebx
mov dword [ebp - 0x880], ebx
nop dword [eax]
add ebx, dword [esi]
push 1
push 0
push 0x70f80c
mov ecx, ebx
mov dword [ebp - 0x8a4], ebx
call fcn.00407ec0
cmp eax, 0xffffffff
je 0x40646c
mov ecx, dword [ebx + 0x10]
dec ecx
cmp eax, ecx
je 0x40646c
push 0xffffffffffffffff
inc eax
mov ecx, ebx
push eax
lea eax, [ebp - 0x328]
push eax
call fcn.00407a10
mov byte [ebp - 4], 1
cmp dword [ebp - 0x318], 0
jne 0x406177
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x314]
cmp eax, 0x10
jb 0x40646c
inc eax
lea ecx, [ebp - 0x328]
push eax
push dword [ebp - 0x328]
call fcn.00408600
jmp 0x40646c
lea eax, [ebp - 0x328]
push eax
lea ecx, [ebp - 0x890]
call fcn.004091a0
mov edi, dword [ebp - 0x890]
mov esi, eax
mov dword [ebp - 0x8ec], edi
cmp esi, edi
je 0x406219
cmp dword [esi + 0x24], 0x10
lea edx, [esi + 0x10]
lea eax, [edx + 0x10]
mov dword [ebp - 0x888], eax
jb 0x4061af
mov edx, dword [edx]
mov ebx, dword [ebp - 0x888]
lea ecx, [ebp - 0x328]
cmp dword [ebp - 0x314], 0x10
mov eax, dword [eax]
cmovae ecx, dword [ebp - 0x328]
mov edi, dword [ebx]
cmp dword [ebp - 0x318], edi
cmovb eax, dword [ebp - 0x318]
push eax
call fcn.00405ee0
add esp, 4
test eax, eax
jne 0x4061fe
mov eax, dword [ebp - 0x318]
mov edx, ebx
mov ecx, dword [edx]
cmp ecx, eax
jbe 0x4061fa
or eax, 0xffffffff
jmp 0x4061fe
sbb eax, eax
neg eax
mov edi, dword [ebp - 0x890]
mov ebx, dword [ebp - 0x8a4]
shr eax, 0x1f
test al, al
jne 0x406219
mov dword [ebp - 0x8e8], esi
jmp 0x406221
mov dword [ebp - 0x8b0], edi
mov esi, edi
mov dword [ebp - 0x888], edi
cmp esi, edi
je 0x40628a
lea eax, [ebx + 0x18]
mov edx, ebx
push eax
lea ecx, [ebp - 0x3b8]
call fcn.004090d0
add esp, 4
push eax
lea ecx, [esi + 0x28]
mov byte [ebp - 4], 2
call fcn.00407690
mov eax, dword [ebp - 0x3a4]
cmp eax, 0x10
jb 0x40626a
inc eax
lea ecx, [ebp - 0x3b8]
push eax
push dword [ebp - 0x3b8]
call fcn.00408600
mov dword [ebp - 0x3a4], 0xf
mov dword [ebp - 0x3a8], 0
mov byte [ebp - 0x3b8], 0
jmp 0x40643e
mov dword [ebp - 0x8c8], 0
mov dword [ebp - 0x8c4], 0
mov dword [ebp - 0x8c0], 0
lea eax, [ebx + 0x18]
mov byte [ebp - 4], 3
push eax
mov edx, ebx
lea ecx, [ebp - 0x39c]
call fcn.004090d0
add esp, 4
push eax
lea ecx, [ebp - 0x8c8]
mov byte [ebp - 4], 4
call fcn.00407690
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x388]
cmp eax, 0x10
jb 0x4062f2
inc eax
lea ecx, [ebp - 0x39c]
push eax
push dword [ebp - 0x39c]
call fcn.00408600
lea eax, [ebp - 0x8c8]
mov dword [ebp - 0x388], 0xf
push eax
lea edx, [ebp - 0x328]
mov dword [ebp - 0x38c], 0
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 0x39c], 0
call fcn.00409110
add esp, 4
push eax
lea ecx, [ebp - 0x890]
mov byte [ebp - 4], 5
call fcn.00409440
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x8f4]
push eax
lea ecx, [ebp - 0x890]
call fcn.00409470
lea ecx, [ebp - 0x3dc]
call fcn.00406f60
mov dword [ebp - 0x338], 0xf
mov dword [ebp - 0x33c], 0
mov byte [ebp - 0x34c], 0
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x32c], 0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x328]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x34c]
call fcn.00408060
mov ecx, dword [ebp - 0x87c]
lea eax, [ebp - 0x350]
push eax
call fcn.00407750
mov ecx, dword [ebp - 0x334]
test ecx, ecx
je 0x4063fa
mov eax, dword [ebp - 0x32c]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.00408ce0
mov dword [ebp - 0x334], 0
mov dword [ebp - 0x330], 0
mov dword [ebp - 0x32c], 0
mov eax, dword [ebp - 0x338]
cmp eax, 0x10
jb 0x406418
inc eax
lea ecx, [ebp - 0x34c]
push eax
push dword [ebp - 0x34c]
call fcn.00408600
lea ecx, [ebp - 0x8c8]
mov dword [ebp - 0x338], 0xf
mov dword [ebp - 0x33c], 0
mov byte [ebp - 0x34c], 0
call fcn.00407630
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x314]
cmp eax, 0x10
jb 0x406460
inc eax
lea ecx, [ebp - 0x328]
push eax
push dword [ebp - 0x328]
call fcn.00408600
mov edi, dword [ebp - 0x884]
mov esi, dword [ebp - 0x8a8]
mov ecx, dword [esi + 4]
mov eax, 0x92492493
sub ecx, dword [esi]
inc edi
mov ebx, dword [ebp - 0x880]
imul ecx
add ebx, 0x1c
mov dword [ebp - 0x884], edi
add edx, ecx
mov dword [ebp - 0x880], ebx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x406100
mov ebx, dword [ebp - 0x87c]
mov ecx, dword [ebx + 4]
mov eax, 0x66666667
mov esi, dword [ebx]
xor edi, edi
sub ecx, esi
mov dword [ebp - 0x8d4], 0
imul ecx
mov dword [ebp - 0x880], edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40659e
nop dword [eax + eax]
mov ecx, dword [ebx + 4]
mov eax, 0x66666667
sub ecx, esi
imul ecx
mov eax, 0x20
sar edx, 4
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
sub ebx, edi
cmp ebx, 0x20
cmova ebx, eax
xor esi, esi
test ebx, ebx
je 0x40655e
lea edi, [edi + edi*4]
shl edi, 3
nop
mov eax, dword [ebp - 0x87c]
lea ecx, [ebp - 0x8d4]
push 0
push 0
mov eax, dword [eax]
add eax, edi
push eax
push 0x407060
push 0
mov dword [eax], ecx
push 0
call fcn.004eba1c
add esp, 0x18
test eax, eax
je 0x40664e
cmp eax, 0xffffffff
je 0x40664e
mov dword [ebp + esi*4 - 0x90], eax
add edi, 0x28
inc esi
cmp esi, ebx
jb 0x406510
mov edi, dword [ebp - 0x880]
push 0xffffffffffffffff
push 1
lea eax, [ebp - 0x90]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
add edi, ebx
mov eax, 0x66666667
mov ebx, dword [ebp - 0x87c]
mov dword [ebp - 0x880], edi
mov ecx, dword [ebx + 4]
mov esi, dword [ebx]
sub ecx, esi
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x4064e0
mov dword [ebp - 0x89c], 0
mov dword [ebp - 0x898], 0
mov dword [ebp - 0x894], 0
mov dword [ebp - 0x8e0], 0
mov dword [ebp - 0x8dc], 0
mov dword [ebp - 0x8d8], 0
mov byte [ebp - 4], 8
mov eax, 0x66666667
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
imul ecx
mov dword [ebp - 0x880], 0
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4066fc
xor esi, esi
mov dword [ebp - 0x87c], esi
nop dword [eax]
mov edi, dword [ebx]
xor ecx, ecx
add edi, esi
mov eax, dword [edi + 0x20]
mov edx, dword [edi + 0x1c]
sub eax, edx
sar eax, 2
test eax, eax
je 0x406640
mov esi, dword [edi + 0x20]
cmp dword [edx + ecx*4], 0
jne 0x406655
mov eax, esi
inc ecx
sub eax, edx
sar eax, 2
cmp ecx, eax
jb 0x406628
mov esi, dword [ebp - 0x87c]
push edi
lea ecx, [ebp - 0x8e0]
call fcn.00407750
jmp 0x4066c8
xor bl, bl
jmp 0x406ea2
push edi
lea ecx, [ebp - 0x89c]
call fcn.00407750
mov ecx, dword [ebp - 0x898]
mov eax, 0x66666667
mov esi, dword [ebp - 0x89c]
sub ecx, esi
imul ecx
xor ecx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
lea eax, [eax - 5]
lea esi, [esi + eax*8]
mov eax, dword [esi + 0x20]
sub eax, dword [esi + 0x1c]
sar eax, 2
test eax, eax
je 0x4066c2
nop dword [eax + eax]
mov eax, dword [esi + 0x1c]
lea edx, [ecx*4]
cmp dword [edx + eax], 0
je 0x406766
mov eax, dword [esi + 0x20]
inc ecx
sub eax, dword [esi + 0x1c]
sar eax, 2
cmp ecx, eax
jb 0x4066a0
mov esi, dword [ebp - 0x87c]
mov ecx, dword [ebx + 4]
mov eax, 0x66666667
sub ecx, dword [ebx]
add esi, 0x28
mov edi, dword [ebp - 0x880]
imul ecx
inc edi
mov dword [ebp - 0x87c], esi
sar edx, 4
mov eax, edx
mov dword [ebp - 0x880], edi
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x406610
push 0x280
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.004e7b30
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x87c], edx
mov dword [ebp - 0x8bc], edx
mov dword [ebp - 0x8b8], edx
mov dword [ebp - 0x8b4], edx
mov byte [ebp - 4], 9
lea eax, [edx + edx*4]
xor ecx, ecx
mov edx, dword [ebp - 0x89c]
lea esi, [ebp - 0x310]
xor ebx, ebx
mov dword [ebp - 0x884], ecx
mov dword [ebp - 0x888], ebx
lea edi, [edx + 0x1c]
lea edi, [edi + eax*8]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x406784
test eax, eax
jne 0x406894
jmp 0x40678a
add eax, edx
mov edx, dword [esi + 0x20]
lea ecx, [eax + 4]
sub edx, ecx
push edx
push ecx
push eax
call fcn.004e5d40
add esp, 0xc
add dword [esi + 0x20], 0xfffffffc
jmp 0x4066c2
mov dword [esi], 0
mov ecx, dword [ebp - 0x898]
mov eax, 0x66666667
sub ecx, edx
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 0x87c]
cmp edx, eax
jb 0x4067bf
mov ecx, dword [ebp - 0x884]
inc ecx
mov dword [ebp - 0x884], ecx
jmp 0x40688e
mov eax, dword [edi + 4]
sub eax, dword [edi]
test eax, 0xfffffffc
jne 0x4067d7
inc edx
mov dword [ebp - 0x87c], edx
jmp 0x406885
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0x8a4], 1
lea eax, [ebp - 0x8a4]
mov dword [esi], ebx
push eax
push 0x8004667e
push ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x406e2b
mov eax, dword [ebp - 0x87c]
mov dword [esi + 4], eax
mov eax, dword [edi]
mov dword [esi + 0xc], 0
mov eax, dword [eax]
mov dword [esi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [edi + 4]
mov dword [esi + 0x10], eax
mov eax, dword [edi]
lea edx, [eax + 4]
sub ecx, edx
push ecx
push edx
push eax
call fcn.004e5d40
add dword [edi + 4], 0xfffffffc
add esp, 0xc
mov eax, 2
mov word [ebp - 0x380], ax
push 0x19
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x37e], ax
mov eax, dword [esi + 8]
mov dword [ebp - 0x37c], eax
lea eax, [ebp - 0x380]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
inc dword [ebp - 0x87c]
mov ebx, dword [ebp - 0x888]
mov ecx, dword [ebp - 0x884]
add edi, 0x28
mov edx, dword [ebp - 0x89c]
inc ebx
add esi, 0x14
mov dword [ebp - 0x888], ebx
cmp ebx, 0x20
jb 0x406755
cmp ecx, 0x20
jae 0x406cea
mov dword [ebp - 0x880], 0
lea esi, [ebp - 0x310]
mov edi, dword [esi]
test edi, edi
je 0x406c90
push 0x104
lea eax, [ebp - 0x5e4]
mov dword [ebp - 0x8cc], 0
push 0
push eax
mov dword [ebp - 0x8d0], 0
mov dword [ebp - 0x8cc], 0xc8
call fcn.004e7b30
mov ecx, dword [ebp - 0x5e4]
add esp, 0xc
xor eax, eax
test ecx, ecx
je 0x40691e
nop word [eax + eax]
cmp dword [ebp + eax*4 - 0x5e0], edi
je 0x40691e
inc eax
cmp eax, ecx
jb 0x406910
cmp eax, ecx
jne 0x406934
cmp ecx, 0x40
jae 0x406934
mov dword [ebp + eax*4 - 0x5e0], edi
inc dword [ebp - 0x5e4]
push 0x104
lea eax, [ebp - 0x6e8]
push 0
push eax
call fcn.004e7b30
mov ecx, dword [ebp - 0x6e8]
add esp, 0xc
xor eax, eax
test ecx, ecx
je 0x406964
cmp dword [ebp + eax*4 - 0x6e4], edi
je 0x406964
inc eax
cmp eax, ecx
jb 0x406956
cmp eax, ecx
jne 0x40697a
cmp ecx, 0x40
jae 0x40697a
mov dword [ebp + eax*4 - 0x6e4], edi
inc dword [ebp - 0x6e8]
push 0x104
lea eax, [ebp - 0x4e0]
push 0
push eax
call fcn.004e7b30
mov ecx, dword [ebp - 0x4e0]
add esp, 0xc
xor eax, eax
test ecx, ecx
je 0x4069ae
nop dword [eax]
cmp dword [ebp + eax*4 - 0x4dc], edi
je 0x4069ae
inc eax
cmp eax, ecx
jb 0x4069a0
cmp eax, ecx
jne 0x4069c4
cmp ecx, 0x40
jae 0x4069c4
mov dword [ebp + eax*4 - 0x4dc], edi
inc dword [ebp - 0x4e0]
lea eax, [ebp - 0x8d0]
push eax
lea eax, [ebp - 0x4e0]
push eax
lea eax, [ebp - 0x5e4]
push eax
lea eax, [ebp - 0x6e8]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test ebx, ebx
je 0x406b7d
cmp ebx, 0xffffffff
je 0x406b7d
cmp dword [ebp - 0x5e4], 1
mov ebx, dword [ebp - 0x89c]
jne 0x406a68
cmp dword [ebp - 0x5e0], edi
jne 0x406a68
mov ecx, dword [ebp - 0x898]
lea edi, [esi + 4]
sub ecx, ebx
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [edi], eax
jae 0x406cbc
push edi
lea ecx, [ebp - 0x8bc]
call fcn.00407890
mov eax, dword [edi]
mov edi, dword [esi]
push 2
push edi
lea eax, [eax + eax*4]
lea ecx, [ebx + eax*8]
mov eax, dword [ecx + 0x1c]
mov dword [ecx + 0x20], eax
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
cmp dword [ebp - 0x4e0], 1
jne 0x406c90
mov edi, dword [esi]
cmp dword [ebp - 0x4dc], edi
jne 0x406c90
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x10]
cmp eax, 0x5dc
jbe 0x406c90
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi + 0xc]
inc eax
mov dword [esi], 0
cmp eax, 3
jb 0x406b14
mov eax, dword [esi + 4]
mov dword [esi + 0xc], 0
lea eax, [eax + eax*4]
lea edi, [ebx + eax*8]
mov eax, dword [edi + 0x20]
sub eax, dword [edi + 0x1c]
test eax, 0xfffffffc
jne 0x406af3
mov dword [esi], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 4], 0
jmp 0x406c90
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax]
lea edx, [eax + 4]
mov dword [esi + 8], ecx
mov ecx, dword [edi + 0x20]
sub ecx, edx
push ecx
push edx
push eax
call fcn.004e5d40
add esp, 0xc
add dword [edi + 0x20], 0xfffffffc
jmp 0x406b17
mov dword [esi + 0xc], eax
push 0
push 1
push 2
mov dword [ebp - 0x8a8], 1
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
lea eax, [ebp - 0x8a8]
push eax
push 0x8004667e
push edi
mov dword [esi], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esi + 0xc]
mov eax, 2
mov word [ebp - 0x370], ax
movzx eax, word [ecx*2 + 0x522e5c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x36e], ax
mov eax, dword [esi + 8]
mov dword [ebp - 0x36c], eax
lea eax, [ebp - 0x370]
jmp 0x406c7d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esi + 0x10]
cmp eax, 0x5dc
ja 0x406b96
cmp ebx, 0xffffffff
jne 0x406c90
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi + 0xc]
inc eax
mov dword [esi], 0
cmp eax, 3
jb 0x406c19
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x89c]
mov dword [esi + 0xc], 0
lea eax, [eax + eax*4]
lea edi, [ecx + eax*8]
mov eax, dword [edi + 0x20]
sub eax, dword [edi + 0x1c]
test eax, 0xfffffffc
jne 0x406bf8
mov dword [esi], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 4], 0
jmp 0x406c90
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax]
lea edx, [eax + 4]
mov dword [esi + 8], ecx
mov ecx, dword [edi + 0x20]
sub ecx, edx
push ecx
push edx
push eax
call fcn.004e5d40
add esp, 0xc
add dword [edi + 0x20], 0xfffffffc
jmp 0x406c1c
mov dword [esi + 0xc], eax
push 0
push 1
push 2
mov dword [ebp - 0x8a0], 1
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
lea eax, [ebp - 0x8a0]
push eax
push 0x8004667e
push edi
mov dword [esi], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, dword [esi + 0xc]
mov eax, 2
mov word [ebp - 0x360], ax
movzx eax, word [ecx*2 + 0x522e5c]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x35e], ax
mov eax, dword [esi + 8]
mov dword [ebp - 0x35c], eax
lea eax, [ebp - 0x360]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x10], eax
mov edi, dword [ebp - 0x880]
add esi, 0x14
inc edi
mov dword [ebp - 0x880], edi
cmp edi, 0x20
jb 0x4068c0
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x87c]
jmp 0x406730
lea edi, [ebp - 0x310]
mov ebx, 0x20
mov esi, dword [edi]
test esi, esi
je 0x406cdd
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
add edi, 0x14
sub ebx, 1
jne 0x406cc7
jmp 0x406e6e
mov ecx, dword [ebp - 0x8b8]
xor eax, eax
mov edx, dword [ebp - 0x8bc]
sub ecx, edx
sar ecx, 2
mov dword [ebp - 0x880], eax
mov dword [ebp - 0x8a4], ecx
test ecx, ecx
je 0x406e27
mov ebx, dword [ebp - 0x890]
nop word [eax + eax]
mov eax, dword [edx + eax*4]
lea ecx, [ebp - 0x890]
mov edi, dword [ebp - 0x89c]
add edi, 4
lea eax, [eax + eax*4]
lea edi, [edi + eax*8]
push edi
call fcn.004091a0
mov esi, eax
cmp esi, ebx
je 0x406da5
cmp dword [esi + 0x24], 0x10
lea edx, [esi + 0x10]
lea ecx, [edx + 0x10]
mov dword [ebp - 0x8a0], ecx
jb 0x406d58
mov edx, dword [edx]
cmp dword [edi + 0x14], 0x10
lea eax, [edi + 0x10]
mov dword [ebp - 0x884], eax
jb 0x406d69
mov edi, dword [edi]
mov ebx, dword [ebp - 0x884]
mov ecx, dword [ecx]
mov eax, ecx
cmp dword [ebx], ecx
mov ecx, ebx
cmovb eax, dword [ecx]
mov ecx, edi
push eax
call fcn.00405ee0
mov ebx, dword [ebp - 0x890]
add esp, 4
test eax, eax
jne 0x406da3
mov ecx, dword [ebp - 0x884]
mov edx, dword [ebp - 0x8a0]
mov eax, dword [ecx]
cmp eax, dword [edx]
jb 0x406da5
jmp 0x406da7
jns 0x406da7
mov esi, ebx
cmp esi, ebx
je 0x406e08
mov ecx, dword [esi + 0x2c]
mov eax, 0x92492493
sub ecx, dword [esi + 0x28]
xor ebx, ebx
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x406e02
xor edi, edi
nop word [eax + eax]
mov eax, dword [esi + 0x28]
mov ecx, dword [ebp - 0x8ac]
add eax, edi
push eax
call fcn.00407510
mov ecx, dword [esi + 0x2c]
mov eax, 0x92492493
sub ecx, dword [esi + 0x28]
inc ebx
imul ecx
add edi, 0x1c
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x406dd0
mov ebx, dword [ebp - 0x890]
mov eax, dword [ebp - 0x880]
mov edx, dword [ebp - 0x8bc]
inc eax
mov dword [ebp - 0x880], eax
cmp eax, dword [ebp - 0x8a4]
jb 0x406d20
mov bl, 1
jmp 0x406e70
cmp ebx, 0xffffffff
jne 0x406e44
mov eax, dword [ebp - 0x888]
lea eax, [eax + eax*4]
mov dword [ebp + eax*4 - 0x310], 0
lea edi, [ebp - 0x310]
mov ebx, 0x20
nop
mov esi, dword [edi]
test esi, esi
je 0x406e66
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
add edi, 0x14
sub ebx, 1
jne 0x406e50
xor bl, bl
mov ecx, dword [ebp - 0x8bc]
test ecx, ecx
je 0x406e8c
mov eax, dword [ebp - 0x8b4]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.00408ce0
lea ecx, [ebp - 0x8e0]
call fcn.00407d30
lea ecx, [ebp - 0x89c]
call fcn.00407d30
mov ecx, dword [ebp - 0x890]
lea eax, [ebp - 0x8e4]
push ecx
push dword [ecx]
lea ecx, [ebp - 0x890]
push eax
call fcn.004082c0
push dword [ebp - 0x890]
call fcn.0044dc00
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004ce564
mov esp, ebp
pop ebp
ret 8