Function at 0x499080
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
lea eax, [ebp - 0x18]
push esi
push edi
mov dword [ebp - 4], 0x10
mov dword [ebp - 8], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 8]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
test eax, 0xfffe
jne 0x4990ed
cmp al, 1
je 0x4990c6
mov al, 6
mov dword [edi + 4], ebx
xor ebx, ebx
mov ecx, dword [esi + 8]
mov bh, byte [esi + 0xc]
mov dword [edi], eax
mov bl, byte [esi + 0xd]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], ebx
jmp 0x4990ed
mov al, byte [esi + 3]
mov bl, byte [esi + 5]
mov bh, byte [esi + 4]
mov ah, byte [esi + 2]
shl eax, 0x10
xor ecx, ecx
shl ebx, 0x10
mov al, 2
mov bl, byte [esi + 7]
mov dword [edi + 8], ecx
mov bh, byte [esi + 6]
mov dword [edi + 0xc], ecx
mov dword [edi + 4], ebx
mov dword [edi], eax
push 0x48
call fcn.0048b010
mov ecx, dword [ebp + 8]
mov esi, eax
xor eax, eax
add esp, 4
mov ax, word [ecx]
xor ecx, ecx
mov ebx, 1
mov edx, dword [eax*4 + 0x4c18fc]
mov cx, word [eax*2 + 0x4c18f8]
push edx
push ebx
push ecx
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 8], eax
je 0x499225
lea edx, [ebp - 0x18]
push 0x10
push edx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x499225
mov eax, dword [esi + 8]
push 3
push eax
call sub.WSOCK32.dll_listen
cmp eax, 0xffffffff
je 0x499225
mov ecx, dword [0x4f6010]
mov edx, dword [esi + 8]
push 8
push 0x401
push ecx
push edx
call sub.WSOCK32.dll_WSAAsyncSelect
test eax, eax
jne 0x499225
mov edx, dword [esi + 8]
lea eax, [ebp - 4]
lea ecx, [ebp - 0x18]
push eax
push ecx
push edx
call sub.WSOCK32.dll_getsockname
mov ax, word [ebp - 0x18]
cmp ax, 2
jne 0x4991ad
mov word [esi + 0x20], bx
mov eax, dword [ebp - 0x16]
push eax
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x22], ax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.WSOCK32.dll_ntohl
mov dword [esi + 0x24], eax
jmp 0x4991dd
cmp ax, 6
jne 0x4991dd
mov word [esi + 0x20], 0
mov edx, dword [ebp - 0xc]
push edx
call sub.WSOCK32.dll_ntohs
mov word [esi + 0x2c], ax
mov ecx, dword [ebp - 0x16]
lea eax, [esi + 0x22]
mov dword [esi + 0x22], ecx
mov edx, dword [ebp - 0x12]
mov dword [eax + 4], edx
mov cx, word [ebp - 0xe]
mov word [eax + 8], cx
mov edx, dword [ebp + 0xc]
mov byte [esi + 0xc], bl
mov dword [esi + 0x3c], 0x226
mov dword [esi + 0x1c], edx
mov eax, dword [str.SOCK]
mov edx, dword [esi + 8]
mov dword [esi], eax
mov eax, dword [0x4d29d4]
test eax, eax
mov ecx, 0x4d29d0
je 0x499213
cmp dword [eax + 8], edx
jae 0x499213
mov ecx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x499205
mov edx, dword [ecx + 4]
mov eax, esi
mov dword [esi + 4], edx
mov dword [ecx + 4], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
xor edx, edx
mov ecx, 0x4d2a1c
cmp dword [ecx], edi
je 0x499245
add ecx, 0xc
inc edx
cmp ecx, 0x4d2b90
jl 0x499233
jmp 0x499274
lea ecx, [edx + edx*2]
xor eax, eax
shl ecx, 2
mov al, byte [ecx + 0x4d2a19]
mov dword [0x4fa06c], eax
mov eax, dword [ecx + 0x4d2a20]
mov dword [0x4fa068], eax
mov al, byte [ecx + 0x4d2a18]
test al, al
je 0x499274
test esi, esi
je 0x499274
mov byte [esi + 0xd], bl
cmp edx, 0x1f
jne 0x49929c
push edi
push str.Unknown_Error__u
push 0x4f5fcc
call fcn.004b57c2
add esp, 0xc
mov dword [0x4fa06c], ebx
mov dword [0x4fa068], 0x4f5fcc
mov eax, dword [esi + 8]
test eax, eax
je 0x4992a9
push eax
call sub.WSOCK32.dll_closesocket
push esi
call fcn.0048b120
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret