Function at 0x100356d0
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket
Send icmp echo request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1015b5be
mov eax, dword fs:[0]
push eax
sub esp, 0x170
push ebx
push esi
push edi
mov eax, dword [0x101b0cd0]
xor eax, esp
push eax
lea eax, [esp + 0x180]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x38], edi
cmp byte [edi + 0x164], 0
je 0x100359b8
lea esi, [esp + 0x48]
call fcn.10046570
xor eax, eax
mov dword [esp + 0x188], eax
mov dword [esp + 0x34], eax
cmp byte [edi + 0x20], al
jne 0x1003592f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [edi + 0x17c]
cmp eax, dword [edi + 0x178]
jb 0x1003592f
mov eax, dword [edi + 0x54]
push eax
lea eax, [esp + 0x18]
call fcn.10018050
mov eax, dword [esp + 0x1c]
cdq
idiv dword [esp + 0x24]
lea esi, [esp + 0x54]
test eax, eax
jle 0x1003578c
push eax
call fcn.100184f0
mov eax, dword [esp + 0x1c]
test eax, eax
jle 0x10035793
mov ecx, dword [esp + 0x18]
mov edi, eax
push ecx
mov eax, esi
call fcn.10018600
mov edi, dword [esp + 0x38]
jmp 0x10035793
push 0
call fcn.100184f0
mov edx, dword [esp + 0x58]
or esi, 0xffffffff
push edx
mov dword [esp + 0x44], esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x3c], eax
call sub.IPHLPAPI.DLL_IcmpCreateFile
mov ebx, eax
cmp ebx, esi
je 0x10035802
push 0x1c
call fcn.10054f2b
mov esi, eax
add esp, 4
test esi, esi
jne 0x100357c9
or esi, 0xffffffff
jmp 0x10035802
mov eax, dword [esp + 0x3c]
push 0x7d0
push 0x1c
push esi
push 0
push 0
push 0
push eax
push ebx
call sub.IPHLPAPI.DLL_IcmpSendEcho
test eax, eax
je 0x100357f3
mov ecx, dword [esp + 0x3c]
cmp dword [esi], ecx
jne 0x100357f3
mov ebx, dword [esi + 8]
jmp 0x100357f7
mov ebx, dword [esp + 0x40]
push esi
call fcn.10054ff5
add esp, 4
mov esi, ebx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], vtable.XStringA.0
test eax, eax
je 0x1003583d
mov edx, dword [esp + 0x1c]
inc edx
imul edx, dword [esp + 0x24]
push edx
push 0
push eax
call fcn.10057070
mov eax, dword [esp + 0x24]
add esp, 0xc
push eax
call fcn.10054ff5
add esp, 4
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x28]
test eax, eax
je 0x10035865
mov ecx, dword [esp + 0x2c]
lea edx, [ecx + ecx]
push edx
push 0
push eax
call fcn.10057070
mov eax, dword [esp + 0x34]
add esp, 0xc
push eax
call fcn.1004698d
add esp, 4
cmp esi, 0xffffffff
je 0x1003587b
cmp esi, dword [edi + 0x16c]
setle bl
test bl, bl
jne 0x10035914
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
mov esi, dword [esp + 0x34]
inc esi
push esi
push str._d_ping_check_fail
lea ecx, [esp + 0x1c]
push 0x313
mov byte [esp + 0x194], 1
push ecx
mov ecx, dword [edi + 0x44]
call fcn.1001d480
mov ebx, dword [esp + 0x28]
add esp, 0x10
test ebx, ebx
je 0x100358d8
mov edx, dword [esp + 0x1c]
inc edx
imul edx, dword [esp + 0x24]
push edx
push 0
push ebx
call fcn.10057070
add esp, 0xc
push ebx
call fcn.10054ff5
add esp, 4
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x100358fc
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax]
push ecx
push 0
push ebx
call fcn.10057070
add esp, 0xc
push ebx
call fcn.1004698d
add esp, 4
mov dword [esp + 0x34], esi
cmp esi, dword [edi + 0x168]
je 0x10035928
cmp byte [edi + 0x20], 0
je 0x10035734
jmp 0x1003592f
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x17c], eax
mov byte [edi + 0xc8], bl
jmp 0x1003592f
mov byte [edi + 0xc8], 0
cmp byte [edi + 0xc8], 0
jne 0x10035971
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
push str.Ping_fail.
lea edx, [esp + 0x18]
mov byte [esp + 0x18c], 2
mov ecx, dword [edi + 0x44]
push 0x31f
push edx
call fcn.1001d480
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.10018140
or esi, 0xffffffff
mov dword [esp + 0x188], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x48], vtable.CIcmpHelper.0
test eax, eax
je 0x100359a7
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov eax, dword [esp + 0x50]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esp + 0x50], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea ecx, [esp + 0x54]
call fcn.10018140
jmp 0x100359bb
or esi, 0xffffffff
cmp byte [edi + 0xc8], 0
jne 0x10035a4f
cmp dword [edi + 0x94], 0x7d1
jne 0x10035a17
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
push str.power_status_off_line
lea ecx, [esp + 0x18]
push 0x329
mov dword [esp + 0x190], 3
push ecx
mov ecx, dword [edi + 0x44]
call fcn.1001cc00
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x188], esi
call fcn.10018140
mov dword [edi + 0x94], 0x7d3
mov byte [edi + 0xc9], 1
mov edi, dword [edi + 0xb8]
xor bl, bl
call fcn.10038030
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0xc9], 0
je 0x10035bd5
cmp byte [edi + 0x90], 0
je 0x10035acc
push 0
mov ecx, edi
mov byte [edi + 0x90], 0
call fcn.10034bf0
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
push str.Socket_is_close_and_sleep
lea edx, [esp + 0x18]
mov dword [esp + 0x18c], 4
mov ecx, dword [edi + 0x44]
push 0x341
push edx
call fcn.1001cc00
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x188], esi
call fcn.10018140
push 0x9c4
mov ebx, edi
call fcn.10031b60
test al, al
jne 0x10035a35
cmp byte [edi + 0xc8], 0
je 0x10035bd5
mov ecx, edi
call fcn.10034a40
mov byte [edi + 0x90], al
mov ebx, edi
test al, al
jne 0x10035b10
push 0x3e8
call fcn.10031b60
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x12c
call fcn.10031b60
test al, al
jne 0x10035a35
mov esi, edi
call fcn.10034cc0
test al, al
mov al, 1
mov byte [edi + 0x90], al
je 0x10035b55
mov byte [edi + 0xc9], al
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0x164], 0
mov esi, 0x7d1
mov dword [edi + 0x94], esi
mov byte [edi + 0xc9], 0
jne 0x10035b76
mov byte [edi + 0xc8], al
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
push str.Socket_reopen_success._power_status_on_line
lea eax, [esp + 0x18]
mov dword [esp + 0x18c], 5
mov ecx, dword [edi + 0x44]
push 0x365
push eax
call fcn.1001cc00
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x188], 0xffffffff
call fcn.10018140
cmp dword [edi + 0x94], esi
mov edi, dword [edi + 0xb8]
sete bl
call fcn.10038030
mov edi, dword [esp + 0x38]
mov esi, edi
call fcn.10034cc0
test al, al
je 0x10035c08
mov byte [edi + 0xc9], 1
mov byte [edi + 0x90], 1
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [edi + 0x90], 0
je 0x10035e54
cmp byte [edi + 0xc8], 0
je 0x10035e54
cmp byte [edi + 0x20], 0
jne 0x10035a35
mov eax, dword [edi + 0x174]
cdq
mov ecx, 0x3e8
idiv ecx
push 1
push 0
mov dword [esp + 0x7c], 1
imul edx, edx, 0x3e8
mov dword [esp + 0x4c], edx
mov edx, dword [edi + 0xc0]
mov dword [esp + 0x48], eax
mov dword [esp + 0x80], edx
call dword [sym.imp.KERNEL32.dll_SleepEx]
lea eax, [esp + 0x40]
push eax
xor ebx, ebx
push ebx
push ebx
lea ecx, [esp + 0x80]
push ecx
push 1
call dword [sym.imp.WS2_32.dll_select]
or esi, 0xffffffff
cmp eax, esi
jne 0x10035c92
mov byte [edi + 0x90], bl
jmp 0x10035e0d
test eax, eax
jle 0x10035e0d
mov eax, dword [edi + 0xc0]
lea edx, [esp + 0x74]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10035e0d
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0xc0]
push 0
push 0x1000
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
cmp ebx, esi
jne 0x10035e09
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
push ebx
push str.WSAGLE__d_
lea eax, [esp + 0x1c]
mov dword [esp + 0x190], 6
mov ecx, dword [edi + 0x44]
push 0x38f
push eax
call fcn.1001cc00
add esp, 0x10
lea ecx, [esp + 0x14]
call fcn.10018140
push str.CPortNet::ReadPort
lea eax, [esp + 0x18]
call fcn.10018050
cmp ebx, 0x2746
jne 0x10035d4c
push str.WSAECONNRESET
push 0x393
lea ecx, [esp + 0x1c]
mov dword [esp + 0x190], 7
push ecx
jmp 0x10035d6e
cmp ebx, 0x2736
je 0x10035dc1
push str.power_status_off_line._recv_SOCKET_ERROR
push 0x39b
lea edx, [esp + 0x1c]
mov dword [esp + 0x190], 8
push edx
mov ecx, dword [edi + 0x44]
call fcn.1001d480
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x188], esi
call fcn.10018140
mov dword [edi + 0x94], 0x7d3
mov byte [edi + 0xc9], 1
mov edi, dword [edi + 0xb8]
xor bl, bl
call fcn.10038030
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.fail
lea eax, [esp + 0x18]
mov dword [esp + 0x18c], 9
mov ecx, dword [edi + 0x44]
push 0x3a2
push eax
call fcn.1001d480
add esp, 0xc
lea ecx, [esp + 0x14]
call fcn.10018140
xor eax, eax
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test ebx, ebx
jne 0x10035e57
cmp byte [edi + 0x20], 0
jne 0x10035a35
cmp byte [edi + 0xa8], 0
jne 0x10035e57
cmp byte [edi + 0x98], 0
jne 0x10035e57
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
sub eax, dword [edi + 0x184]
cmp eax, dword [edi + 0x180]
jb 0x10035a35
call esi
mov esi, edi
mov dword [edi + 0x184], eax
call fcn.10035e80
jmp 0x10035e57
mov ebx, dword [ebp + 0xc]
mov eax, ebx
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8