Function at 0x545060
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket

Disassembly:
push 0xffffffffffffffff
push 0x5aa6e6
mov eax, dword fs:[0]
push eax
sub esp, 0x804
mov eax, dword [0x6336a0]
xor eax, esp
mov dword [esp + 0x800], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6336a0]
xor eax, esp
push eax
lea eax, [esp + 0x818]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x828]
mov eax, dword [esp + 0x82c]
mov ebx, ecx
mov edi, dword [ebx + 0x28]
mov esi, dword [edi + 0x890]
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x60], eax
xor eax, eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebx + 0x2c], 0
mov dword [esp + 0x50], eax
jne 0x545701
jmp 0x54510d
mov ebp, dword [esp + 0x828]
mov edi, dword [esp + 0x24]
mov ebx, eax
cmp dword [esi + 0x68], 0
jne 0x54570e
add ebx, 0x48
push ebx
mov eax, 1
lea edx, [esp + 0x68]
push edx
mov dword [esp + 0x174], eax
mov dword [esp + 0x6c], eax
push 0
lea eax, [esp + 0x178]
push eax
push 0
mov dword [esp + 0x184], ebp
mov dword [esp + 0x7c], ebp
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x54573b
test eax, eax
jne 0x545283
cmp dword [esi + 0x3c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
jle 0x545177
call ebx
sub eax, dword [esi + 0x74]
cmp eax, dword [esi + 0x3c]
jae 0x54571b
call ebx
mov ecx, dword [edi + 0x34]
sub eax, dword [esp + 0x50]
imul ecx, ecx, 0x3e8
cmp eax, ecx
jb 0x545194
cmp dword [edi + 0x68], 0
je 0x54571b
cmp dword [edi + 0x1c], 1
jne 0x5451cc
cmp dword [edi + 0x884], 0xa
jge 0x5451cc
cmp dword [edi + 0x20], 0
jle 0x5451cc
call ebx
sub eax, dword [edi + 0x20]
cmp eax, 0x1388
jb 0x5451cc
cmp dword [esi + 0x64], 0
jle 0x5451cc
mov edx, dword [esi + 0x100]
cmp edx, 1
jle 0x54526e
jmp 0x545220
cmp dword [edi + 0x1c], 2
jne 0x5456f3
mov edx, dword [esp + 0x24]
cmp dword [edx + 0x884], 0xa
jge 0x5456f3
mov eax, edx
cmp dword [eax + 0x20], 0
jle 0x5456f3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
sub eax, dword [ecx + 0x20]
cmp eax, 0x1388
jb 0x5456f3
cmp dword [esi + 0x64], 0
jle 0x5456f3
mov edx, dword [esi + 0x100]
cmp edx, 1
jle 0x54526a
mov ecx, dword [esi + 0xfc]
lea eax, [ecx - 1]
test eax, eax
jge 0x545232
mov eax, 9
cmp edx, 0xa
jge 0x545239
xor ecx, ecx
mov edi, dword [esi + eax*4 + 0xd4]
mov eax, dword [esi + eax*4 + 0xac]
sub eax, dword [esi + ecx*4 + 0xac]
sub edi, dword [esi + ecx*4 + 0xd4]
imul eax, eax, 0x3e8
xor edx, edx
div edi
cmp eax, 0x4e20
jge 0x5456f3
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov dword [edi + 0x18], 0xa
call fcn.00545e60
jmp 0x5456f3
lea edx, [esp + 0x64]
push edx
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x54573b
lea eax, [esp + 0x16c]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5456f3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esp + 0x24]
cmp dword [ecx + 0x20], 0
mov dword [esp + 0x50], eax
jne 0x5452c3
mov dword [ecx + 0x20], eax
push 0x5a0
lea ecx, [esp + 0x278]
push 0
push ecx
call fcn.0057bb20
mov eax, dword [esp + 0x834]
add esp, 0xc
push 0
push 0x5a0
lea edx, [esp + 0x27c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
mov dword [esp + 0x38], eax
je 0x545728
cmp eax, 0xffffffff
je 0x545735
test eax, eax
jle 0x5456f3
xor edi, edi
cmp dword [esp + 0x4c], edi
lea ecx, [esp + 0x274]
mov ebx, eax
mov dword [esp + 0x48], ecx
mov ebp, ebx
jne 0x545663
or ebp, 0xffffffff
mov dword [esp + 0x4c], 1
mov dword [esp + 0x30], ebp
call fcn.00555692
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
je 0x545748
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x820], edi
call fcn.00555692
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
je 0x545748
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x6c]
push edx
mov byte [esp + 0x834], 1
push ebx
lea edx, [esp + 0x34]
lea ecx, [esp + 0x28c]
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
call fcn.00547480
add esp, 0x18
cmp eax, 1
jne 0x545817
mov eax, dword [esp + 0x5c]
mov edi, dword [esp + 0x34]
mov ebp, ebx
lea ecx, [esp + eax + 0x274]
sub ebp, eax
cmp edi, 0x12d
mov dword [esp + 0x48], ecx
jb 0x5453fe
cmp edi, 0x12e
jbe 0x545752
cmp edi, 0xc8
je 0x54548c
cmp edi, 0xce
je 0x545521
cmp edi, 0x197
jne 0x5457c1
mov ecx, dword [esp + 0x30]
test ecx, ecx
jl 0x545430
add eax, ecx
mov dword [esp + 0x3c], eax
mov byte [esp + 0x820], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x545458
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x820], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x545667
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x545667
mov edi, dword [esp + 0x2c]
mov edx, dword [edi + 0x3c]
add edx, dword [edi + 0x40]
jne 0x5454a2
cmp dword [esi + 0x5c], 0xffffffff
je 0x54552d
mov eax, dword [esp + 0x24]
mov dword [eax + 0x68], 1
mov ecx, dword [edi + 0x3c]
add ecx, dword [edi + 0x40]
je 0x54552d
mov eax, dword [edi + 0x40]
add eax, dword [edi + 0x3c]
call fcn.00543320
mov byte [esp + 0x820], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov esi, 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5454ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x820], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x545880
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x545880
cmp edi, 0x197
je 0x545422
mov edx, dword [esi + 0x50]
cmp dword [edx - 0xc], 0
lea edi, [esi + 0x50]
jne 0x54556a
mov eax, dword [esp + 0x1c]
cmp dword [eax - 0xc], 0
je 0x54556a
lea ecx, [esp + 0x1c]
push ecx
mov ecx, edi
call fcn.00402330
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x54556a
mov edi, dword [edi]
push edi
push esi
push 0x4cd
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov edi, dword [esp + 0x30]
test edi, edi
jl 0x5455a4
mov eax, dword [esi + 0x64]
test eax, eax
jl 0x54558a
cmp eax, edi
je 0x5455aa
mov dword [esp + 0x18], 3
jmp 0x545775
mov eax, dword [esp + 0x28]
push edi
push esi
mov dword [esi + 0x64], edi
mov ecx, dword [eax + 0x64]
push 0x4cc
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x5455aa
cmp dword [esi + 0x64], 0
jge 0x54557d
mov ebx, dword [esp + 0x58]
test ebx, ebx
jl 0x54560b
mov edx, dword [esp + 0x54]
jg 0x5455bc
test edx, edx
jbe 0x54560b
mov ecx, dword [esi + 0x84]
test ecx, ecx
mov eax, dword [esi + 0x80]
jl 0x5455ff
jg 0x5455d2
test eax, eax
jbe 0x5455ff
cmp dword [esi + 0x40], 0
je 0x54560b
cmp eax, edx
jne 0x5455e0
cmp ecx, ebx
je 0x54560b
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 3
call fcn.00401f20
lea ecx, [esp + 0x1c]
call fcn.00401f20
jmp 0x545862
mov dword [esi + 0x80], edx
mov dword [esi + 0x84], ebx
lea edx, [esp + 0x30]
push edx
push esi
mov dword [esp + 0x38], 0
call fcn.00542e10
test eax, eax
je 0x545775
test edi, edi
jle 0x54564b
mov eax, dword [esp + 0x24]
mov ecx, 1
cmp dword [eax + 0x18], ecx
jle 0x54564b
cmp dword [eax + 0x884], ecx
jne 0x54564b
mov ebx, dword [esp + 0x28]
mov edi, eax
call fcn.00545e60
cmp dword [esp + 0x30], 0
jne 0x5457f5
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
jmp 0x545430
mov edi, dword [esp + 0x34]
cmp edi, 0x197
je 0x5456aa
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x48]
mov edx, dword [edi + 0x40]
mov eax, dword [edi + 0x3c]
push ebp
push ecx
push edx
push eax
push edi
call fcn.005433c0
add dword [edi + 0x40], ebp
mov dword [edi + 0x44], eax
mov ecx, dword [esi + 0x5c]
test ecx, ecx
jle 0x5456a0
sub ecx, dword [esi + 0x58]
cmp dword [esi + 0x6c], ecx
jge 0x545862
test eax, eax
jne 0x545862
jmp 0x5456f3
mov ebp, dword [esp + 0x40]
mov eax, 0x3fc
sub eax, ebp
cmp ebx, eax
mov edi, ebx
jle 0x5456bd
mov edi, eax
test edi, edi
jle 0x5456df
mov edx, dword [esp + 0x60]
push edi
lea ecx, [esp + 0x278]
push ecx
add edx, ebp
push edx
call fcn.0057b7b0
add esp, 0xc
add ebp, edi
mov dword [esp + 0x40], ebp
mov eax, dword [esp + 0x44]
add eax, ebx
cmp eax, dword [esp + 0x3c]
mov dword [esp + 0x44], eax
jge 0x545875
mov eax, dword [esp + 0x2c]
cmp dword [eax + 0x2c], 0
je 0x545100
mov dword [esp + 0x18], 0xa
jmp 0x545862
mov dword [esp + 0x18], 0
jmp 0x545862
mov dword [esp + 0x18], 5
jmp 0x545862
mov dword [esp + 0x18], 4
jmp 0x545862
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x18], 2
jmp 0x545862
push 0x80004005
call fcn.00401f90
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x20]
lea ecx, [esi + 0x5c]
push edx
call fcn.00402330
mov eax, dword [esp + 0x28]
push eax
call fcn.0053b930
mov dword [esp + 0x18], 7
mov byte [esp + 0x820], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x54579d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x820], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x545856
mov ecx, 0x63
add edi, 0xfffffe70
cmp ecx, edi
sbb eax, eax
add eax, 9
mov dword [esp + 0x18], eax
mov byte [esp + 0x820], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x545791
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx]
cmp dword [eax + 0x54], esi
jne 0x545775
mov edx, dword [eax + 0x20]
push 1
push 0
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
jmp 0x545775
mov byte [esp + 0x820], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x54583e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x820], ebp
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x545862
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x34], 0x197
mov esi, dword [esp + 0x18]
jne 0x54587c
cmp esi, 4
jne 0x54587c
mov eax, 6
jmp 0x545896
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x828]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
mov eax, esi
mov ecx, dword [esp + 0x818]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x800]
xor ecx, esp
call fcn.00577139
add esp, 0x810
ret