Function at 0x496770
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d5901
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf8
push ebx
push esi
push edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], 0
mov ecx, 7
mov esi, str.CMain_network_thread::Accept
lea edi, [ebp - 0x34]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov dword [0x6d8018], 0
mov dword [ebp - 0x3c], 0
jmp 0x4967c7
mov eax, dword [ebp - 0x3c]
add eax, 1
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [0x6d8018]
jae 0x4967e8
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx*4 + 0x6d801c]
cmp ecx, dword [eax + 8]
jne 0x4967e6
jmp 0x4967e8
jmp 0x4967be
mov edx, dword [ebp - 0x3c]
cmp edx, dword [0x6d8018]
jne 0x496819
cmp dword [0x6d8018], 0x40
jae 0x496819
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
mov dword [eax*4 + 0x6d801c], edx
mov eax, dword [0x6d8018]
add eax, 1
mov dword [0x6d8018], eax
xor ecx, ecx
test ecx, ecx
jne 0x4967b5
push 0x5f17f8
push 0
push 0
push 0x6d8018
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jle 0x496aea
push 0x6d8018
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x496aea
mov dword [ebp - 0x50], 0x10
mov dword [ebp - 0x54], 0
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0xffffffff
jne 0x496894
jmp 0x496aea
mov ecx, dword [ebp - 0x10]
xor edx, edx
mov dl, byte [ecx + 0xc]
test edx, edx
jne 0x4968af
mov eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x496aea
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov dword [ebp - 0x5c], eax
mov dx, word [ebp - 0x4a]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
and eax, 0xffff
mov dword [ebp - 0x54], eax
mov ecx, dword [0x6bc7b4]
call fcn.00584270
mov esi, eax
mov ecx, dword [0x6bc7b4]
call fcn.004e97c0
cmp esi, eax
jge 0x496900
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00496560
add esp, 4
and eax, 0xff
test eax, eax
je 0x49690f
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x496aea
call fcn.00435e20
sub eax, dword [0x6d811c]
cmp eax, 0x3e8
jbe 0x49693f
call fcn.00435e20
mov dword [0x6d811c], eax
mov ecx, 0x6d8120
call fcn.00497370
mov dword [0x6e3170], 0
lea edx, [ebp - 0x7c]
push edx
mov eax, dword [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x78]
call fcn.004012c0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x78]
push ecx
lea edx, [ebp - 0x80]
push edx
mov ecx, 0x6d8120
call fcn.00497390
mov eax, dword [eax]
mov dword [ebp - 0x60], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x78]
call fcn.00401320
lea ecx, [ebp - 0x84]
push ecx
mov ecx, 0x6d8120
call fcn.0043a5a0
push eax
lea ecx, [ebp - 0x60]
call fcn.0043a410
and eax, 0xff
test eax, eax
je 0x4969f1
lea ecx, [ebp - 0x60]
call fcn.0048a920
add eax, 0x10
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 0xbc]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 0xbc]
mov dword [ecx], eax
lea ecx, [ebp - 0x60]
call fcn.0048a920
cmp dword [eax + 0x10], 5
jl 0x4969ec
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x5c]
push eax
call fcn.004965d0
add esp, 4
jmp 0x496aea
jmp 0x496a99
push str.127.0.0.1
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.005b4e70
add esp, 8
test eax, eax
je 0x496a99
mov dword [ebp - 0x9c], 1
lea edx, [ebp - 0xb0]
push edx
mov eax, dword [ebp - 0x5c]
push eax
lea ecx, [ebp - 0xac]
call fcn.004012c0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x9c]
push ecx
lea edx, [ebp - 0xac]
push edx
lea ecx, [ebp - 0x98]
call fcn.00497480
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0xc4]
push ecx
lea edx, [ebp - 0xb8]
push edx
mov ecx, 0x6d8120
call fcn.00497320
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x98]
call fcn.0047c580
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xac]
call fcn.00401320
mov dword [ebp - 0x64], 1
push 4
lea eax, [ebp - 0x64]
push eax
push 1
push 6
mov ecx, dword [ebp - 0x58]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0xffffffff
jne 0x496ac9
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x496aea
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x58]
push ecx
mov ecx, dword [0x6bc7b4]
call fcn.00496b00
test eax, eax
jne 0x496aea
mov edx, dword [ebp - 0x58]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret