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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9ac
mov eax, dword [0x4abd08]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
push 0xff
lea edx, [ebp - 0x103]
push ebx
push edx
mov dword [ebp - 0x99c], eax
mov dword [ebp - 0x9ac], ecx
mov dword [ebp - 0x9a8], ebx
mov dword [ebp - 0x98c], edi
mov byte [ebp - 0x104], bl
call fcn.0046c140
mov esi, dword [edi + 0x354]
mov dword [ebp - 0x9a4], ebx
mov eax, dword [edi + 0x354]
add esp, 0xc
mov dword [ebp - 0x9a0], ebx
mov dword [ebp - 0x998], ebx
test eax, eax
je 0x417ce7
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417b90
sub eax, edx
cmp eax, 1
jbe 0x417ce7
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417ba7
sub eax, edx
cmp eax, 0x16
jae 0x417bbc
mov eax, 0x16
jmp 0x417bca
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x417bc1
sub eax, edx
inc eax
push 1
push eax
call dword [0x4ab4b4]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x417bf1
pop edi
pop esi
lea eax, [ebx + 0x1b]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
jne 0x417ca5
mov edi, esi
test edi, edi
je 0x417c6f
push 0x3a
push edi
call fcn.0046d790
mov esi, eax
add esp, 8
test esi, esi
je 0x417c6f
push 0xa
lea ecx, [esi + 1]
push 0
push ecx
call fcn.0046e053
push eax
call fcn.0043c280
movzx edi, ax
push 0x2d
push esi
mov dword [ebp - 0x9a0], edi
call fcn.0046d790
xor esi, esi
add esp, 0x18
cmp eax, esi
je 0x417cdc
push 0xa
inc eax
push esi
push eax
call fcn.0046e053
push eax
call fcn.0043c280
movzx eax, ax
add esp, 0x10
mov dword [ebp - 0x998], eax
cmp di, ax
jbe 0x417c6f
mov dword [ebp - 0x998], esi
mov dword [ebp - 0x9a0], esi
cmp byte [ebx], 0
je 0x417ce7
mov esi, dword [ebp - 0x99c]
mov ecx, dword [esi + 0x38]
mov edx, dword [ecx + 4]
push 0x401
lea eax, [ebp - 0x508]
push eax
push ebx
push edx
call fcn.00401990
add esp, 0x10
test eax, eax
jne 0x417d7f
mov eax, ebx
jmp 0x417d85
push 0x3a
push esi
call fcn.0046d790
mov edi, eax
add esp, 8
test edi, edi
je 0x417cc8
sub eax, esi
push eax
push esi
push ebx
call fcn.0046ff50
add esp, 0xc
jmp 0x417bfc
mov edx, ebx
mov eax, esi
sub edx, esi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x417cd0
jmp 0x417c6f
movzx edx, di
mov dword [ebp - 0x998], edx
jmp 0x417c6f
mov esi, dword [ebp - 0x99c]
mov edx, dword [esi + 0x12c]
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x417d5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push esi
call fcn.00431260
push eax
mov eax, dword [ebp - 0x98c]
push str.getsockname___failed:__s
push eax
call fcn.0042d360
add esp, 0x14
test ebx, ebx
je 0x417d46
push ebx
call dword [0x4ab4a8]
add esp, 4
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
movzx eax, word [ebp - 0x988]
push 0x401
lea ecx, [ebp - 0x508]
push ecx
lea edx, [ebp - 0x984]
push edx
push eax
call fcn.00423d90
add esp, 0x10
lea eax, [ebp - 0x508]
lea ecx, [ebp - 0x9a4]
push ecx
push 0
push eax
push esi
call fcn.0041dee0
add esp, 0x10
cmp eax, 1
jne 0x417dad
lea edx, [ebp - 0x9a4]
push edx
push esi
call fcn.0041e4b0
add esp, 8
mov eax, dword [ebp - 0x9a4]
test eax, eax
je 0x417dcb
mov esi, dword [eax]
push eax
mov eax, dword [ebp - 0x98c]
push eax
call fcn.0041e0c0
add esp, 8
jmp 0x417dcd
xor esi, esi
test ebx, ebx
je 0x417ddb
push ebx
call dword [0x4ab4a8]
add esp, 4
test esi, esi
jne 0x417e07
mov ecx, dword [ebp - 0x98c]
push str.Curl_resolv_failed__we_can_not_recover_
push ecx
call fcn.0042d360
add esp, 8
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [ecx]
cmp dword [esi + 8], 0
jne 0x417e22
mov edx, dword [ebp - 0x99c]
mov eax, dword [edx + 0x70]
mov dword [esi + 8], eax
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov dword [ebp - 0x990], ebx
cmp ebx, 0xffffffff
jne 0x417e80
call edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x417e10
mov ecx, dword [ebp - 0x99c]
push eax
push ecx
call fcn.00431260
mov edx, dword [ebp - 0x98c]
push eax
push str.socket_failure:__s
push edx
call fcn.0042d360
add esp, 0x14
pop edi
lea eax, [esi + 0x1e]
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x18]
push eax
push ecx
lea edx, [ebp - 0x988]
push edx
call fcn.0046ba50
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x994], eax
mov eax, dword [ebp - 0x9a0]
add esp, 0xc
movzx edi, ax
cmp ax, word [ebp - 0x998]
ja 0x418010
mov ebx, dword [ebp - 0x99c]
lea esp, [esp]
cmp word [ebp - 0x988], 2
jne 0x417ed8
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
mov ecx, dword [ebp - 0x994]
mov eax, dword [ebp - 0x990]
push ecx
lea edx, [ebp - 0x988]
push edx
push eax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x418001
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2741
jne 0x417f5a
push eax
push ebx
call fcn.00431260
mov edx, dword [ebp - 0x98c]
push eax
movzx ecx, di
push ecx
push str.bind_port_hu__failed:__s
push edx
call fcn.0042d360
mov edx, dword [ebx + 0x12c]
add esp, 0x18
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edx
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x417f79
movzx edi, word [ebp - 0x9a0]
jmp 0x417f67
cmp eax, 0x2740
je 0x417f66
cmp eax, 0xd
jne 0x417fbe
inc edi
cmp di, word [ebp - 0x998]
jbe 0x417ec0
jmp 0x41800a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431260
push eax
mov eax, dword [ebp - 0x98c]
push str.getsockname___failed:__s
push eax
call fcn.0042d360
mov ecx, dword [ebp - 0x990]
add esp, 0x14
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
push eax
push ebx
call fcn.00431260
push eax
mov eax, dword [ebp - 0x98c]
movzx edx, di
push edx
push str.bind_port_hu__failed:__s
push eax
call fcn.0042d360
mov ecx, dword [ebp - 0x990]
add esp, 0x18
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
cmp di, word [ebp - 0x998]
jbe 0x418041
mov ebx, dword [ebp - 0x990]
mov edx, dword [ebp - 0x98c]
push str.bind___failed__we_ran_out_of_ports_
push edx
call fcn.0042d360
add esp, 8
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x990]
lea eax, [ebp - 0x994]
push eax
lea ecx, [ebp - 0x988]
push ecx
push edi
mov dword [ebp - 0x994], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4180a9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431260
mov edx, dword [ebp - 0x98c]
push eax
push str.getsockname___failed:__s
push edx
call fcn.0042d360
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4180f5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.00431260
push eax
mov eax, dword [ebp - 0x98c]
push str.socket_failure:__s
push eax
call fcn.0042d360
add esp, 0x14
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov eax, 0x1e
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
push 0x100
lea ecx, [ebp - 0x104]
push ecx
push esi
call fcn.0041dc70
mov edi, dword [ebp - 0x9ac]
add esp, 0xc
cmp edi, 2
je 0x41816a
mov cx, word [ebp - 0x988]
lea esp, [esp]
cmp dword [ebx + 0x1d8], 0
jne 0x41812d
test edi, edi
je 0x418164
cmp edi, 1
jne 0x418138
cmp cx, 2
jne 0x418164
movzx eax, cx
sub eax, 2
jne 0x418164
mov edx, dword [ebp - 0x986]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
test edi, edi
je 0x4181bb
cmp edi, 1
je 0x418206
mov cx, word [ebp - 0x988]
inc edi
cmp edi, 2
jne 0x418120
mov esi, dword [ebp - 0x9a8]
mov dword [ebx + 0x414], edi
mov eax, dword [ebx + 0x130]
cmp eax, 0xffffffff
je 0x418188
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x990]
pop edi
mov dword [ebx + 0x130], ecx
mov dword [ebx + 0x1b8], 1
mov eax, esi
pop esi
mov dword [ebx + 0x420], 0x1c
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp word [ebp - 0x988], 2
push esi
setne dl
lea ecx, [ebp - 0x104]
push ecx
lea eax, [ebx + 0x3b0]
inc edx
push edx
push str.EPRT
push str._s__d_s_hu
push eax
call fcn.00429d40
mov esi, eax
add esp, 0x18
test esi, esi
je 0x418170
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046c641
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x908]
lea edx, [ebp - 0x104]
mov al, byte [edx]
test al, al
je 0x418227
cmp al, 0x2e
jne 0x418221
mov byte [ecx], 0x2c
jmp 0x418223
mov byte [ecx], al
inc ecx
inc edx
jne 0x418212
mov eax, esi
mov edx, esi
and edx, 0xff
push edx
shr eax, 8
push eax
push str.__d__d
push 0x14
push ecx
mov byte [ecx], 0
call dword [0x4a3aa4]
lea eax, [ebp - 0x908]
push eax
push str.PORT
lea eax, [ebx + 0x3b0]
push str._s__s
push eax
call fcn.00429d40
mov esi, eax
add esp, 0x24
test esi, esi
je 0x418170
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0046c641
mov esp, ebp
pop ebp
ret