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

Disassembly:
sub esp, 0x124
mov eax, dword [0x516b80]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov edi, dword [ebx]
movzx eax, word [edi + 0x128]
mov esi, dword [edi + 0x2a0]
mov ecx, dword [edi + 0x12c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
test esi, esi
je 0x431a08
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x431898
sub eax, edx
cmp eax, 0xff
jae 0x431a08
push 0xff
lea edx, [esp + 0x35]
push 0
push edx
mov dword [esp + 0x1c], 0
mov byte [esp + 0x3c], cl
call fcn.004991b0
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x431924
push 0x100
lea eax, [esp + 0x34]
push eax
push esi
call fcn.00440a90
add esp, 0xc
test eax, eax
je 0x431924
lea ecx, [esp + 0x10]
push ecx
push 0
lea edx, [esp + 0x38]
push edx
push ebx
call fcn.00429320
add esp, 0x10
cmp eax, 1
jne 0x431919
lea eax, [esp + 0x10]
push eax
push ebx
call fcn.00434080
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x431924
push eax
jmp 0x43198d
lea ecx, [esp + 0x10]
push ecx
push 0
push esi
push ebx
call fcn.00429320
add esp, 0x10
cmp eax, 1
jne 0x431948
lea edx, [esp + 0x10]
push edx
push ebx
call fcn.00434080
add esp, 8
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x431996
cmp ebp, 0xffffffff
jne 0x43197a
mov eax, dword [ebx]
mov eax, dword [eax + 0x18]
push 0x100
lea ecx, [esp + 0x34]
lea edx, [eax + 4]
movzx eax, word [eax]
push ecx
push edx
push eax
call fcn.00438240
mov ebx, dword [esp + 0x20]
add esp, 0x10
jmp 0x43198c
lea edx, [esp + 0x30]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x431982
push ebx
push edi
call fcn.00429200
add esp, 8
cmp byte [esp + 0x30], 0
jne 0x4319b6
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.00425ca0
add esp, 0xc
mov eax, 0x2d
jmp 0x431b04
lea ecx, [esp + 0x30]
push ecx
push str.Bind_local_address_to__s_n
push edi
call fcn.00425c10
add esp, 0xc
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x4319f6
lea eax, [esp + 0x30]
push eax
push str.couldnt_find_my_own_IP_address___s_
push edi
call fcn.00425ca0
add esp, 0xc
mov eax, 0x2d
jmp 0x431b04
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4319ac
mov eax, dword [eax]
mov esi, dword [eax + 0x18]
mov ebp, dword [eax + 0x10]
jmp 0x431a40
xor eax, eax
cmp word [esp + 0x14], ax
je 0x431b02
mov ecx, 2
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov word [esp + 0x20], cx
mov dword [esp + 0x24], eax
lea esi, [esp + 0x20]
lea ebp, [eax + 0x10]
lea ebx, [ebx]
cmp word [esi], 2
jne 0x431a55
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
mov ebx, dword [esp + 0x138]
push ebp
push esi
push ebx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jge 0x431a97
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
test eax, eax
jle 0x431b1d
mov ebx, dword [esp + 0x14]
movzx eax, bx
push eax
push str.Bind_to_local_port__d_failed__trying_next_n
push edi
call fcn.00425c10
add esp, 0xc
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x431a40
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x34]
push edx
push ebx
mov dword [esp + 0x24], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x431ac9
push str.getsockname___failed
push edi
call fcn.00425ca0
add esp, 8
mov eax, 0x2d
jmp 0x431b04
cmp word [esp + 0x30], 2
jne 0x431ae3
mov eax, dword [esp + 0x32]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov dword [esp + 0x14], ecx
movzx edx, word [esp + 0x14]
push edx
push str.Local_port:__d_n
push edi
call fcn.00425c10
mov eax, dword [esp + 0x28]
add esp, 0xc
mov byte [eax + 0x122], 1
xor eax, eax
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00497164
add esp, 0x124
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov dword [edi + 0x8464], eax
call fcn.00428eb0
push eax
push str.bind_failure:__s
push edi
call fcn.00425ca0
add esp, 0x14
mov eax, 0x2d
jmp 0x431b04