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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x4fbf60]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
mov ecx, dword [ebx + 0x184]
push esi
movzx esi, word [ebx + 0x180]
push edi
mov edi, dword [ebx + 0x394]
mov dword [ebp - 0x210], eax
xor eax, eax
push 0xff
push eax
lea edx, [ebp - 0x10b]
push edx
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], ecx
mov byte [ebp - 0x10c], al
call fcn.00483200
add esp, 0xc
mov dword [ebp - 0x21c], 0
test edi, edi
jne 0x446d00
test si, si
je 0x446fda
push 0x80
lea eax, [ebp - 0x18c]
push 0
push eax
call fcn.00483200
add esp, 0xc
test edi, edi
je 0x446eb9
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x446d23
sub eax, edx
cmp eax, 0xff
jae 0x446eb9
push 3
push edi
push 0x4e09d0
call fcn.0048ff57
add esp, 0xc
test eax, eax
jne 0x446d53
add edi, 3
lea ecx, [eax + 1]
jmp 0x446d72
push 5
push edi
push str.host_
call fcn.0048ff57
add esp, 0xc
test eax, eax
jne 0x446d6c
add edi, 5
jmp 0x446dd7
mov ecx, dword [ebp - 0x21c]
call fcn.004abad0
sub eax, 0
je 0x446db7
dec eax
je 0x446da1
dec eax
jne 0x446dcf
mov ecx, dword [ebp + 0x10]
push ecx
lea edx, [ebp - 0x10c]
push edx
push edi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebx
call fcn.00449240
add esp, 0x14
jmp 0x446e7c
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
test ecx, ecx
je 0x446dd7
push edi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.004492c0
add esp, 0xc
jmp 0x44701a
test ecx, ecx
jne 0x446ea5
cmp dword [ebp + 0x10], 2
mov esi, dword [ebp - 0x210]
mov eax, dword [esi + 0x234]
mov dword [ebp - 0x21c], eax
jne 0x446df9
mov dword [esi + 0x234], 1
lea ecx, [ebp - 0x218]
push ecx
push 0
push edi
push esi
call fcn.00448110
add esp, 0x10
cmp eax, 1
jne 0x446e1c
lea eax, [ebp - 0x218]
call fcn.004488b0
mov eax, dword [ebp - 0x218]
mov edx, dword [ebp - 0x21c]
mov dword [esi + 0x234], edx
test eax, eax
je 0x446ea5
mov ecx, dword [eax]
push 0x100
lea esi, [ebp - 0x10c]
call fcn.00447e70
mov esi, dword [ebp - 0x218]
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 0x10]
add esp, 4
push ecx
lea edx, [ebp - 0x10c]
push edx
push eax
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.00449240
add esp, 0x18
mov edi, esi
mov eax, ebx
call fcn.004482e0
mov esi, dword [ebp - 0x220]
cmp dword [ebp + 0x10], 2
jne 0x446ee3
lea eax, [ebp - 0x188]
lea ecx, [ebp - 0x10c]
call fcn.00468520
test eax, eax
jle 0x446ee3
mov ecx, 2
mov word [ebp - 0x18c], cx
jmp 0x446ecb
push edi
push str.Couldnt_bind_to__s
push ebx
call fcn.004492c0
add esp, 0xc
jmp 0x44701a
cmp dword [ebp + 0x10], 2
jne 0x446ee3
mov edx, 2
mov word [ebp - 0x18c], dx
push esi
call dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x214], 0x10
mov word [ebp - 0x18a], ax
mov eax, dword [ebp - 0x214]
mov edi, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x446f59
nop
mov eax, dword [ebp - 0x224]
dec eax
mov dword [ebp - 0x224], eax
test eax, eax
jle 0x446fed
movzx edx, si
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.00449240
add esp, 0xc
inc esi
cmp word [ebp - 0x18c], 2
jne 0x446f40
push esi
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x18a], ax
mov eax, dword [ebp - 0x214]
push eax
lea ecx, [ebp - 0x18c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x446f00
push 0x80
lea edx, [ebp - 0x20c]
push 0
push edx
mov dword [ebp - 0x220], 0x80
call fcn.00483200
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x446fb8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x210]
mov edi, eax
push edx
mov dword [ebx + 0x85dc], edi
call fcn.00468450
add esp, 4
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x447011
movzx eax, si
push eax
push str.Local_port:__hu_n
push ebx
call fcn.00449240
mov ecx, dword [ebp - 0x210]
add esp, 0xc
mov dword [ecx + 0x214], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0047f164
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp - 0x210]
mov edi, eax
push edx
mov dword [ebx + 0x85dc], edi
call fcn.00468450
add esp, 4
push eax
push edi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.004492c0
add esp, 0x10
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x2d
pop ebx
call fcn.0047f164
mov esp, ebp
pop ebp
ret