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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55d726
mov eax, dword fs:[0]
push eax
mov eax, 0x1014c
call fcn.00537af0
mov eax, dword [0x5b5be8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1014c], eax
xor eax, eax
mov dword [ebp - 0x10158], eax
mov dword [ebp - 0x10138], eax
mov byte [ebp - 0x10148], al
lea edi, [eax + 6]
mov eax, str.QUERY
lea esi, [ebp - 0x10148]
mov dword [ebp - 0x10154], ecx
mov dword [ebp - 0x10150], edx
mov dword [ebp - 0x10134], 0xf
call fcn.00409b10
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10150]
push eax
push ecx
xor edi, edi
push str._s__d_n
mov eax, 0x100
lea edx, [ebp - 0x110]
mov dword [ebp - 4], edi
call fcn.00422400
lea eax, [ebp - 0x110]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40db88
sub eax, esi
push eax
lea eax, [ebp - 0x110]
lea ecx, [ebp - 0x10148]
call fcn.0040a0b0
push 1
mov eax, 0x58d71c
lea ecx, [ebp - 0x10148]
call fcn.0040a0b0
cmp dword [ebp - 0x10134], 0x10
mov eax, dword [ebp - 0x10148]
jae 0x40dbca
lea eax, [ebp - 0x10148]
mov ecx, dword [ebp - 0x1014c]
mov esi, dword [ebp - 0x10138]
mov edx, dword [ecx + 0x18]
add ecx, 0x18
push esi
push eax
mov eax, dword [edx + 8]
call eax
mov dword [ebp - 0x10118], 0xf
mov dword [ebp - 0x1011c], edi
mov byte [ebp - 0x1012c], 0
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp - 0x10154]
mov cl, byte [esi + 0xa4]
mov edi, eax
test cl, cl
jne 0x40dcea
lea ebx, [ebx]
mov ecx, dword [ebp - 0x1014c]
call fcn.00421920
test al, al
je 0x40dcc1
mov ecx, dword [ebp - 0x1014c]
mov edx, dword [ecx + 0x18]
mov edx, dword [edx + 4]
add ecx, 0x18
push 0xffff
lea eax, [ebp - 0x10110]
push eax
call edx
cmp eax, 1
jl 0x40dd6a
cmp eax, 0xffff
ja 0x40dd6a
mov byte [ebp + eax - 0x10110], 0
lea eax, [ebp - 0x10110]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40dc75
sub eax, edx
push eax
lea eax, [ebp - 0x10110]
lea ecx, [ebp - 0x1012c]
call fcn.0040a0b0
cmp dword [ebp - 0x10118], 0x10
mov eax, dword [ebp - 0x1012c]
jae 0x40dca5
lea eax, [ebp - 0x1012c]
push 0x58d7f4
push eax
call fcn.00532ce0
add esp, 8
test eax, eax
jne 0x40dcfd
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
jmp 0x40dcdc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, edi
cmp eax, 0xea60
ja 0x40ddf9
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [esi + 0xa4]
test al, al
je 0x40dc20
push str._tUser_Cancel.
push 2
mov eax, esi
call fcn.00401690
jmp 0x40de1b
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], 0
lea edi, [ebp - 0x1012c]
mov esi, ebx
mov byte [ebx], 0
call fcn.00409930
mov esi, 0x10
cmp dword [ebp - 0x10118], esi
jb 0x40dd37
mov eax, dword [ebp - 0x1012c]
push eax
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x10118], 0xf
mov dword [ebp - 0x1011c], 0
mov byte [ebp - 0x1012c], 0
cmp dword [ebp - 0x10134], esi
jb 0x40de87
mov ecx, dword [ebp - 0x10148]
push ecx
jmp 0x40de7f
push str.Disconnect_Server.
push 3
mov eax, esi
call fcn.00401690
mov dword [esi + 0xa8], 3
mov dword [esi + 0xa0], 0xb
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], 0
add esp, 8
xor edi, edi
mov eax, 0x58bd25
mov esi, ebx
mov byte [ebx], 0
call fcn.00409b10
mov esi, 0x10
cmp dword [ebp - 0x10118], esi
jb 0x40ddca
mov edx, dword [ebp - 0x1012c]
push edx
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x10118], 0xf
mov dword [ebp - 0x1011c], edi
mov byte [ebp - 0x1012c], 0
cmp dword [ebp - 0x10134], esi
jb 0x40de87
mov eax, dword [ebp - 0x10148]
push eax
jmp 0x40de7f
push str.Connection_Timeout.
push 3
mov eax, esi
call fcn.00401690
mov dword [esi + 0xa8], 2
mov dword [esi + 0xa0], 0xb
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], 0
add esp, 8
xor edi, edi
mov eax, 0x58bd25
mov esi, ebx
mov byte [ebx], 0
call fcn.00409b10
mov esi, 0x10
cmp dword [ebp - 0x10118], esi
jb 0x40de59
mov ecx, dword [ebp - 0x1012c]
push ecx
call fcn.004310e1
add esp, 4
mov byte [ebp - 0x1012c], 0
mov dword [ebp - 0x1011c], edi
mov dword [ebp - 0x10118], 0xf
cmp dword [ebp - 0x10134], esi
jb 0x40de87
mov edx, dword [ebp - 0x10148]
push edx
call fcn.004310e1
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005320a3
mov esp, ebp
pop ebp
ret