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

Disassembly:
sub esp, 0x29c
mov eax, dword [0x1027e110]
xor eax, esp
mov dword [esp + 0x298], eax
mov eax, dword [esp + 0x2a0]
push ebx
movzx ebx, word [edi + 0x1a8]
push ebp
movzx ebp, word [edi + 0x1aa]
push esi
mov esi, dword [edi + 0x574]
mov dword [esp + 0x10], eax
xor eax, eax
cmp esi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebp
jne 0x1008d885
cmp bx, ax
je 0x1008dc25
push 0x80
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.101b5c80
add esp, 0xc
test esi, esi
je 0x1008dbd7
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008d8a5
sub eax, edx
cmp eax, 0xff
jae 0x1008dbd7
push 0xff
lea edx, [esp + 0xa9]
push 0
push edx
mov byte [esp + 0xb0], cl
call fcn.101b5c80
mov edx, dword [0x10279128]
mov eax, edx
add esp, 0xc
mov dword [esp + 0x18], 0
lea ebp, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008d8f0
sub eax, ebp
push eax
push esi
push edx
call fcn.101b6427
add esp, 0xc
test eax, eax
jne 0x1008d979
mov eax, dword [0x10279128]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008d912
sub eax, edx
add esi, eax
mov dword [esp + 0x18], 1
mov ebp, dword [esp + 0x2b4]
push 0x100
lea eax, [esp + 0xa8]
push eax
push esi
push ebp
call fcn.100ea7c0
add esp, 0x10
sub eax, 0
je 0x1008d9d9
sub eax, 1
je 0x1008d9bc
sub eax, 1
jne 0x1008d9f4
push ebp
lea ecx, [esp + 0xa8]
push ecx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i
push edi
call fcn.1005abd0
add esp, 0x14
jmp 0x1008daa8
mov edx, dword [str.host_]
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008d984
sub eax, ebp
push eax
push esi
push edx
call fcn.101b6427
add esp, 0xc
test eax, eax
jne 0x1008d927
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x1008d9a6
mov ebp, dword [esp + 0x2b4]
sub eax, edx
add esi, eax
jmp 0x1008d9ff
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.101b40e2
add esp, 0x29c
ret
cmp dword [esp + 0x18], 0
je 0x1008d9ff
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.1005aa90
add esp, 0xc
jmp 0x1008dc70
cmp dword [esp + 0x18], 0
jne 0x1008dbb9
cmp ebp, 2
mov edx, dword [esp + 0x10]
mov bl, byte [edx + 0x3ba]
jne 0x1008da17
mov eax, edx
mov byte [eax + 0x3ba], 1
lea ecx, [esp + 0xc]
push ecx
push 0
push 0x50
push esi
push edi
call fcn.1007e8b0
add esp, 0x14
cmp eax, 1
jne 0x1008da3d
lea edx, [esp + 0xc]
push edx
push edi
call fcn.1005a430
add esp, 8
mov eax, dword [esp + 0x10]
mov byte [eax + 0x3ba], bl
mov eax, dword [esp + 0xc]
test eax, eax
je 0x1008dbb9
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0xa8]
push ecx
push edx
call fcn.1007dc40
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [esp + 0xb4]
push eax
push ebp
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.1005abd0
mov ecx, dword [esp + 0x30]
push ecx
push edi
call fcn.1007eb60
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
add esp, 0x2c
cmp ebp, dword [eax + 4]
jne 0x1008d9bc
mov ebx, dword [esp + 0x1c]
cmp ebp, 2
jne 0x1008dae0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0xa8]
push edx
push ebp
call fcn.100964e0
add esp, 0xc
test eax, eax
jle 0x1008dae0
push ebx
mov word [esp + 0x28], bp
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x14], 0x10
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x2b0]
push eax
lea ecx, [esp + 0x28]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x1008db55
sub ebp, 1
test ebp, ebp
jle 0x1008dc3f
add ebx, 1
test bx, bx
je 0x1008dc3f
movzx edx, bx
sub edx, 1
push edx
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.1005abd0
add esp, 0xc
cmp word [esp + 0x24], 2
jne 0x1008db40
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x1008db00
push 0x80
lea edx, [esp + 0xa8]
push 0
push edx
mov dword [esp + 0x28], 0x80
call fcn.101b5c80
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xa8]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x1008dc05
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1a8]
mov esi, eax
push edx
push esi
mov dword [edi + 0xa30], esi
call fcn.1008a4f0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x1008dc67
push esi
push str.Couldnt_bind_to__s
push edi
mov dword [edi + 0xe94], 0
call fcn.1005aa90
add esp, 0xc
jmp 0x1008dc70
cmp dword [esp + 0x2b4], 2
jne 0x1008dae4
push ebx
mov word [esp + 0x28], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov dword [esp + 0x14], 0x10
jmp 0x1008dae4
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.1005abd0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ecx + 0x230], 1
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.101b40e2
add esp, 0x29c
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1a8]
mov esi, eax
push edx
push esi
mov dword [edi + 0xa30], esi
call fcn.1008a4f0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.1005aa90
add esp, 0x1c
mov ecx, dword [esp + 0x2a4]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0x2d
call fcn.101b40e2
add esp, 0x29c
ret