Function at 0x47f790
Capabilities:
Execute anti-debugging instructions
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x120c
call fcn.00496a60
push ebx
push esi
xor esi, esi
push edi
mov ebx, ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], 0x186a0
mov edi, dword [ebp + 8]
lea ebx, [ebx]
lea ecx, [edi + 1]
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x144], edi
mov dword [esp + 0x140], 1
jbe 0x47f7dd
mov eax, ecx
lea ecx, [esp + 0x24]
push ecx
push esi
push esi
lea edx, [esp + 0x14c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x47fa09
cmp eax, esi
jne 0x47f984
mov eax, dword [esp + 0x2c]
mov ecx, eax
inc eax
mov dword [esp + 0x2c], eax
xor eax, eax
cmp ecx, 0xa
ja 0x47fa00
mov ecx, 0xe7
lea edi, [esp + 0x2d8]
rep stosd dword es:[edi], eax
mov al, byte [0x4bdb08]
test al, al
mov word [esp + 0x2d8], 3
jne 0x47f870
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], esi
mov byte [0x4bdb08], 1
rdtsc
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
xor eax, eax
or eax, edx
push eax
mov dword [esp + 0x18], esi
or ecx, esi
call dword [sym.imp.MSVCR71.dll_srand]
add esp, 4
mov edi, dword [sym.imp.MSVCR71.dll_rand]
call edi
mov esi, eax
call edi
shl esi, 0x10
add eax, esi
mov dword [esp + 0x2dc], eax
mov al, byte [0x4bdb08]
test al, al
jne 0x47f8c8
xor esi, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
mov byte [0x4bdb08], 1
rdtsc
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
xor eax, eax
or eax, edx
push eax
mov dword [esp + 0x20], esi
or ecx, esi
call dword [sym.imp.MSVCR71.dll_srand]
add esp, 4
call edi
mov esi, eax
call edi
mov ecx, dword [ebx + 0x68]
mov dx, word [ebp + 0x14]
shl esi, 0x10
add eax, esi
mov dword [esp + 0x2e0], eax
mov eax, dword [ebx + 0x6c]
mov dword [esp + 0x2e4], eax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x2ec], ecx
push 0x7fa
lea ecx, [esp + 0xa24]
mov word [esp + 0x662], dx
push ecx
lea edx, [esp + 0x2e4]
push edx
mov ecx, ebx
mov byte [esp + 0x2ec], 0x14
mov byte [esp + 0x668], 1
mov word [esp + 0x672], 1
mov word [esp + 0x148], 0
call fcn.0047ea10
push eax
lea eax, [esp + 0xa20]
push eax
lea ecx, [esp + 0xa20]
push ecx
lea ecx, [ebx + 8]
call fcn.00480150
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push eax
mov eax, dword [ebp + 8]
lea edx, [esp + 0xa24]
push edx
push eax
mov ecx, ebx
call fcn.0047fe80
cmp eax, 0xffffffff
je 0x47fa09
xor esi, esi
jmp 0x47f7b7
jle 0x47f7c0
lea ecx, [esp + 0x140]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x47f7c0
lea edx, [esp + 0x30]
push edx
push edi
lea eax, [esp + 0x680]
push eax
mov ecx, ebx
call fcn.0047f280
test eax, eax
je 0x47f7c0
cmp word [esp + 0x678], 0x103
jne 0x47f7c0
mov ecx, dword [esp + 0x688]
cmp ecx, dword [ebx + 0x68]
jne 0x47f7c0
mov edx, dword [esp + 0x684]
cmp edx, dword [ebx + 0x6c]
jne 0x47f7c0
cmp byte [esp + 0x67c], 0x14
jne 0x47f7c0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10