Function at 0x509f14
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x50a305
push dword fs:[eax]
mov dword fs:[eax], esp
xor ecx, ecx
push ebp
push 0x50a2b8
push dword fs:[ecx]
mov dword fs:[ecx], esp
call fcn.0040d640
add esp, 0xfffffff8
fstp qword [esp]
wait
lea ecx, [ebp - 0xa]
lea edx, [ebp - 8]
lea eax, [ebp - 6]
call fcn.0040d598
push dword [esi + 0x23c]
push dword [esi + 0x238]
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x16]
lea eax, [ebp - 0x14]
call fcn.0040d598
movzx eax, word [ebp - 6]
cmp ax, word [ebp - 0x14]
jne 0x509f9b
movzx eax, word [ebp - 8]
cmp ax, word [ebp - 0x16]
jne 0x509f9b
movzx eax, word [ebp - 0xa]
cmp ax, word [ebp - 0x18]
je 0x509fb3
xor eax, eax
mov dword [esi + 0x244], eax
call fcn.0040d640
fstp qword [esi + 0x238]
wait
mov byte [esi + 0x40], 0
cmp byte [esi + 0x40], 0
jne 0x50a108
cmp byte [esi + 0x41], 0
jne 0x50a108
call fcn.0040d60c
add esp, 0xfffffff8
fstp qword [esp]
wait
lea eax, [ebp - 0x12]
push eax
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0xe]
lea eax, [ebp - 0xc]
call fcn.0040d2b8
movzx eax, word [ebp - 0xc]
mov edx, dword [setsockopt]
cmp eax, dword [edx + 0x1a14]
jne 0x50a108
mov byte [esi + 0x40], 1
mov eax, dword [esi + 0x50]
mov ebx, dword [eax + 8]
dec ebx
cmp ebx, 0
jl 0x50a09e
mov eax, dword [esi + 0x50]
cmp dword [eax + 8], 0
jle 0x50a09e
mov edx, ebx
call fcn.0041fbfc
mov edi, eax
push dword [edi + 4]
push dword [edi]
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x16]
lea eax, [ebp - 0x14]
call fcn.0040d598
movzx eax, word [ebp - 6]
cmp ax, word [ebp - 0x14]
jne 0x50a094
movzx eax, word [ebp - 8]
cmp ax, word [ebp - 0x16]
jne 0x50a094
movzx eax, word [ebp - 0xa]
cmp ax, word [ebp - 0x18]
jne 0x50a094
mov byte [esi + 0x41], 1
mov byte [esi + 0x42], 0
call fcn.0040d640
fstp qword [esi + 0x38]
wait
call sub.kernel32.dll_GetTickCount_1
mov dword [esi + 0x44], eax
call sub.kernel32.dll_GetTickCount_1
mov dword [esi + 0x48], eax
mov eax, dword [edi + 0xc]
mov dword [eax + 0x34], esi
mov edx, dword [0x507968]
mov eax, edi
call fcn.00406490
mov eax, dword [esi + 0x50]
mov edx, ebx
call fcn.0041faa0
dec ebx
cmp ebx, 0xffffffff
jne 0x50a00f
cmp byte [esi + 0x41], 0
je 0x50a108
mov eax, dword [esi + 0x20]
test eax, eax
je 0x50a0ae
mov dword [eax + 0x34], esi
mov eax, esi
call fcn.0050a510
mov eax, esi
call fcn.00509d04
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0x1c]
mov eax, 0x509efc
call fcn.004078c4
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0xb
lea edx, [ebp - 0x24]
xor ecx, ecx
pop eax
call fcn.0040bb24
mov eax, dword [0x6c0ec4]
mov eax, dword [eax]
mov cl, 2
mov edx, dword [ebp - 4]
call fcn.005c3938
mov eax, dword [ebp - 4]
call fcn.00641540
mov dl, 1
mov eax, esi
call fcn.0050b0bc
xor ebx, ebx
lea edx, [ebx + ebx*2]
mov eax, dword [esi + edx*8 + 0xcc]
test eax, eax
je 0x50a12a
cmp byte [eax + 0x2e4], 0
je 0x50a12a
xor eax, eax
mov dword [esi + edx*8 + 0xcc], eax
inc ebx
cmp ebx, 4
jne 0x50a10a
xor ebx, ebx
lea edx, [ebx + ebx*2]
mov eax, dword [esi + edx*8 + 0x12c]
test eax, eax
je 0x50a152
cmp byte [eax + 0x2e4], 0
je 0x50a152
xor eax, eax
mov dword [esi + edx*8 + 0x12c], eax
inc ebx
cmp ebx, 0xc
jne 0x50a132
cmp byte [esi + 0x41], 0
je 0x50a27b
mov eax, dword [esi + 0x84]
test eax, eax
je 0x50a173
mov byte [eax + 0x31a], 0
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x50a184
mov byte [eax + 0x31a], 0
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x50a195
mov byte [eax + 0x31a], 0
cmp byte [esi + 0x42], 0
jne 0x50a228
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [esi + 0x44]
mov edx, dword [setsockopt]
mov edx, dword [edx + 0x1a1c]
mov ecx, dword [setsockopt]
sub edx, dword [ecx + 0x1a18]
cmp eax, edx
jbe 0x50a228
mov byte [esi + 0x42], 1
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0x28]
mov eax, 0x509f04
call fcn.004078c4
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x34], 0xb
mov eax, dword [setsockopt]
mov eax, dword [eax + 0x1a18]
mov ecx, 0xea60
xor edx, edx
div ecx
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0
lea edx, [ebp - 0x38]
mov ecx, 1
pop eax
call fcn.0040bb24
mov eax, dword [0x6c0ec4]
mov eax, dword [eax]
mov cl, 2
mov edx, dword [ebp - 4]
call fcn.005c3938
mov eax, dword [ebp - 4]
call fcn.00641540
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [esi + 0x44]
mov edx, dword [setsockopt]
cmp eax, dword [edx + 0x1a20]
jbe 0x50a25c
call sub.kernel32.dll_GetTickCount_1
cmp eax, dword [esi + 0x48]
jbe 0x50a25c
call sub.kernel32.dll_GetTickCount_1
add eax, 0x3e8
mov dword [esi + 0x48], eax
mov eax, esi
call fcn.0050aa94
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [esi + 0x44]
mov edx, dword [setsockopt]
cmp eax, dword [edx + 0x1a1c]
jbe 0x50a2ae
mov eax, esi
call fcn.0050a8bc
jmp 0x50a2ae
mov eax, dword [esi + 0x84]
test eax, eax
je 0x50a28c
mov byte [eax + 0x31a], 1
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x50a29d
mov byte [eax + 0x31a], 1
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x50a2ae
mov byte [eax + 0x31a], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x50a2d7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50a30c
lea eax, [ebp - 0x3c]
call fcn.00405394
lea eax, [ebp - 0x28]
call fcn.00405394
lea eax, [ebp - 0x1c]
call fcn.00405394
lea eax, [ebp - 4]
call fcn.00405394
ret