Function at 0x542620
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c7ab8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xfc
mov eax, dword [0x6834fc]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ebx, ebx
push 1
push eax
mov dword [ebp - 0x48], esi
mov dword [ebp - 4], ebx
call fcn.0054d430
mov ecx, esi
call fcn.0054de80
mov ecx, esi
call fcn.0054e590
mov ecx, esi
call fcn.0054d690
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x58], 3
push ecx
mov dword [ebp - 0x54], ebx
call fcn.005860ec
lea edx, [ebp - 0x44]
push edx
call fcn.005860ec
add esp, 8
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
cmp dword [esi + 0x38], ebx
je 0x5426fb
lea ecx, [esi + 0x48]
call fcn.0050c900
mov ecx, dword [esi + 0x150]
mov edx, dword [esi + 0x154]
lea eax, [esi + 0x20]
mov dword [esi + 0x30], ebx
push eax
push 0x1471
mov dword [eax], ecx
mov ecx, dword [esi + 0x158]
mov dword [eax + 4], edx
mov edx, dword [esi + 0x15c]
mov eax, dword [esi + 0x10]
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], edx
push 0x111
mov ecx, dword [eax]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, 0x7540
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.0054d2c0
test al, al
mov byte [ebp - 0x38], al
je 0x542727
lea edx, [ebp - 0x64]
push edx
call fcn.005860ec
mov eax, dword [esi + 0x158]
mov ecx, dword [esi + 0x15c]
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ecx
lea edx, [ebp - 0x58]
lea eax, [esi + 0x5e8]
push edx
lea ecx, [esi + 0x3e4]
push eax
lea edx, [esi + 0x1e0]
push ecx
push edx
push ebx
call sub.WSOCK32.dll_select
mov edi, eax
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x54276d
lea ecx, [esi + 0x48]
call fcn.0050c900
mov eax, 0x7540
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x158]
mov ecx, dword [esi + 0x15c]
or eax, ecx
jne 0x5427b2
lea eax, [ebp - 0x44]
push eax
call fcn.005860ec
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x88]
sub ecx, edx
add esp, 4
cmp ecx, 0x12c
jle 0x5427b2
mov eax, 0x7532
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 0xffffffff
je 0x54280d
cmp edi, ebx
je 0x54280d
xor edi, edi
cmp edi, dword [esi + 0x140]
jge 0x542814
mov eax, edi
mov ecx, dword [esi + 0x1dc]
shl eax, 5
add eax, edi
lea edx, [eax + eax*2]
lea eax, [edi + edx*4]
shl eax, 5
add ecx, eax
cmp dword [ecx + 0x54], ebx
je 0x54280a
cmp dword [esi + 0x38], ebx
je 0x542805
lea ecx, [esi + 0x48]
call fcn.0050c900
mov eax, 0x7540
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00540d10
inc edi
jmp 0x5427bd
mov ecx, esi
call fcn.004c78b0
mov edx, dword [ebp - 0x38]
mov ecx, esi
push edx
push ebx
call fcn.0054d760
lea eax, [ebp - 0x7c]
push eax
call fcn.005860ec
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x44]
sub eax, ecx
add esp, 4
lea ecx, [eax + eax*2]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp - 0x78]
and ecx, 0xffff
lea edx, [eax + eax*4]
mov eax, dword [ebp - 0x40]
shl edx, 3
and eax, 0xffff
sub edx, eax
add edx, ecx
cmp edx, 0xfa
jl 0x5428d8
lea edx, [ebp - 0x44]
push edx
call fcn.005860ec
add esp, 4
xor ebx, ebx
cmp ebx, dword [esi + 0x140]
jge 0x5428d8
mov eax, ebx
mov edx, dword [esi + 0x1dc]
shl eax, 5
add eax, ebx
lea eax, [eax + eax*2]
lea ecx, [ebx + eax*4]
shl ecx, 5
mov eax, dword [ecx + edx + 0x54]
lea edi, [ecx + edx]
test eax, eax
je 0x5428d5
mov eax, dword [edi + 0x70]
mov ecx, dword [eax]
cmp dword [ecx], 0
je 0x5428d5
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0x3c]
or edx, eax
je 0x5428d5
lea eax, [edi + 0x2d0]
mov ecx, edi
push eax
call fcn.0050ffa0
lea eax, [edi + 0x2d0]
push eax
mov eax, dword [edi + 0x70]
push 0x13ef
push 0x111
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
inc ebx
jmp 0x54286b
mov al, byte [ebp - 0x38]
test al, al
je 0x542aee
mov ecx, dword [esi + 0x15c]
mov eax, dword [esi + 0x158]
test ecx, ecx
jl 0x542aee
jg 0x542904
cmp eax, 0x400
jbe 0x542aee
mov ecx, esi
call fcn.0054d280
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x70]
push eax
mov ebx, edx
call fcn.005860ec
mov eax, dword [esi + 0x158]
mov edi, dword [ebp - 0x34]
mov ecx, dword [esi + 0x15c]
mov edx, dword [ebp - 0x30]
add esp, 4
sub eax, edi
sbb ecx, edx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ecx
js 0x542aee
jg 0x542948
test eax, eax
jbe 0x542aee
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x64]
sub eax, edx
mov edx, dword [ebp - 0x60]
and edx, 0xffff
lea ecx, [eax + eax*2]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp - 0x6c]
and ecx, 0xffff
lea eax, [eax + eax*4]
shl eax, 3
sub eax, edx
add eax, ecx
mov dword [ebp - 0x14], eax
jne 0x54297e
mov dword [ebp - 0x14], 1
fild qword [ebp - 0x50]
fmul dword [0x5d8d8c]
fidiv dword [ebp - 0x14]
call fcn.00584d08
mov edi, edx
mov ecx, eax
cmp edi, ebx
jl 0x542aee
jg 0x5429a6
cmp ecx, dword [ebp - 0x24]
jbe 0x542aee
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
sub ecx, edx
cdq
sbb edi, ebx
push edx
push eax
push edi
push ecx
call fcn.005870a0
mov ecx, dword [ebp - 0x24]
push ebx
push ecx
push edx
push eax
call fcn.00586630
mov edi, eax
mov eax, dword [esi + 0x160]
cdq
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x24]
push 0
push 2
push ebx
push edx
mov dword [ebp - 0x1c], eax
call fcn.00586630
cmp dword [ebp - 0x18], edx
jg 0x542a04
jl 0x5429ef
cmp dword [ebp - 0x1c], eax
jae 0x542a04
mov eax, 0x66666667
imul edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
mov edi, edx
jmp 0x542a32
mov ecx, dword [ebp - 0x24]
push 0
push 9
push ebx
push ecx
call fcn.005870a0
push 0
push 0xa
push edx
push eax
call fcn.00586630
cmp dword [ebp - 0x18], edx
jg 0x542a32
jl 0x542a29
cmp dword [ebp - 0x1c], eax
jae 0x542a32
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov edi, eax
cmp edi, 0x2ee0
jle 0x542a41
mov edi, 0x2ee0
jmp 0x542a49
test edi, edi
jle 0x542aee
mov eax, dword [esi + 0x7ec]
cmp eax, 0xffffffff
je 0x542ae7
lea ecx, [esi + 0x1e0]
lea ebx, [esi + 0x5e8]
mov dword [esi + 0x3e4], 0
mov dword [ecx], 0
mov dword [ebx], 0
mov dword [esi + 0x1e4], eax
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov eax, dword [ebx]
cmp eax, 0x80
jae 0x542aa0
mov edx, dword [esi + 0x7ec]
mov dword [esi + eax*4 + 0x5ec], edx
mov eax, dword [ebx]
inc eax
mov dword [ebx], eax
mov eax, 0x10624dd3
imul edi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [ebp - 0x2c], edx
lea eax, [edx + edx*2]
lea edx, [edx + eax*8]
lea edx, [edx + edx*4]
shl edx, 3
sub edi, edx
lea eax, [edi + edi*2]
lea edi, [edi + eax*8]
lea eax, [ebp - 0x2c]
push eax
lea eax, [esi + 0x3e4]
lea edx, [edi + edi*4]
push ebx
push eax
push ecx
shl edx, 3
push 0
mov dword [ebp - 0x28], edx
call sub.WSOCK32.dll_select
jmp 0x542aee
push edi
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, esi
call fcn.00543120
mov edi, eax
test edi, edi
jne 0x542b09
mov ecx, esi
call fcn.00542dd0
xor ebx, ebx
jmp 0x542698
mov eax, dword [esi + 0x38]
test eax, eax
je 0x542b2e
lea ecx, [esi + 0x48]
call fcn.0050c900
mov eax, 0x7540
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 0x753c
je 0x542d4f
cmp edi, 0xffffffff
je 0x542d4f
mov ecx, dword [esi + 0x15c]
mov edx, dword [esi + 0x158]
mov eax, dword [0x683500]
push ecx
push edx
lea ecx, [ebp - 0x108]
push eax
push ecx
call fcn.005851fa
add esp, 0x10
lea edx, [ebp - 0x108]
mov ecx, esi
push 1
push edx
call fcn.0054d430
mov edi, dword [esi + 0x154]
mov edx, dword [esi + 0x150]
mov eax, dword [esi + 0x158]
mov ecx, dword [esi + 0x15c]
mov dword [ebp - 0x28], edi
mov edi, edx
cmp eax, edi
jne 0x542ba4
mov ebx, dword [ebp - 0x28]
mov edi, ecx
cmp edi, ebx
je 0x542ccd
mov ebx, dword [esi + 0x154]
mov edi, edx
or edi, ebx
je 0x542ccd
mov edi, dword [esi + 0x1dc]
mov dword [ebp - 0x1c], edx
mov edx, ebx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x7fc]
mov ebx, edx
imul ebx, dword [edi + 0x30c4]
mov edi, ebx
mov ebx, eax
add edi, ebx
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x24], edi
mov edi, ecx
adc ebx, edi
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x24]
cmp ebx, edi
jne 0x542c03
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
cmp ebx, edi
je 0x542ccd
mov edi, dword [0x67da2c]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [esi + 0x1dc]
mov ebx, dword [esi + 0x150]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
mov edi, dword [ecx + 0x30c4]
mov ecx, dword [esi + 0x154]
push ecx
mov ecx, edi
imul ecx, edx
push ebx
xor ebx, ebx
add ecx, eax
mov eax, dword [ebp - 0x28]
adc ebx, eax
mov eax, dword [ebp - 0x1c]
push ebx
push ecx
push edi
push edx
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push edx
push eax
push str.Error_NMSD__ttd_I64d__ttsp_ld__mpln_ld__s1_I64d__fsize_I64d_n
push ecx
call fcn.00599a28
mov edx, dword [ebp - 0x14]
add esp, 0x28
mov ecx, esi
push edx
call fcn.0054d550
mov eax, dword [esi + 0x15c]
mov edi, dword [esi + 0x154]
mov ecx, dword [esi + 0x158]
mov edx, dword [esi + 0x150]
cmp eax, edi
jl 0x542cad
jg 0x542c8b
cmp ecx, edx
jbe 0x542cad
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005a0c5d
mov eax, 0x7570
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005a0c5d
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
cmp ebx, dword [esi + 0x140]
jge 0x542d3c
mov eax, ebx
mov edx, dword [esi + 0x1dc]
shl eax, 5
add eax, ebx
lea eax, [eax + eax*2]
lea ecx, [ebx + eax*4]
shl ecx, 5
mov eax, dword [ecx + edx + 0x54]
lea edi, [ecx + edx]
test eax, eax
je 0x542d39
mov eax, dword [edi + 0x70]
mov ecx, dword [eax]
cmp dword [ecx], 0
je 0x542d39
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0x3c]
or edx, eax
je 0x542d39
lea eax, [edi + 0x2d0]
mov ecx, edi
push eax
call fcn.0050ffa0
lea eax, [edi + 0x2d0]
push eax
mov eax, dword [edi + 0x70]
push 0x13ef
push 0x111
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
inc ebx
jmp 0x542ccf
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x15c]
mov ecx, dword [esi + 0x158]
mov edx, dword [0x6834f4]
push eax
push ecx
lea eax, [ebp - 0x108]
push edx
push eax
call fcn.005851fa
add esp, 0x10
lea ecx, [ebp - 0x108]
push 1
push ecx
mov ecx, esi
call fcn.0054d430
mov esi, dword [esi + 0xf8]
test esi, esi
je 0x542d9b
cmp edi, 0x753c
mov eax, esi
je 0x542cbc
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret