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

Disassembly:
sub esp, 0x19c
mov eax, dword [0x10044054]
xor eax, esp
mov dword [esp + 0x198], eax
mov eax, dword [esp + 0x1a0]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov edi, dword [eax]
mov dword [esp + 0x14], ebp
movzx ebx, word [edi + 0x180]
mov esi, dword [edi + 0x3a4]
mov dword [esp + 0x10], eax
mov eax, dword [edi + 0x184]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
cmp esi, ebp
jne 0x10002077
cmp bx, bp
je 0x100023ea
push 0x80
lea ecx, [esp + 0x2c]
push ebp
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp esi, ebp
je 0x10002399
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002097
sub eax, edx
cmp eax, 0xff
jae 0x10002399
push 0xff
lea edx, [esp + 0xad]
push ebp
push edx
mov byte [esp + 0xb4], cl
call sub.MSVCR90.dll_memset
mov edx, dword [section..data]
mov eax, edx
mov dword [esp + 0x24], ebp
add esp, 0xc
lea ebp, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100020d7
sub eax, ebp
mov ebp, dword [sym.imp.MSVCR90.dll_strncmp]
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x10002112
mov eax, dword [section..data]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002100
sub eax, edx
add esi, eax
mov ebx, 1
jmp 0x1000215b
mov edx, dword [str.host_]
mov eax, edx
lea ebx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002120
sub eax, ebx
push eax
push esi
push edx
call ebp
add esp, 0xc
test eax, eax
jne 0x10002157
mov eax, dword [str.host_]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10002140
mov ebp, dword [esp + 0x1b8]
sub eax, edx
add esi, eax
jmp 0x100021e2
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x88]
mov ebp, dword [esp + 0x1b8]
push pe_nt_image_headers32
lea eax, [esp + 0xac]
push eax
mov eax, dword [esp + 0x1c4]
push esi
push edx
push eax
push ebp
call section..text
add esp, 0x18
sub eax, 0
je 0x100021c2
sub eax, 1
je 0x100021b8
sub eax, 1
jne 0x100021da
push ebp
lea ecx, [esp + 0xac]
push ecx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.100230a0
add esp, 0x14
jmp 0x1000227b
mov eax, 1
jmp 0x1000241c
test ebx, ebx
je 0x100021e2
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.10023130
add esp, 0xc
jmp 0x10002417
test ebx, ebx
jne 0x10002385
mov ebx, dword [esp + 0x10]
mov edx, dword [ebx + 0x270]
mov dword [esp + 0x18], edx
cmp ebp, 2
jne 0x100021ff
mov dword [ebx + 0x270], 1
lea eax, [esp + 0x14]
push eax
push 0
push esi
push ebx
call fcn.10012340
add esp, 0x10
cmp eax, 1
jne 0x10002223
lea ecx, [esp + 0x14]
push ecx
push ebx
call fcn.10001370
add esp, 8
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [ebx + 0x270], edx
test eax, eax
je 0x10002385
mov edx, dword [eax]
push pe_nt_image_headers32
lea ecx, [esp + 0xac]
push ecx
push edx
call fcn.10012010
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0xb8]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.100230a0
mov ecx, dword [esp + 0x38]
push ecx
push edi
call fcn.10012820
add esp, 0x2c
cmp ebp, 2
jne 0x100022b9
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0xac]
push eax
push ebp
call fcn.10019710
add esp, 0xc
test eax, eax
jle 0x100022b9
mov edx, dword [esp + 0x20]
mov ecx, ebp
push edx
mov word [esp + 0x2c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x1c], 0x10
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x1b4]
mov ebp, dword [sym.imp.WS2_32.dll_bind]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
call ebp
test eax, eax
jge 0x10002329
jmp 0x100022e0
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
test eax, eax
jle 0x100023ee
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.100230a0
add esp, 0xc
inc ebx
cmp word [esp + 0x28], 2
jne 0x10002318
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x2a], ax
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
call ebp
test eax, eax
jl 0x100022e0
push 0x80
lea eax, [esp + 0xac]
push 0
push eax
mov dword [esp + 0x24], 0x80
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xac]
push edx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x100023ca
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [esp + 0x10]
push esi
push eax
mov dword [edi + 0x860c], esi
call fcn.10027ba0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1000240e
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.10023130
add esp, 0xc
jmp 0x10002417
cmp dword [esp + 0x1b8], 2
jne 0x100022bd
mov eax, 2
push ebx
mov word [esp + 0x2c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
mov dword [esp + 0x1c], 0x10
jmp 0x100022bd
movzx ecx, bx
push ecx
push str.Local_port:__hu_n
push edi
call fcn.100230a0
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [edx + 0x24c], 1
xor eax, eax
jmp 0x1000241c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [esp + 0x10]
push esi
push eax
mov dword [edi + 0x860c], esi
call fcn.10027ba0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.10023130
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x1a8]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100377a6
add esp, 0x19c
ret