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

Disassembly:
sub esp, 0x224
mov eax, dword [0x4594d4]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebx
push ebp
push esi
mov esi, ecx
mov ebp, dword [esi]
movzx ebx, word [ebp + 0x128]
mov ecx, dword [ebp + 0x12c]
push edi
mov edi, dword [ebp + 0x2bc]
xor eax, eax
push 0xff
push eax
lea edx, [esp + 0x131]
push edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x24], ecx
mov byte [esp + 0x134], al
call fcn.0042d120
add esp, 0xc
test edi, edi
jne 0x4181ef
test bx, bx
je 0x418432
push 0x80
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.0042d120
add esp, 0xc
test edi, edi
je 0x4183e7
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x418210
sub eax, edx
cmp eax, 0xff
jae 0x4183e7
cmp dword [esp + 0x23c], 2
mov ebx, dword [ebp + 0x244]
jne 0x41823e
mov dword [ebp + 0x244], 1
lea ecx, [esp + 0x1c]
push ecx
push 0
push edi
push esi
call fcn.00418c90
add esp, 0x10
cmp eax, 1
jne 0x418261
lea edx, [esp + 0x1c]
push edx
call fcn.00427bd0
add esp, 4
mov dword [ebp + 0x244], ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x4183d5
mov ecx, dword [ebx]
mov eax, dword [ecx + 4]
sub eax, 2
jne 0x418298
mov ecx, dword [ecx + 0x18]
add ecx, 4
push pe_nt_image_headers32
push ecx
lea esi, [esp + 0x130]
call fcn.00428010
add esp, 8
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov eax, dword [esp + 0x23c]
push ecx
lea edx, [esp + 0x12c]
push edx
push eax
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
mov ecx, ebp
call fcn.00418f30
add esp, 0x14
mov edi, ebx
mov esi, ebp
call fcn.00418e50
cmp dword [esp + 0x23c], 2
jne 0x41830c
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x12c]
push edx
call fcn.004287f0
add esp, 8
test eax, eax
jle 0x41830c
mov ecx, dword [esp + 0x20]
mov eax, 2
push ecx
mov word [esp + 0x2c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x14], 0x10
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x238]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x41837e
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
test eax, eax
jle 0x418436
movzx edx, bx
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
mov ecx, ebp
call fcn.00418f30
add esp, 8
inc ebx
cmp word [esp + 0x28], 2
jne 0x418369
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2a], ax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x418330
push 0x80
lea edx, [esp + 0xac]
push 0
push edx
mov dword [esp + 0x24], 0x80
call fcn.0042d120
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0xac]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x418418
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push esi
mov dword [ebp + 0x84bc], edi
call fcn.00428720
add esp, 4
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x418454
push edi
push str.Couldnt_bind_to__s
mov eax, ebp
call fcn.00418ff0
add esp, 8
jmp 0x41845e
cmp dword [esp + 0x23c], 2
jne 0x418314
mov edx, 2
push ebx
mov word [esp + 0x2c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x14], 0x10
jmp 0x418314
movzx edx, bx
push edx
push str.Local_port:__hu_n
mov ecx, ebp
call fcn.00418f30
add esp, 8
mov byte [esi + 0x133], 1
xor eax, eax
jmp 0x418463
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push esi
mov dword [ebp + 0x84bc], edi
call fcn.00428720
add esp, 4
push eax
push edi
push str.bind_failed_with_errno__d:__s
mov eax, ebp
call fcn.00418ff0
add esp, 0xc
mov eax, 0x2d
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0042bbc1
add esp, 0x224
ret