Function at 0x46f190
Capabilities:
Get local ipv4 addresses
Get socket information
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x49d12b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x268
mov eax, dword [0x4bc410]
push ebx
xor eax, ebp
push esi
mov ebx, ecx
mov dword [esp + 0x268], eax
mov ax, word [ebx + 0x7e]
push edi
xor edi, edi
cmp ax, di
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 1
jne 0x46f61a
push edi
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x46f594
lea eax, [esp + 0xc]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
xor ecx, ecx
mov dword [esp + 0x154], ecx
push 0x10
mov dword [esp + 0x15c], ecx
lea edx, [esp + 0x158]
push edx
mov dword [esp + 0x164], ecx
push esi
mov dword [esp + 0x16c], ecx
mov word [esp + 0x160], 2
mov word [esp + 0x162], di
mov dword [esp + 0x164], edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x46f292
xor eax, eax
mov dword [esp + 0x154], eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x158]
mov dword [esp + 0x15c], eax
push edx
mov dword [esp + 0x164], eax
push esi
mov dword [esp + 0x28], 0x10
mov dword [esp + 0x16c], eax
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x46f2a1
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor ax, ax
jmp 0x46f61a
mov eax, dword [esp + 0x156]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp dword [ebp + 8], edi
mov word [ebx + 0x7c], ax
jne 0x46f355
push edi
push edi
push 1
push esi
mov word [ebx + 0x7e], ax
call fcn.0048fc60
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46f2e6
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov word [ebx + 0x7e], di
xor ax, ax
jmp 0x46f61a
mov esi, dword [sym.imp.USER32.dll_PostThreadMessageA]
mov dword [ebx + 0xa0], edi
mov ecx, dword [edi + 0x20]
push 0
push edi
mov dword [ecx + 0x14], ebx
mov edx, dword [0x4bd938]
push 0x716
push edx
mov dword [esp + 0x1c], 0x32
call esi
test eax, eax
jne 0x46f34c
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x46f320
mov eax, dword [esp + 0xc]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0xc], eax
jbe 0x46f348
push 0xa
call ebx
mov edx, dword [0x4bd938]
push 0
push edi
push 0x716
push edx
call esi
test eax, eax
je 0x46f320
mov ebx, dword [esp + 0x10]
mov ax, word [ebx + 0x7e]
jmp 0x46f61a
lea ecx, [esp + 0x184]
call fcn.0047cd00
mov ecx, dword [0x4bd2c0]
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov word [esp + 0x38], 0x67
mov edx, dword [ecx + 0x2ec]
mov dword [esp + 0x164], eax
mov dword [esp + 0x168], eax
mov dword [esp + 0x16c], eax
mov dword [esp + 0x27c], edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], 0x12c
mov word [esp + 0x28], 0x1f4
mov dword [esp + 0x20], 0x1000003
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 0x7a120
mov dword [esp + 0x170], eax
mov word [esp + 0x164], 2
jmp 0x46f3f4
mov edi, dword [esp + 0x14]
mov ecx, edi
inc edi
cmp ecx, 5
mov dword [esp + 0x14], edi
jge 0x46f5fc
mov edx, dword [0x4bd2c0]
add edx, 0x8c
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x168], eax
call dword [sym.imp.MSVCR71.dll_rand]
cdq
mov ecx, 0xa
idiv ecx
add edx, 0x1770
push edx
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0x168]
push edx
push 0
mov word [esp + 0x172], ax
push 0x20
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
lea ecx, [esp + 0x40]
push ecx
push 0
push 0
lea edx, [esp + 0x54]
push edx
lea eax, [esi + 1]
push eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x5c], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x46f3f4
xor eax, eax
mov ecx, 0x32
lea edi, [esp + 0x1a0]
rep stosd dword es:[edi], eax
xor ecx, ecx
mov dword [esp + 0x174], ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x17c], ecx
mov dword [esp + 0x180], ecx
lea eax, [esp + 0x178]
push eax
push ecx
mov dword [esp + 0x18c], ecx
push 0xc8
lea ecx, [esp + 0x1b0]
push ecx
push esi
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
cmp edi, 0x20
jle 0x46f3f0
lea ecx, [esp + 0x184]
call fcn.0047cf30
cmp word [esp + 0x1b8], 0x68
lea ecx, [esp + 0x184]
je 0x46f513
push edi
lea edx, [esp + 0x1a4]
push edx
jmp 0x46f51f
add edi, 0xffffffe0
push edi
lea eax, [esp + 0x1c4]
push eax
call fcn.0047cff0
cmp word [esp + 0x1b8], 0x68
jne 0x46f3f0
lea ecx, [esp + 0x1c0]
push 0x2c
push ecx
call dword [sym.imp.MSVCR71.dll_strchr]
add esp, 8
test eax, eax
je 0x46f3f0
mov byte [eax], 0
inc eax
push eax
call dword [sym.imp.MSVCR71.dll_atoi]
push 0
push 0
push 1
push esi
mov word [ebx + 0x7e], ax
call fcn.0048fc60
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x46f59c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [esp + 0x184]
mov word [ebx + 0x7e], di
mov dword [esp + 0x27c], 0xffffffff
call fcn.0047cd10
xor ax, ax
jmp 0x46f61a
mov esi, dword [sym.imp.USER32.dll_PostThreadMessageA]
mov dword [ebx + 0xa0], edi
mov edx, dword [edi + 0x20]
push 0
push edi
mov dword [edx + 0x14], ebx
mov eax, dword [0x4bd938]
push 0x716
push eax
mov dword [esp + 0x1c], 0x14
call esi
test eax, eax
jne 0x46f5fc
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0xc]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [esp + 0xc], eax
jbe 0x46f5f8
push 0xa
call ebx
mov edx, dword [0x4bd938]
push 0
push edi
push 0x716
push edx
call esi
test eax, eax
je 0x46f5d0
mov ebx, dword [esp + 0x10]
mov bx, word [ebx + 0x7e]
lea ecx, [esp + 0x184]
mov dword [esp + 0x27c], 0xffffffff
call fcn.0047cd10
mov ax, bx
mov ecx, dword [esp + 0x274]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x26c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00496ace
mov esp, ebp
pop ebp
ret 4