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

Disassembly:
push ebp
mov ecx, 0xff
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x18c
mov eax, dword [eax + 0x17c]
mov edx, dword [edi]
mov dword [ebp - 0x154], eax
movzx eax, byte [0x509ca2]
mov dword [ebp - 0x158], edx
xor edx, edx
mov byte [ebp - 0x128], al
lea eax, [ebp - 0x127]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov byte [ebp - 0x168], 0
mov ecx, dword [ebp - 0x158]
xor eax, eax
mov dword [ebp - 0x16c], eax
mov eax, dword [ecx + 0x70]
test eax, eax
jne 0x431a70
mov eax, 0x10
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x140]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x98]
mov dword [esp], eax
call sub.WS2_32.DLL_getsockname
mov byte [ebp - 0x168], 1
sub esp, 0xc
test eax, eax
js 0x431bc4
movzx edx, byte [ebp - 0x168]
mov eax, dword [ebp - 0x16c]
test eax, eax
setne al
or eax, edx
test al, 1
je 0x431b87
mov dword [esp], 2
xor eax, eax
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.WSOCK32.DLL_socket
sub esp, 0xc
cmp eax, 0xffffffff
mov ebx, eax
je 0x431bec
mov eax, dword [edi + 0x9c]
cmp eax, 0xffffffff
je 0x431863
mov dword [esp], eax
call sub.WSOCK32.DLL_closesocket
sub esp, 4
cmp byte [ebp - 0x168], 0
mov dword [edi + 0x9c], ebx
jne 0x431899
mov ecx, dword [ebp - 0x16c]
mov edx, dword [ecx + 0x14]
mov eax, dword [edx]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x24], eax
mov eax, dword [edx + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x26], 0
mov eax, 0x10
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.WSOCK32.DLL_bind
sub esp, 0xc
test eax, eax
js 0x431bd8
lea eax, [ebp - 0x144]
mov esi, 0x10
mov dword [ebp - 0x144], esi
mov dword [esp + 8], eax
lea eax, [ebp - 0x138]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.WS2_32.DLL_getsockname
sub esp, 0xc
test eax, eax
js 0x431bc4
movzx eax, word [ebp - 0x136]
mov dword [esp], eax
call sub.WS2_32.DLL_ntohs
sub esp, 4
mov ecx, 1
movzx esi, ax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sub.WSOCK32.DLL_listen
sub esp, 8
test eax, eax
js 0x431bf7
cmp byte [ebp - 0x168], 0
je 0x431a45
mov dword [esp], 2
mov eax, 0x100
lea ebx, [ebp - 0x128]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
call fcn.0043cc00
mov dword [esp], ebx
lea eax, [ebp - 0x14a]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x14c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x14e]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x150]
mov dword [esp + 8], eax
mov eax, str._hu._hu._hu._hu
mov dword [esp + 4], eax
call sub.msvcrt.dll_sscanf
cmp eax, 4
mov edx, 0x1e
jne 0x431a3b
mov dword [esp + 0x18], esi
mov ecx, str.Telling_server_to_connect_to__d._d._d._d:_d_n
movzx eax, word [ebp - 0x14a]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x14c]
mov dword [esp + 0x10], eax
movzx eax, word [ebp - 0x14e]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x150]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x158]
mov dword [esp], eax
call fcn.0042bba0
mov eax, esi
shr esi, 8
and eax, 0xff
mov dword [esp + 0x1c], eax
mov edx, str.PORT__d__d__d__d__d__d
mov dword [esp + 0x18], esi
movzx eax, word [ebp - 0x14a]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x14c]
mov dword [esp + 0x10], eax
movzx eax, word [ebp - 0x14e]
mov dword [esp + 0xc], eax
movzx eax, word [ebp - 0x150]
mov dword [esp + 4], edx
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.00431220
test eax, eax
mov edx, eax
je 0x431ab6
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp - 0x128]
mov eax, 0x100
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov ecx, dword [ebp - 0x16c]
mov dword [esp], ecx
call fcn.00428390
jmp 0x431958
mov dword [esp], eax
call sub.WS2_32.DLL_inet_addr
sub esp, 4
cmp eax, 0xffffffff
mov edx, eax
je 0x431ae9
xor eax, eax
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x158]
mov eax, dword [ecx + 0x70]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.0043cb80
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x16c]
test eax, eax
jne 0x431808
jmp 0x4317cc
mov edx, dword [ebp - 0x16c]
mov dword [esp], edx
call fcn.0043ca70
mov ecx, dword [ebp - 0x154]
mov eax, edi
mov edx, 0x19
mov dword [ecx + 0x48], 2
call fcn.00430a90
lea esp, [ebp - 0xc]
xor edx, edx
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x100
lea ebx, [ebp - 0x128]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov edx, dword [ebp - 0x158]
mov eax, dword [edx + 0x70]
mov dword [esp], eax
call fcn.0043f6b0
test eax, eax
jne 0x431ba8
mov ecx, dword [ebp - 0x158]
mov eax, dword [ecx + 0x70]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp eax, 1
jbe 0x4317cc
xor ecx, ecx
xor edx, edx
lea esi, [ebp - 0x13c]
mov dword [ebp - 0x13c], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], edi
call fcn.00428570
dec eax
je 0x431c02
mov eax, dword [ebp - 0x13c]
test eax, eax
je 0x4317cc
mov edx, dword [eax]
mov dword [ebp - 0x16c], edx
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x158]
mov dword [esp], ecx
call fcn.004287c0
jmp 0x431aa3
mov eax, str.couldt_find_IP_address_to_use
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x158]
mov dword [esp], edx
call fcn.0042b7c0
mov edx, 0x1e
jmp 0x431a3b
mov dword [esp], ebx
xor esi, esi
call sub.WS2_32.DLL_inet_addr
sub esp, 4
mov edx, eax
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
jmp 0x431a95
mov ebx, 0x509e17
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x158]
mov dword [esp], eax
jmp 0x431b99
mov eax, str.bind_2__failed_on_socket
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x158]
mov dword [esp], ecx
jmp 0x431b99
mov eax, str.socket_2__failed___s_
mov dword [esp + 4], eax
jmp 0x431bcd
mov edx, str.listen_2__failed_on_socket
mov dword [esp + 4], edx
jmp 0x431b90
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00438f60
jmp 0x431b5a