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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9a8
mov eax, dword [0x5c6150]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x104]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, dword [ebx]
push 0x100
push 0
push eax
mov dword [ebp - 0x99c], ebx
mov dword [ebp - 0x990], esi
call fcn.004d9fe0
mov ecx, dword [ebp - 0x990]
xor eax, eax
mov esi, dword [esi + 0x354]
add esp, 0xc
mov dword [ebp - 0x9a8], 0
mov dword [ebp - 0x998], 0
mov ecx, dword [ecx + 0x354]
mov dword [ebp - 0x994], 0
mov dword [ebp - 0x98c], eax
test ecx, ecx
je 0x4afe46
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4afc63
sub ecx, edx
cmp ecx, 1
jbe 0x4afe46
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4afc80
sub ecx, edx
cmp ecx, 0x16
jae 0x4afc95
mov ecx, 0x16
jmp 0x4afca9
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4afca0
sub ecx, edx
lea eax, [ecx + 1]
push 1
push eax
call dword [0x5c604c]
add esp, 8
mov dword [ebp - 0x98c], eax
test eax, eax
jne 0x4afcd8
pop edi
pop esi
mov eax, 0x1b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x3a
je 0x4afd0f
push 0x3a
push esi
call fcn.004da140
add esp, 8
mov dword [ebp - 0x9a4], eax
test eax, eax
je 0x4afd83
sub eax, esi
push eax
mov eax, dword [ebp - 0x98c]
push esi
push eax
call fcn.004ee2d0
mov esi, dword [ebp - 0x9a4]
add esp, 0xc
test esi, esi
je 0x4afd9d
push 0x3a
push esi
call fcn.004da140
mov esi, eax
add esp, 8
test esi, esi
je 0x4afd9d
push 0xa
lea eax, [esi + 1]
push 0
push eax
call fcn.004e34ff
push eax
call fcn.004b6a60
movzx eax, ax
push 0x2d
push esi
mov dword [ebp - 0x998], eax
call fcn.004da140
add esp, 0x18
test eax, eax
je 0x4afd72
push 0xa
inc eax
push 0
push eax
call fcn.004e34ff
push eax
call fcn.004b6a60
movzx ecx, ax
add esp, 0x10
mov dword [ebp - 0x994], ecx
jmp 0x4afd9d
mov eax, dword [ebp - 0x998]
movzx ecx, ax
mov dword [ebp - 0x994], ecx
jmp 0x4afd9d
mov ecx, dword [ebp - 0x98c]
sub ecx, esi
nop dword [eax + eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4afd90
mov esi, dword [ebp - 0x994]
xor ecx, ecx
cmp word [ebp - 0x998], si
movzx eax, si
cmovbe ecx, eax
mov eax, dword [ebp - 0x998]
movzx edx, cx
xor ecx, ecx
cmp word [ebp - 0x998], si
mov esi, dword [ebp - 0x98c]
movzx eax, ax
cmovbe ecx, eax
mov dword [ebp - 0x994], edx
movzx eax, cx
cmp byte [esi], 0
mov dword [ebp - 0x9a4], eax
je 0x4afe32
push 0x401
lea eax, [ebp - 0x508]
push eax
mov eax, dword [ebx + 0x38]
push esi
push dword [eax + 4]
call fcn.004158a0
add esp, 0x10
lea ecx, [ebp - 0x508]
test eax, eax
mov eax, dword [ebp - 0x9a4]
movzx edx, ax
mov eax, dword [ebp - 0x994]
cmove ecx, esi
movzx eax, ax
mov dword [ebp - 0x998], edx
mov dword [ebp - 0x994], eax
test ecx, ecx
jne 0x4afed1
jmp 0x4afe48
movzx eax, ax
mov dword [ebp - 0x998], eax
movzx eax, dx
mov dword [ebp - 0x994], eax
jmp 0x4afe48
xor esi, esi
lea eax, [ebp - 0x9a0]
mov dword [ebp - 0x9a0], 0x80
push eax
lea eax, [ebp - 0x988]
push eax
push dword [ebx + 0xc8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4afea8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004a2c60
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x14
test esi, esi
je 0x4b00ac
push esi
call dword [0x5c6040]
add esp, 4
jmp 0x4b00ac
push 0x401
lea eax, [ebp - 0x508]
push eax
lea eax, [ebp - 0x984]
push eax
movzx eax, word [ebp - 0x988]
push eax
call fcn.004a2b90
add esp, 0x10
lea ecx, [ebp - 0x508]
lea eax, [ebp - 0x9a8]
push eax
push 0
push ecx
push ebx
call fcn.00496b80
add esp, 0x10
cmp eax, 1
jne 0x4afef9
lea eax, [ebp - 0x9a8]
push eax
push ebx
call fcn.004a2850
add esp, 8
mov eax, dword [ebp - 0x9a8]
test eax, eax
je 0x4aff16
mov esi, dword [eax]
push eax
push dword [ebp - 0x990]
call fcn.00496d30
add esp, 8
jmp 0x4aff18
xor esi, esi
mov eax, dword [ebp - 0x98c]
test eax, eax
je 0x4aff2c
push eax
call dword [0x5c6040]
add esp, 4
test esi, esi
jne 0x4aff48
push str.Curl_resolv_failed__we_can_not_recover_
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 8
jmp 0x4b00ac
cmp dword [esi + 8], 0
jne 0x4aff54
mov eax, dword [ebx + 0x70]
mov dword [esi + 8], eax
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x98c], eax
cmp eax, 0xffffffff
jne 0x4aff9b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4aff48
push eax
push ebx
call fcn.004a2c60
push eax
push str.socket_failure:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x14
jmp 0x4b00ac
push dword [esi + 0x10]
lea eax, [ebp - 0x988]
push dword [esi + 0x18]
push eax
call fcn.004d9a60
mov eax, dword [esi + 0x10]
add esp, 0xc
mov dword [ebp - 0x9a0], eax
mov eax, dword [ebp - 0x998]
movzx ebx, ax
cmp ax, word [ebp - 0x994]
ja 0x4b008d
nop
cmp word [ebp - 0x988], 2
jne 0x4affe8
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x986], ax
push dword [ebp - 0x9a0]
lea eax, [ebp - 0x988]
push eax
push dword [ebp - 0x98c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4b010b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2741
jne 0x4b0073
push eax
push dword [ebp - 0x99c]
call fcn.004a2c60
push eax
movzx eax, bx
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x990]
call fcn.0049e540
mov ebx, dword [ebp - 0x99c]
lea eax, [ebp - 0x9a0]
add esp, 0x18
mov dword [ebp - 0x9a0], 0x80
push eax
lea eax, [ebp - 0x988]
push eax
push dword [ebx + 0xc8]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b00c2
mov eax, dword [ebp - 0x998]
movzx ebx, ax
jmp 0x4b0080
cmp eax, 0x2740
je 0x4b007f
cmp eax, 0xd
jne 0x4b00e5
inc ebx
cmp bx, word [ebp - 0x994]
jbe 0x4affd0
push str.bind___failed__we_ran_out_of_ports_
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 8
push dword [ebp - 0x98c]
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.004d6cfd
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
call fcn.004a2c60
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x14
jmp 0x4b00a0
push eax
push dword [ebp - 0x99c]
call fcn.004a2c60
push eax
movzx eax, bx
push eax
push str.bind_port_hu__failed:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x18
jmp 0x4b00a0
cmp bx, word [ebp - 0x994]
ja 0x4b008d
mov ebx, dword [ebp - 0x98c]
lea eax, [ebp - 0x9a0]
push eax
lea eax, [ebp - 0x988]
mov dword [ebp - 0x9a0], 0x80
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b016d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp - 0x99c]
call fcn.004a2c60
push eax
push str.getsockname___failed:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x14
push ebx
jmp 0x4b00a6
push 1
push ebx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x4b01a6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push dword [ebp - 0x99c]
call fcn.004a2c60
push eax
push str.socket_failure:__s
push dword [ebp - 0x990]
call fcn.0049e540
add esp, 0x14
push ebx
jmp 0x4b00a6
push 0x100
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.00496b50
mov ebx, dword [ebp - 0x99c]
add esp, 0xc
cmp edi, 2
je 0x4b021e
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [ebp - 0x988]
cmp dword [ebx + 0x174], 0
jne 0x4b01e0
test edi, edi
je 0x4b0218
cmp edi, 1
jne 0x4b01eb
cmp cx, 2
jne 0x4b0218
movzx eax, cx
sub eax, 2
jne 0x4b0218
push dword [ebp - 0x986]
call esi
movzx eax, ax
mov dword [ebp - 0x9a4], eax
test edi, edi
je 0x4b02fd
cmp edi, 1
je 0x4b026c
mov cx, word [ebp - 0x988]
inc edi
cmp edi, 2
jne 0x4b01d3
xor esi, esi
mov dword [ebx + 0x3a4], edi
mov eax, dword [ebx + 0xcc]
cmp eax, 0xffffffff
je 0x4b0238
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x98c]
push 0x1c
mov dword [ebx + 0xcc], eax
push ebx
mov dword [ebx + 0x154], 1
call fcn.004b0e00
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x908]
mov ebx, 0x2c
lea esi, [ebp - 0x104]
mov eax, edx
sub esi, eax
mov cl, byte [esi + edx]
test cl, cl
je 0x4b029b
cmp cl, 0x2e
movzx eax, cl
cmove eax, ebx
mov byte [edx], al
inc edx
lea eax, [esi + edx]
test eax, eax
jne 0x4b0281
mov eax, dword [ebp - 0x9a4]
movzx ecx, ax
movzx eax, cl
push eax
shr ecx, 8
push ecx
push str.__d__d
push 0x14
push edx
mov byte [edx], 0
call fcn.004a0050
mov ebx, dword [ebp - 0x99c]
lea eax, [ebp - 0x908]
push eax
push str.PORT
push str._s__s
lea eax, [ebx + 0x340]
push eax
call fcn.004b7ec0
mov esi, eax
add esp, 0x24
test esi, esi
je 0x4b0220
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret
movzx eax, ax
push eax
lea eax, [ebp - 0x104]
push eax
xor eax, eax
cmp word [ebp - 0x988], 2
setne al
inc eax
push eax
push str.EPRT
lea eax, [ebx + 0x340]
push str._s__d_s_hu
push eax
call fcn.004b7ec0
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4b0220
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d6cfd
mov esp, ebp
pop ebp
ret