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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x439388
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
cmp ecx, 0xffffffff
push edi
jne 0x40a642
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x40a642
cmp dword [esi + 0x40], 0x9c4
jne 0x40a642
mov edi, dword [esp + 0x94]
mov eax, edi
sar eax, 1
mov dword [esi + 0x3c], eax
lea eax, [edi + eax*4]
mov dword [esi + 0x38], edi
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edi
jmp 0x40a673
mov edi, dword [esp + 0x94]
mov eax, edi
sub eax, ecx
mov edx, eax
sar edx, 3
add edx, ecx
test eax, eax
mov dword [esi + 0x38], edx
jge 0x40a65d
neg eax
mov ecx, dword [esi + 0x3c]
sub eax, ecx
sar eax, 2
add eax, ecx
mov ecx, dword [esi + 0x38]
lea edx, [ecx + eax*4]
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edx
mov eax, dword [esi + 0x40]
cmp eax, 0x3e8
jge 0x40a686
mov dword [esi + 0x40], 0x3e8
jmp 0x40a694
cmp eax, 0x7530
jle 0x40a694
mov dword [esi + 0x40], 0x7530
call sub.KERNEL32.dll_GetTickCount
mov ebp, dword [sym.imp.KwLogSvr.dll_void___cdecl_YL_Log_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___int__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
mov ecx, eax
mov eax, dword [esi + 0x44]
lea edx, [eax + 0x32]
cmp edi, edx
mov dword [esp + 0x10], ecx
jle 0x40a78a
mov edx, eax
sar edx, 3
add edx, eax
cmp edi, edx
jle 0x40a78a
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x40a6d6
add eax, 0x3e8
cmp ecx, eax
jbe 0x40a8bd
push str.CSFSocket
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [str.KTNet.txt]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x90], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [esi + 0xc8]
push ecx
push str.CSFSocket::calculateRTT__ruid:_u_
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x20]
push 0
mov ebx, 1
push eax
mov byte [esp + 0xa0], bl
call ebp
add esp, 0x14
lea ecx, [esp + 0x14]
mov byte [esp + 0x8c], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x30]
mov dword [esp + 0x8c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esi + 0x50]
test eax, eax
jne 0x40a75c
mov dword [esi + 0x50], ebx
jmp 0x40a762
lea ecx, [eax + eax]
mov dword [esi + 0x50], ecx
mov ecx, dword [esi + 0x50]
mov eax, 0x64
cmp ecx, eax
jle 0x40a771
mov dword [esi + 0x50], eax
fild dword [esi + 0x50]
mov al, byte [esi + 0x48]
test al, al
fstp qword [esi + 0x58]
je 0x40a782
mov byte [esi + 0x48], 0
mov dword [esi + 0x44], edi
jmp 0x40a8b6
cmp edi, eax
jge 0x40a791
mov dword [esi + 0x44], edi
mov al, byte [esi + 0x48]
test al, al
lea ecx, [esp + 0x14]
push str.CSFSocket
je 0x40a829
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [str.KTNet.txt]
mov ebx, 2
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x90], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [esi + 0xc8]
push ecx
push 0x43e2f0
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x3c]
push 0
push eax
mov byte [esp + 0xa0], 3
call ebp
add esp, 0x14
lea ecx, [esp + 0x30]
mov byte [esp + 0x8c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x8c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
fld qword [esi + 0x58]
fmul qword [0x43e2e8]
fld qword [esi + 0x58]
fadd qword [0x43e2e8]
jmp 0x40a8a9
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [str.KTNet.txt]
push ecx
mov ebx, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x90], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov edx, dword [esi + 0xc8]
push edx
push 0x43e2d0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x3c]
push 0
push ecx
mov byte [esp + 0xa0], 5
call ebp
add esp, 0x14
lea ecx, [esp + 0x30]
mov byte [esp + 0x8c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x14]
mov dword [esp + 0x8c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
fld qword [esi + 0x58]
fmul qword [0x43e2c8]
fld qword [esi + 0x58]
fadd qword [0x43e2c8]
fdivp st(1)
fst qword [esi + 0x58]
call fcn.00437e78
mov dword [esi + 0x50], eax
mov edx, dword [esp + 0x10]
mov dword [esi + 0x4c], edx
push str.CSFSocket
lea ecx, [esp + 0x6c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov eax, dword [str.KTNet.txt]
mov ebx, 6
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x90], ebx
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
mov ecx, dword [esi + 0x50]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
push ecx
mov ecx, dword [esi + 0x3c]
push edx
mov edx, dword [esi + 0x38]
push eax
mov eax, dword [esi + 0xc8]
push ecx
push edx
push edi
push eax
push str.ruid:_u__curRTT:_d__m_srtt:_d__m_rttvar:_d__m_RTO:_d__m_lastsrtt:_u__m_STP:_u
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x70]
push 0
push edx
mov byte [esp + 0xb8], 7
call ebp
add esp, 0x2c
lea ecx, [esp + 0x4c]
mov byte [esp + 0x8c], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x68]
mov dword [esp + 0x8c], 0xffffffff
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x80
ret 4