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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x214
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax]
xor eax, eax
mov dword [esp + 4], eax
mov ecx, dword [ebx + 0x13c]
push esi
mov esi, dword [ebx + 0x344]
push edi
xor edx, edx
test esi, esi
mov dx, word [ebx + 0x138]
mov dword [esp + 0x1c], ecx
mov byte [esp + 0xa0], al
mov dword [esp + 0x10], eax
mov ecx, 0x3f
lea edi, [esp + 0xa1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [esp + 0x14], edx
stosb byte es:[edi], al
jne 0x462af0
test dx, dx
je 0x462dd7
xor eax, eax
test esi, esi
mov ecx, 0x20
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
je 0x462cd4
mov eax, esi
lea edi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x462b10
sub eax, edi
cmp eax, 0xff
jae 0x462cd4
mov edx, dword [0x50b0e8]
mov eax, edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x462b30
sub eax, edi
push eax
push esi
push edx
call fcn.00485a70
add esp, 0xc
test eax, eax
jne 0x462b60
mov eax, dword [0x50b0e8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x462b50
sub eax, edx
add esi, eax
jmp 0x462c7d
mov edx, dword [str.host_]
mov eax, edx
lea edi, [eax + 1]
jmp 0x462b70
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x462b70
sub eax, edi
push eax
push esi
push edx
call fcn.00485a70
add esp, 0xc
test eax, eax
jne 0x462c6c
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x462b94
sub eax, edx
add esi, eax
mov edi, dword [ebp + 8]
cmp dword [ebp + 0x10], 2
mov ecx, dword [edi + 0x21c]
mov dword [esp + 0x18], ecx
jne 0x462bbc
mov dword [edi + 0x21c], 1
lea edx, [esp + 0xc]
push edx
push 0
push esi
push edi
call fcn.004584e0
add esp, 0x10
cmp eax, 1
jne 0x462be0
lea eax, [esp + 0xc]
push eax
push edi
call fcn.00457ea0
add esp, 8
mov eax, dword [esp + 0xc]
test eax, eax
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x21c], ecx
je 0x462cb9
mov eax, dword [eax]
push 0x100
lea edx, [esp + 0xa4]
push edx
push eax
call fcn.004582a0
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
mov edx, dword [ebp + 0x10]
push eax
lea ecx, [esp + 0xb0]
push ecx
push edx
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.004622f0
mov eax, dword [esp + 0x30]
push eax
push ebx
call fcn.004586f0
mov edi, dword [ebp + 0x10]
add esp, 0x2c
cmp edi, 2
jne 0x462cf5
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0xa4]
push edx
push edi
call fcn.00466c50
add esp, 0xc
test eax, eax
jle 0x462cf5
mov eax, dword [esp + 0x14]
push eax
jmp 0x462cdb
push esi
call fcn.0042c170
add esp, 4
test eax, eax
je 0x462b9f
mov edi, dword [ebp + 0x10]
push 0x100
lea edx, [esp + 0xa4]
push edx
push esi
push edi
call fcn.0042c170
add esp, 0x10
test eax, eax
je 0x462e08
push edi
lea eax, [esp + 0xa4]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebx
call fcn.004622f0
add esp, 0x14
jmp 0x462c3e
push esi
push str.Couldnt_bind_to__s
push ebx
call fcn.004623b0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x10], 2
jne 0x462cf5
push edx
mov word [esp + 0x24], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x10], 0x10
mov ecx, dword [esp + 0x10]
mov esi, dword [ebp + 0xc]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jge 0x462d65
lea ecx, [ecx]
mov eax, dword [esp + 0x1c]
dec eax
test eax, eax
mov dword [esp + 0x1c], eax
jle 0x462de0
mov edi, dword [esp + 0x14]
movzx eax, di
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.004622f0
add esp, 0xc
inc edi
cmp word [esp + 0x20], 2
mov dword [esp + 0x14], edi
jne 0x462d50
push edi
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [esp + 0x22], ax
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jl 0x462d10
xor eax, eax
mov ecx, 0x20
lea edi, [esp + 0x1a0]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x1a4]
push ecx
push esi
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jge 0x462db6
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov esi, eax
push esi
push edx
mov dword [ebx + 0x857c], esi
call fcn.00456660
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x462dff
movzx eax, word [esp + 0x14]
push eax
push str.Local_port:__hu_n
push ebx
call fcn.004622f0
mov ecx, dword [ebp + 8]
add esp, 0xc
mov dword [ecx + 0x1fc], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
mov esi, eax
push esi
push edx
mov dword [ebx + 0x857c], esi
call fcn.00456660
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.004623b0
add esp, 0x18
pop edi
pop esi
mov eax, 0x2d
pop ebx
mov esp, ebp
pop ebp
ret