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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x101a8cb0]
xor eax, ebp
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x114], 0x4000
movsx eax, word [ebp + 0x14]
test eax, eax
jne 0x100647f8
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x14c], 0
jmp 0x100646c1
mov ecx, dword [ebp - 0x14c]
add ecx, 1
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x14c]
cmp edx, dword [ebp - 0x110]
jae 0x100646e7
mov eax, dword [ebp - 0x14c]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + eax*4 - 0x10c]
cmp edx, dword [ecx]
jne 0x100646e5
jmp 0x100646e7
jmp 0x100646b2
mov eax, dword [ebp - 0x14c]
cmp eax, dword [ebp - 0x110]
jne 0x1006471f
cmp dword [ebp - 0x110], 0x40
jae 0x1006471f
mov ecx, dword [ebp - 0x14c]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov dword [ebp + ecx*4 - 0x10c], eax
mov ecx, dword [ebp - 0x110]
add ecx, 1
mov dword [ebp - 0x110], ecx
xor edx, edx
jne 0x100646a6
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x128], 0
lea ecx, [ebp - 0x12c]
push ecx
push 0
push 0
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 1
push ecx
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jle 0x100647a4
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x100647a2
push 0x2d8
push 0x101aa3c4
push 0x2d4
push 0x40003
call fcn.10002e30
add esp, 0x10
mov eax, 0x2d4
jmp 0x10064dcd
jmp 0x100647f3
cmp dword [ebp - 0x118], 0xffffffff
jne 0x100647e9
call fcn.10063410
mov word [ebp - 0x130], ax
push 0x2df
push 0x101aa3d0
movsx edx, word [ebp - 0x130]
push edx
push 0x2d1
push 0x40003
call fcn.100030a0
add esp, 0x14
mov eax, 0x2d1
jmp 0x10064dcd
mov eax, 0x2d4
jmp 0x10064dcd
jmp 0x1006494e
mov dword [ebp - 4], 0
mov eax, 1
test eax, eax
je 0x1006494e
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
cmp dword [ebp - 4], 0x20
jle 0x10064822
mov dword [ebp - 4], 0
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x150], 0
jmp 0x10064847
mov edx, dword [ebp - 0x150]
add edx, 1
mov dword [ebp - 0x150], edx
mov eax, dword [ebp - 0x150]
cmp eax, dword [ebp - 0x110]
jae 0x1006486d
mov ecx, dword [ebp - 0x150]
mov edx, dword [ebp + 8]
mov eax, dword [ebp + ecx*4 - 0x10c]
cmp eax, dword [edx]
jne 0x1006486b
jmp 0x1006486d
jmp 0x10064838
mov ecx, dword [ebp - 0x150]
cmp ecx, dword [ebp - 0x110]
jne 0x100648a5
cmp dword [ebp - 0x110], 0x40
jae 0x100648a5
mov edx, dword [ebp - 0x150]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp + edx*4 - 0x10c], ecx
mov edx, dword [ebp - 0x110]
add edx, 1
mov dword [ebp - 0x110], edx
xor eax, eax
jne 0x1006482c
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x128], 0
lea edx, [ebp - 0x12c]
push edx
push 0
push 0
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 1
push edx
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
jle 0x10064906
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x10064904
jmp 0x1006494e
jmp 0x10064949
cmp dword [ebp - 0x118], 0xffffffff
jne 0x10064949
call fcn.10063410
mov word [ebp - 0x130], ax
push 0x302
push 0x101aa3dc
movsx eax, word [ebp - 0x130]
push eax
push 0x2d1
push 0x40003
call fcn.100030a0
add esp, 0x14
mov eax, 0x2d1
jmp 0x10064dcd
jmp 0x100647ff
mov dword [ebp - 0x124], 0x10
lea ecx, [ebp - 0x124]
push ecx
lea edx, [ebp - 0x148]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_accept]
mov dword [ebp - 0x120], eax
cmp dword [ebp - 0x120], 0xffffffff
jne 0x100649bd
call fcn.10063410
mov word [ebp - 0x130], ax
push 0x30d
push 0x101aa3e8
movsx edx, word [ebp - 0x130]
push edx
push 0x2be
push 0x40003
call fcn.100030a0
add esp, 0x14
mov eax, 0x2be
jmp 0x10064dcd
cmp dword [ebp - 0x120], 0xffffffff
jne 0x10064a21
call fcn.10063410
mov word [ebp - 0x130], ax
push 0x313
push 0x101aa3f4
movsx eax, word [ebp - 0x130]
push eax
push 0x2be
push 0x40003
call fcn.100030a0
add esp, 0x14
push 0x314
push 0x101aa400
push str.Invalid_Socket
push 0x2be
push 0x40003
call fcn.10002bc0
add esp, 0x14
mov eax, 0x2be
jmp 0x10064dcd
mov ecx, 1
mov word [ebp - 0x11c], cx
mov edx, 5
mov word [ebp - 0x11a], dx
push 4
lea eax, [ebp - 0x11c]
push eax
push 0x80
push 0xffff
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x10064aa5
call fcn.10063410
mov word [ebp - 0x130], ax
mov edx, dword [ebp - 0x120]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
push 0x31f
push 0x101aa41c
movsx eax, word [ebp - 0x130]
push eax
push 0x2d5
push 0x40003
call fcn.100030a0
add esp, 0x14
mov eax, 0x2d5
jmp 0x10064dcd
push 4
lea ecx, [ebp - 0x114]
push ecx
push 0x1001
push 0xffff
mov edx, dword [ebp - 0x120]
push edx
call dword [sym.imp.WSOCK32.dll_setsockopt]
push 4
lea eax, [ebp - 0x114]
push eax
push 0x1002
push 0xffff
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
cmp dword [0x101cc924], 0
je 0x10064cf7
push 2
push 4
lea edx, [ebp - 0x144]
push edx
call dword [sym.imp.WSOCK32.dll_gethostbyaddr]
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
jne 0x10064c0f
lea eax, [ebp - 0x144]
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x154]
movzx edx, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x154]
movzx ecx, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x154]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x154]
movzx edx, byte [ecx]
push edx
push 0x101aa428
lea eax, [ebp - 0x198]
push eax
call fcn.10003cf0
add esp, 0x18
call fcn.10063410
mov word [ebp - 0x130], ax
mov ecx, dword [ebp - 0x120]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
push 0x331
push 0x101aa434
movsx edx, word [ebp - 0x130]
push edx
push 0x2d6
push 0x40003
call fcn.100030a0
add esp, 0x14
mov eax, dword [ebp - 0x154]
movzx ecx, byte [eax + 3]
push ecx
mov edx, dword [ebp - 0x154]
movzx eax, byte [edx + 2]
push eax
mov ecx, dword [ebp - 0x154]
movzx edx, byte [ecx + 1]
push edx
mov eax, dword [ebp - 0x154]
movzx ecx, byte [eax]
push ecx
push 0x101aa440
lea edx, [ebp - 0x198]
push edx
call fcn.10003cf0
add esp, 0x18
push 0x334
push 0x101aa458
lea eax, [ebp - 0x198]
push eax
push 0x2d6
push 0x40003
call fcn.10002bc0
add esp, 0x14
mov eax, 0x2d6
jmp 0x10064dcd
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x19c], ecx
mov edx, dword [ebp - 0x19c]
movzx eax, byte [edx + 3]
push eax
mov ecx, dword [ebp - 0x19c]
movzx edx, byte [ecx + 2]
push edx
mov eax, dword [ebp - 0x19c]
movzx ecx, byte [eax + 1]
push ecx
mov edx, dword [ebp - 0x19c]
movzx eax, byte [edx]
push eax
push 0x101aa464
lea ecx, [ebp - 0x1e0]
push ecx
call fcn.10003cf0
add esp, 0x18
push 0x40
lea edx, [ebp - 0x1e0]
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x46
push eax
call fcn.10003d40
add esp, 0xc
mov ecx, dword [ebp - 0x19c]
movzx edx, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x19c]
movzx ecx, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x19c]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x19c]
movzx edx, byte [ecx]
push edx
push 0x101aa470
lea eax, [ebp - 0x1e0]
push eax
call fcn.10003cf0
add esp, 0x18
push 0x340
push 0x101aa488
lea ecx, [ebp - 0x1e0]
push ecx
push 0
push 0x40002
call fcn.10002bc0
add esp, 0x14
push 0x3f
mov edx, dword [ebp - 0x134]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 6
push ecx
call fcn.10003d40
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov byte [edx + 0x45], 0
jmp 0x10064dc0
lea eax, [ebp - 0x144]
mov dword [ebp - 0x1e4], eax
mov ecx, dword [ebp - 0x1e4]
movzx edx, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x1e4]
movzx ecx, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x1e4]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x1e4]
movzx edx, byte [ecx]
push edx
push str._u._u._u._u
lea eax, [ebp - 0x228]
push eax
call fcn.10003cf0
add esp, 0x18
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 6], 0
push 0x40
lea edx, [ebp - 0x228]
push edx
mov eax, dword [ebp + 0xc]
add eax, 0x46
push eax
call fcn.10003d40
add esp, 0xc
mov ecx, dword [ebp - 0x1e4]
movzx edx, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x1e4]
movzx ecx, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x1e4]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x1e4]
movzx edx, byte [ecx]
push edx
push str.Remote:__u._u._u._u_
lea eax, [ebp - 0x228]
push eax
call fcn.10003cf0
add esp, 0x18
push 0x351
push 0x101aa4b8
lea ecx, [ebp - 0x228]
push ecx
push 0
push 0x40002
call fcn.10002bc0
add esp, 0x14
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x120]
mov dword [edx], eax
xor eax, eax
mov ecx, dword [ebp - 0x138]
xor ecx, ebp
call fcn.1002aab0
mov esp, ebp
pop ebp
ret