Function at 0x419a30
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0xd9f8], 0
push esi
push edi
mov dword [ebx + 0xd9d4], 0
jne 0x419d61
lea esi, [ebx + 0xd968]
call fcn.0042ce80
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419a6f
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebx + 0x10]
mov dword [ebp - 8], eax
mov dword [ebx + 0xd96c], eax
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419a8c
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx + 0xd968]
mov esi, dword [ebx + 0x28c0]
test eax, eax
je 0x419aa3
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
je 0x419ab0
or dword [ebx + 0xd980], 1
jmp 0x419ab7
and dword [ebx + 0xd980], 0xfffffffe
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419ac8
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 8]
push eax
lea esi, [ebx + 0x28b8]
call fcn.0042e9c0
mov esi, eax
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419aea
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebx + 0xd970], esi
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419b01
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx + 0xd968]
mov esi, dword [ebx + 0x1870]
test eax, eax
je 0x419b18
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
js 0x419b22
mov dword [ebx + 0xd984], esi
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419b33
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx + 0xd968]
mov esi, dword [ebx + 0x1874]
test eax, eax
je 0x419b4a
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
js 0x419b54
mov dword [ebx + 0xd988], esi
mov eax, dword [ebx + 0xd968]
test eax, eax
je 0x419b65
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0x1898], 1
jg 0x419b7a
call dword [sym.imp.MSVCR100.dll_rand]
mov dword [ebx + 0x38e0], eax
mov ecx, dword [ebx + 0x38d4]
sub ecx, dword [ebx + 0x38d0]
mov eax, dword [ebx + 0x38e0]
xor edx, edx
sar ecx, 4
div ecx
lea esi, [ebx + 0xd968]
mov dword [ebx + 0x38e0], edx
shl edx, 4
add edx, dword [ebx + 0x38d0]
mov ecx, edx
call fcn.0042ced0
mov dword [ebp - 0x10], eax
test eax, eax
mov eax, dword [ebx + 0x38e0]
je 0x419c6f
shl eax, 4
add eax, dword [ebx + 0x38d0]
movzx edx, word [eax + 2]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
mov eax, dword [ebx + 0x38e0]
shl eax, 4
add eax, dword [ebx + 0x38d0]
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
lea esi, [ebx + 0xd9fc]
push 0x112a6
push str.ERROR__d:
mov dword [ebp + 8], eax
mov dword [esi + 0x114], 1
mov dword [esi + 0x118], 0x112a6
call fcn.00506600
add esp, 8
push str.unable_to_connect
mov eax, esi
mov byte [esi + 0x11c], 0
call fcn.00506660
mov ecx, dword [ebp + 8]
push edi
push ecx
push 0x5ca064
mov edi, str.end_point
mov ecx, esi
call fcn.00506890
mov edi, dword [ebp - 0x10]
add esp, 0xc
mov ecx, eax
call fcn.005067d0
mov esi, dword [ebx + 0x1898]
cmp esi, 3
jne 0x419d32
inc dword [ebx + 0x38e0]
jmp 0x419d32
shl eax, 4
add eax, dword [ebx + 0x38d0]
movzx edx, word [eax + 2]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov eax, dword [ebx + 0x38e0]
shl eax, 4
add eax, dword [ebx + 0x38d0]
push ecx
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, dword [ebp - 8]
push eax
push str.connected_to___s:_d_
add ebx, 0x43c
mov ecx, 1
call fcn.0042b270
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [esi + 0xd9f8], 1
mov dword [esi + 0x28a0], eax
mov dword [esi + 0x28a4], eax
mov dword [esi + 0x28a8], eax
add esp, 0xc
mov dword [esi + 0x28ac], eax
lea ecx, [ebp - 0x14]
mov dword [esi + 0x28b0], eax
push ecx
mov dword [esi + 0x28b4], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x419d01
xor ecx, ecx
jmp 0x419d07
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xd9f0], ecx
mov dword [esi + 0xd9f4], eax
mov esi, dword [esi + 0x1898]
cmp esi, 3
jne 0x419d2f
mov edx, dword [ebp + 8]
mov dword [edx + 0x38e0], 0
mov ebx, edx
jmp 0x419d32
mov ebx, dword [ebp + 8]
cmp esi, 2
jne 0x419d3d
inc dword [ebx + 0x38e0]
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x419d4f
xor ecx, ecx
jmp 0x419d55
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0xd9e8], ecx
mov dword [ebx + 0xd9ec], eax
mov eax, dword [ebx + 0x390c]
lea esi, [ebx + 0x3904]
call fcn.00505ae0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4