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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x70e00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, ecx
mov dword [ebp - 0x1a0], edx
push ebx
push esi
push edi
mov ebx, dword [eax]
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x19c], 0
mov dword [ebp - 0x198], 0
mov edi, dword [ebx + 0x3e0]
mov eax, dword [ebx + 0x1ac]
movzx esi, word [ebx + 0x1a8]
mov dword [ebp - 0x1a4], eax
test edi, edi
jne 0x46d3c0
test si, si
je 0x46d7b2
push 0x80
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.005f46f0
add esp, 0xc
test edi, edi
je 0x46d60a
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x46d3e3
sub ecx, edx
cmp ecx, 0xff
jae 0x46d60a
push 0x100
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.005f46f0
add esp, 0xc
push 3
push edi
push 0x6f55c0
call fcn.00619ed0
add esp, 0xc
test eax, eax
jne 0x46d44a
add edi, 3
push edi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.0046c5e0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
push 5
push edi
push str.host_
call fcn.00619ed0
add esp, 0xc
test eax, eax
jne 0x46d461
add edi, 5
mov eax, dword [ebp - 0x194]
mov ecx, dword [eax + 0x2e8]
mov dword [ebp - 0x10c], ecx
mov ecx, dword [ebp + 8]
cmp ecx, 2
jne 0x46d487
mov dword [eax + 0x2e8], 1
jmp 0x46d496
cmp ecx, 0x17
jne 0x46d496
mov dword [eax + 0x2e8], 2
lea ecx, [ebp - 0x198]
mov edx, edi
push ecx
push 0
mov ecx, eax
call fcn.0046fa30
add esp, 8
cmp eax, 1
jne 0x46d4c1
mov ecx, dword [ebp - 0x194]
lea edx, [ebp - 0x198]
call fcn.0047a480
mov eax, dword [ebp - 0x194]
mov ecx, dword [ebp - 0x10c]
mov dword [eax + 0x2e8], ecx
mov eax, dword [ebp - 0x198]
test eax, eax
je 0x46d5e5
mov ecx, dword [eax]
lea edx, [ebp - 0x108]
push 0x100
call fcn.0046f610
mov eax, dword [ebp - 0x198]
add esp, 4
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
push edi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.0046c560
mov edx, dword [ebp - 0x198]
add esp, 0x18
mov ecx, ebx
call fcn.0046fc00
mov eax, dword [ebp + 8]
cmp eax, 0x17
jne 0x46d59c
lea eax, [ebp - 0x108]
push 0x25
push eax
call fcn.005fa980
mov edi, eax
add esp, 8
test edi, edi
je 0x46d54a
mov byte [edi], 0
inc edi
lea edx, [ebp - 0x188]
lea ecx, [ebp - 0x108]
call fcn.00488f30
test eax, eax
jle 0x46d58c
mov eax, 0x17
push esi
mov word [ebp - 0x190], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18e], ax
test edi, edi
je 0x46d58c
push edi
call fcn.00611c6a
add esp, 4
mov dword [ebp - 0x178], eax
mov eax, 0x1c
mov dword [ebp - 0x19c], eax
jmp 0x46d65d
cmp eax, 2
jne 0x46d65b
lea edx, [ebp - 0x18c]
lea ecx, [ebp - 0x108]
call fcn.00488e50
test eax, eax
jle 0x46d65b
mov eax, 2
push esi
mov word [ebp - 0x190], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18e], ax
mov eax, 0x10
mov dword [ebp - 0x19c], eax
jmp 0x46d65d
push edi
push str.Couldnt_bind_to__s
push ebx
call fcn.0046c5e0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
cmp eax, 0x17
jne 0x46d634
push esi
mov word [ebp - 0x190], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18e], ax
mov eax, 0x1c
mov dword [ebp - 0x19c], eax
jmp 0x46d65d
cmp eax, 2
jne 0x46d65b
push esi
mov word [ebp - 0x190], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x18e], ax
mov eax, 0x10
mov dword [ebp - 0x19c], eax
jmp 0x46d65d
xor eax, eax
push eax
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x1a0]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x46d6cf
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
nop dword [eax + eax]
mov eax, dword [ebp - 0x1a4]
dec eax
mov dword [ebp - 0x1a4], eax
test eax, eax
jle 0x46d752
movzx eax, si
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.0046c560
add esp, 0xc
inc esi
push esi
call edi
push dword [ebp - 0x19c]
mov word [ebp - 0x18e], ax
lea eax, [ebp - 0x190]
push eax
push dword [ebp - 0x1a0]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x46d680
push 0x80
lea eax, [ebp - 0x88]
mov dword [ebp - 0x10c], 0x80
push 0
push eax
call fcn.005f46f0
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x1a0]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x46d793
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x194]
mov esi, eax
mov edx, esi
mov dword [ebx + 0x473c], esi
call fcn.00488d10
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.0046c5e0
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [ebp - 0x194]
mov esi, eax
mov edx, esi
mov dword [ebx + 0x473c], esi
call fcn.00488d10
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.0046c5e0
add esp, 0x10
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004aa758
mov esp, ebp
pop ebp
ret
movzx eax, si
push eax
push str.Local_port:__hu_n
push ebx
call fcn.0046c560
mov eax, dword [ebp - 0x194]
add esp, 0xc
mov byte [eax + 0x2b7], 1
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004aa758
mov esp, ebp
pop ebp
ret