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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
mov edi, dword [ebp + 0x2c]
mov esi, ecx
mov ecx, edi
mov dword [ebp - 0x14], esi
call fcn.004a71c0
mov eax, dword [ebp + 0x1c]
mov byte [eax], 0
cmp byte [esi + 0x12], 0
je 0x515a7f
mov ecx, dword [ebp + 0x30]
mov edx, dword [ecx]
mov eax, dword [str.Another_thread_is_closing_this_socket.]
mov edx, dword [edx + 0x14]
push eax
call edx
mov byte [edi + 0x12], 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x2c
push ebx
mov ebx, dword [ebp + 0x14]
lea ecx, [esi + 0x1e4]
push ebx
call fcn.00413a50
lea ecx, [esi + 0x1e4]
call fcn.0040fb90
mov ecx, dword [ebp + 0x20]
xor eax, eax
mov dword [ecx], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 8], eax
test ecx, ecx
je 0x515ad0
cmp dword [edi + 4], 0
je 0x515ad0
mov edx, dword [ebp + 0x30]
push edx
call fcn.004a6a40
jmp 0x515ad0
push ebx
lea ecx, [esi + 0x1e4]
mov dword [ebp - 4], ebx
call fcn.00414050
mov ecx, dword [ebp + 0x28]
mov ebx, eax
mov eax, dword [ebp + 0x30]
push eax
push edi
push ecx
push 0
lea edx, [ebp - 4]
push edx
push ebx
mov ecx, esi
call fcn.005156f0
test al, al
je 0x515c3f
mov esi, dword [ebp - 4]
test esi, esi
je 0x515c3f
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x18]
xor edi, edi
add dword [eax], esi
adc dword [eax + 4], edi
test ecx, ecx
je 0x515b31
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 4]
test eax, eax
je 0x515b31
mov edx, dword [ebp + 0x30]
push edx
push eax
push esi
call fcn.004a6c80
mov eax, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x2c]
push eax
push ecx
mov ecx, dword [ebp + 8]
push esi
push ebx
call fcn.004a8d70
test al, al
je 0x515c12
add dword [ebp - 0x24], esi
adc dword [ebp - 0x20], edi
add dword [ebp - 0x1c], esi
adc dword [ebp - 0x18], edi
call sub.KERNEL32.dll_GetTickCount
mov ecx, dword [ebp - 8]
cmp eax, ecx
jbe 0x515ba0
fild qword [ebp - 0x1c]
sub eax, ecx
mov dword [ebp - 0xc], eax
fild dword [ebp - 0xc]
jns 0x515b76
fadd qword [0x79c748]
fdivp st(1)
fmul qword [0x7b00d0]
fnstcw word [ebp - 2]
movzx eax, word [ebp - 2]
or eax, 0xc00
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x20]
fldcw word [ebp - 0xc]
fistp qword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
fldcw word [ebp - 2]
jmp 0x515bad
jae 0x515bad
mov dword [ebp - 8], eax
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov esi, dword [ebp + 0x30]
mov edi, dword [ebp + 0x2c]
push esi
mov ecx, edi
call fcn.004a71f0
test al, al
je 0x515be6
mov byte [edi + 0x11], 1
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.socket_read_aborted_by_application_callback
mov ecx, esi
call eax
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x515be6
mov eax, dword [edi + 4]
test eax, eax
je 0x515be6
push esi
push eax
call fcn.004a6ef0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov edx, ecx
or edx, eax
je 0x515bfe
cmp dword [ebp - 0x20], eax
jg 0x515c3c
jl 0x515bfe
cmp dword [ebp - 0x24], ecx
jae 0x515c3c
cmp byte [edi + 0x11], 0
jne 0x515c3c
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp + 0x2c]
mov ebx, dword [ebp + 0x14]
jmp 0x515ad0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x515c2d
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 4]
test eax, eax
je 0x515c2d
mov edx, dword [ebp + 0x30]
push edx
push eax
call fcn.004a6ef0
mov eax, dword [ebp + 0x1c]
pop ebx
pop edi
mov byte [eax], 1
pop esi
mov esp, ebp
pop ebp
ret 0x2c
mov edi, dword [ebp + 0x2c]
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x515c57
mov edi, dword [edi + 4]
test edi, edi
je 0x515c57
mov edx, dword [ebp + 0x30]
push edx
push edi
call fcn.004a6ef0
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x2c