Function at 0x475e90
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x11c
mov eax, dword [esp + 0x120]
push ebx
push ebp
push esi
mov ebp, dword [eax]
xor esi, esi
push edi
mov edx, dword [ebp + 0x17c]
mov ecx, dword [ebp + 0x184]
mov bx, word [ebp + 0x180]
cmp edx, esi
mov dword [esp + 0x18], ecx
je 0x476086
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xff
jae 0x476086
mov al, byte [0x4c05e4]
mov ecx, 0x3f
mov byte [esp + 0x2c], al
xor eax, eax
lea edi, [esp + 0x2d]
push edx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x14], esi
stosb byte es:[edi], al
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
jne 0x475f61
mov edx, dword [ebp + 0x17c]
lea ecx, [esp + 0x2c]
push pe_nt_image_headers32
push ecx
push edx
call fcn.0045f280
add esp, 0xc
test eax, eax
je 0x475f61
mov edi, dword [esp + 0x130]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x30]
push 0
push ecx
push edi
call fcn.0045f510
add esp, 0x10
cmp eax, 1
jne 0x475f53
lea edx, [esp + 0x10]
push edx
push edi
call fcn.00468ad0
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x475f68
push eax
jmp 0x475ff4
mov edi, dword [esp + 0x130]
mov ecx, dword [ebp + 0x17c]
lea eax, [esp + 0x10]
push eax
push 0
push ecx
push edi
call fcn.0045f510
add esp, 0x10
cmp eax, 1
jne 0x475f92
lea edx, [esp + 0x10]
push edx
push edi
call fcn.00468ad0
add esp, 8
mov edx, dword [esp + 0x10]
test edx, edx
je 0x475ffd
cmp esi, 0xffffffff
jne 0x475fc6
mov eax, dword [edx]
lea ecx, [esp + 0x2c]
push pe_nt_image_headers32
push ecx
mov eax, dword [eax + 0x18]
xor ecx, ecx
mov cx, word [eax]
lea edx, [eax + 4]
push edx
push ecx
call fcn.004688d0
mov edx, dword [esp + 0x20]
add esp, 0x10
jmp 0x475ff3
mov edi, dword [ebp + 0x17c]
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push edx
push ebp
call fcn.0045f780
add esp, 8
mov al, byte [esp + 0x2c]
test al, al
jne 0x47602a
mov ecx, dword [ebp + 0x17c]
push ecx
push str.Couldnt_bind_to__s
push ebp
call fcn.0045cf40
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
lea edx, [esp + 0x2c]
push edx
push str.Bind_local_address_to__s_n
push ebp
call fcn.0045ced0
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x476070
lea ecx, [esp + 0x2c]
push ecx
push str.couldnt_find_my_own_IP_address___s_
push ebp
call fcn.0045cf40
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4761a7
mov eax, dword [eax]
mov esi, dword [eax + 0x18]
mov edi, dword [eax + 0x10]
jmp 0x4760b5
cmp bx, si
je 0x476171
xor edx, edx
mov edi, 0x10
mov dword [esp + 0x1c], edx
mov word [esp + 0x1c], 2
mov dword [esp + 0x20], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edx
lea esi, [esp + 0x1c]
mov dword [esp + 0x28], edx
cmp word [esi], 2
jne 0x4760c6
push ebx
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esi + 2], ax
mov eax, dword [esp + 0x134]
push edi
push esi
push eax
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jge 0x476105
mov eax, dword [esp + 0x18]
dec eax
test eax, eax
mov dword [esp + 0x18], eax
jle 0x47617e
mov ecx, ebx
and ecx, 0xffff
push ecx
push str.Bind_to_local_port__d_failed__trying_next_n
push ebp
call fcn.0045ced0
add esp, 0xc
inc ebx
jmp 0x4760b5
mov ecx, dword [esp + 0x134]
lea edx, [esp + 0x14]
lea eax, [esp + 0x2c]
push edx
push eax
push ecx
mov dword [esp + 0x20], 0x80
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jge 0x476147
push str.getsockname___failed
push ebp
call fcn.0045cf40
add esp, 8
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
cmp word [esp + 0x2c], 2
jne 0x47615c
mov edx, dword [esp + 0x2e]
push edx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov ebx, eax
and ebx, 0xffff
push ebx
push str.Local_port:__d_n
push ebp
call fcn.0045ced0
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x11c
ret
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov dword [ebp + 0x8458], eax
push eax
mov eax, dword [esp + 0x134]
push eax
call fcn.00467bb0
push eax
push str.bind_failure:__s
push ebp
call fcn.0045cf40
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0x11c
ret