Function at 0x408270
Capabilities:
Check for time delay via queryperformancecounter
Read file on windows
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
movsd xmm2, qword [ebp + 0x10]
xorps xmm1, xmm1
comisd xmm2, xmm1
push ebx
mov ebx, edx
mov edx, ecx
mov ecx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
jbe 0x408348
xorps xmm0, xmm0
movups xmmword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x40], xmm0
movsd xmm0, qword [0x456938]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x4082f6
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.00443fa0
movsd xmm1, qword [0x451a20]
divsd xmm1, xmm0
ucomisd xmm1, qword [0x4519e8]
movsd qword [0x456938], xmm1
lahf
test ah, 0x44
jnp 0x408342
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.00443fa0
mulsd xmm0, qword [0x456938]
movsd qword [ebp - 0x10], xmm0
call fcn.00443ef0
mov ecx, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
call fcn.00444000
movsd xmm1, qword [ebp - 0x10]
subsd xmm1, xmm0
mulsd xmm1, qword [0x451a30]
cvttsd2si eax, xmm1
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp + 0xc]
test edx, edx
je 0x408365
push edi
push ecx
push edx
call fcn.0042dbee
add esp, 4
push eax
call fcn.0042b88e
add esp, 0xc
jmp 0x4083bf
mov eax, dword [ebx + 0x274]
test eax, eax
je 0x4083af
push edi
push ecx
push eax
call dword [0x454af4]
mov esi, eax
add esp, 0xc
test esi, esi
jg 0x4083cf
push esi
push dword [ebx + 0x274]
call dword [0x454b04]
add esp, 8
cmp eax, 5
jne 0x40839b
cmp esi, 0xffffffff
je 0x4083c5
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
push 0
push edi
push ecx
push dword [ebx + 0x27c]
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jns 0x4083cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
jmp 0x4083d1
xor ecx, ecx
mov eax, dword [ebx + 0x270]
cmp dword [eax], 0
jne 0x40839b
test esi, esi
jg 0x408531
je 0x408529
jns 0x4083fc
cmp ecx, 0x2733
je 0x40839b
cmp ecx, 0x274c
jne 0x40839b
movsd xmm0, qword [ebp + 0x10]
xorps xmm1, xmm1
comisd xmm0, xmm1
jbe 0x4084b0
xorps xmm0, xmm0
movups xmmword [ebp - 0x30], xmm0
movsd xmm0, qword [0x456938]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jp 0x40845e
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.00443fa0
movsd xmm1, qword [0x451a20]
divsd xmm1, xmm0
ucomisd xmm1, qword [0x4519e8]
movsd qword [0x456938], xmm1
lahf
test ah, 0x44
jnp 0x4084b0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
call fcn.00443fa0
mulsd xmm0, qword [0x456938]
movsd qword [ebp - 0x20], xmm0
call fcn.00443ef0
mov esi, eax
mov edi, edx
mov ecx, esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], edi
call fcn.00444000
movsd xmm1, qword [ebp - 0x20]
subsd xmm1, xmm0
mulsd xmm1, qword [0x451a30]
cvttsd2si eax, xmm1
mov dword [ebp - 0x28], eax
jmp 0x4084b9
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x14]
xorps xmm0, xmm0
comisd xmm0, xmmword [ebp + 0x10]
mov edx, dword [ebp - 0x18]
jae 0x408348
sub eax, dword [ebp - 0x38]
sub esi, dword [ebp - 0x40]
mov ecx, esi
sbb edi, dword [ebp - 0x3c]
movd xmm0, eax
mov edx, edi
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x451a00]
movsd qword [ebp - 0x20], xmm0
call fcn.00444000
movsd xmm1, qword [ebp - 0x20]
mov edi, dword [ebp + 0xc]
addsd xmm1, xmm0
movsd xmm0, qword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
comisd xmm0, xmm1
jae 0x40834b
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x40839b
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret